Skip to content

SnapURL is a developer-focused SaaS image upload and delivery platform designed for avatars, social media assets, and application-only image usage.

Notifications You must be signed in to change notification settings

brijeshdevio/snap-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

81 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SnapURL ๐Ÿš€

Upload images. Get URLs. Done.

SnapURL is a developer-focused SaaS image upload and delivery platform designed for avatars, social media assets, and application-only image usage. It provides a secure, fast, and simple API to upload images and retrieve public URLs, with full dashboard, API key management, and authentication.


๐ŸŒ Live Preview

SnapURL


โœจ Key Features

  • Secure image uploads via API
  • Public image URLs for instant access
  • API key & upload token management
  • JWT-based authentication with refresh tokens
  • GitHub OAuth login
  • User dashboard (images, API keys, profile)
  • Image deletion & account management
  • Optimized for avatars and app-only images

Page Screenshots

Home/Landing Page Home/Landing Page

Docs Page Docs Page

Signup Page Signup Page

Login Page Login Page

Dashboard Page Dashboard Page

Images Page Images Page

Profile Page Profile Page

Settings Page Settings Page


๐Ÿ—๏ธ Tech Stack

Frontend

  • React.js
  • TypeScript
  • TanStack Query
  • React Router
  • Axios
  • Tailwind CSS / Custom UI
  • GitHub OAuth (client)
  • Dark mode-first design

Backend

  • NestJS
  • MongoDB + Mongoose
  • JWT Authentication
  • GitHub OAuth
  • Argon2 (password hashing)
  • Multer (multipart uploads)
  • RESTful API architecture

๐Ÿ” Authentication Flow

  • Email & Password authentication
  • GitHub OAuth login
  • Short-lived access tokens (JWT)
  • Refresh token rotation
  • Protected routes via JWT guards

๐Ÿ“ก API Endpoints

Base

GET /api

๐Ÿ”‘ Auth Endpoints

POST /api/auth/signup
POST /api/auth/login
POST /api/auth/logout        (protected)
POST /api/auth/refresh

๐Ÿ‘ค User Endpoints (Protected)

GET    /api/users/me
PATCH  /api/users/me
PATCH  /api/users/me/avatar
PATCH  /api/users/change-email
PATCH  /api/users/change-password
DELETE /api/users/delete-account

๐Ÿ–ผ๏ธ Image Upload & Delivery

Upload Image (Core Feature)

POST /api/uploads

Headers

{
  "Content-Type": "multipart/form-data",
  "X-Upload-Token": "your-upload-token"
}

Body

{
  "file": "<image-file>"
}

Get Image by Name

GET /api/images/:NAME

Delete Image

DELETE /api/images/:IMAGE_TOKEN_HASH

List Images (Protected)

GET /api/images

๐Ÿ” Secrets / API Keys (Protected)

POST   /api/secrets
GET    /api/secrets
DELETE /api/secrets/:ID

Used to generate upload tokens for secure API access.


๐Ÿงช Example cURL Upload

curl -X POST https://api.snapurl.com/api/uploads \
  -H "X-Upload-Token: ssk_UPLOAD_TOKEN" \
  -F "file=@avatar.jpg"

๐Ÿ“Š Dashboard Capabilities

  • View uploaded images
  • Copy image URLs
  • Delete images
  • Manage API keys
  • Monitor API usage
  • Update profile & avatar
  • Change email/password

๐Ÿ›ก๏ธ Security

  • Argon2 password hashing
  • JWT + Refresh token rotation
  • Upload token validation
  • File type & size validation
  • Rate-limit ready architecture
  • Image hash-based access control

๐Ÿง  Use Cases

  • User avatars
  • Social media previews
  • App-only images
  • Developer tools
  • SaaS product assets

โš ๏ธ Not intended for hosting public galleries or large media libraries.


๐Ÿง‘โ€๐Ÿ’ป Local Development

Backend

cd backend
pnpm install
pnpm start:dev

Frontend

cd frontend
pnpm install
pnpm dev

๐Ÿ”ฎ Future Enhancements

  • Image transformations (resize, crop)
  • CDN integration
  • Usage-based billing
  • Rate limiting per API key
  • Webhooks
  • Team workspaces

๐Ÿ“œ License

MIT License


๐Ÿ‘จโ€๐Ÿ’ป Author

Brijesh Kumar Built as a production-grade SaaS project to demonstrate full-stack system design, authentication, and API architecture.

About

SnapURL is a developer-focused SaaS image upload and delivery platform designed for avatars, social media assets, and application-only image usage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published