Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SmartShare β€” Intelligent File Compression & Secure Link Sharing Platform

SmartShare Spring Boot React PostgreSQL Redis AWS S3 Firebase Render Vercel

SmartShare is a production-ready, full-stack file management platform that lets users securely upload, compress, deduplicate, version, and share files via protected short links β€” with real-time analytics, rate limiting, role-based access control, and a fully featured user profile system.

Live: https://smartshareio.vercel.app | API: https://smartshare-backend.onrender.com


πŸ“‹ Table of Contents


✨ Features

πŸ” Authentication & Security

  • Email/Password Login & Registration via Firebase Authentication
  • Google OAuth Sign-In / Sign-Up β€” one-click login with Google; auto-creates a user profile on first login
  • Firebase ID token verification on every protected API request (server-side via Firebase Admin SDK)
  • Role-based routing β€” Admin users redirected to the Admin Dashboard; regular users access the standard workspace
  • Route guards at both the frontend (React) and backend (Spring Security) layers

πŸ“ File Management

  • Smart Upload β€” files are compressed and deduplicated automatically before storage
  • File Name Conflict Detection β€” detects if a file with the same name exists, prompting a version decision
  • My Files β€” grid/list view of all uploaded files with download, share, delete, and preview actions
  • File Preview β€” in-browser preview for images (PNG, JPEG, GIF, WebP) and PDFs via a tabbed detail panel
  • File Download β€” direct download from the file details panel and search results
  • File Deletion β€” full cascade cleanup: removes the file record, all short links, all analytics events, the S3 object (if no other references exist), and Redis cache entries

πŸ—‚οΈ File Versioning

  • Upload New Version β€” re-upload a file under the same name to create a new version, keeping full history
  • Version History Panel β€” view all past versions with timestamps and size info
  • Switch Active Version β€” promote any historical version back to "current"; short link caches auto-invalidate
  • Replace Mode β€” mark the previous version as replaced when uploading a new one
  • Deduplication Across Versions β€” if a new version has identical content (same SHA-256), the existing S3 object is reused

πŸ—œοΈ Compression & Deduplication

  • GZIP Compression via a pluggable CompressionStrategy pattern (extensible to other codecs)
  • Content-aware strategy selection β€” factory selects the optimal strategy based on file extension
  • SHA-256 Content Hashing β€” every file is hashed on upload; existing hash = no re-upload
  • Per-file compression metrics β€” original vs. compressed size tracked and displayed in the UI
  • System-wide Bandwidth Savings β€” aggregated deduplication and compression savings on the dashboard

πŸ”— Short Link Sharing

  • Generate secure short links for any file with a single click
  • Password protection β€” protect a link with a password; transmitted via X-Download-Password header, never in the URL
  • Download limits β€” set a maximum number of downloads; link auto-deactivates once reached
  • Expiry dates β€” expired links show an "Expired" message to the recipient
  • Link status tracking β€” ACTIVE, EXPIRED, LIMIT_REACHED, PASSWORD_PROTECTED
  • Copy link β€” one-click clipboard copy of the short URL
  • Delete links β€” remove any short link, with cascade deletion of its analytics
  • Redis-cached resolution β€” sub-millisecond lookup; cache invalidated on version switch or deletion

πŸ” Unified Search

  • Search by file name β€” partial, case-insensitive match
  • Search by tag β€” match against auto-generated content tags
  • Combined results β€” single query checks both, merging and deduplicating results
  • Global search bar β€” navigates directly to results from the navbar
  • Search result actions β€” download, share, or delete files from the results grid

🏷️ Auto-Tagging

  • Automatic tag generation on every upload and version switch
  • Tag-based discovery β€” browse files by tag from the Search page
  • User tag summary β€” all tags across your files, sorted by usage frequency
  • Popular tags β€” system-wide leaderboard in the Admin Dashboard

πŸ“Š Analytics & Insights

  • Dashboard β€” overview cards: total files, total downloads, total bandwidth saved
  • File Detail Analytics (/files/:id) β€” per-file breakdown: download history, short link statuses, compression stats, tags, preview
  • Top Downloads (/analytics) β€” ranked list of most-downloaded files
  • Bandwidth Savings (/bandwidth) β€” personal and system-wide compression and deduplication metrics
  • Device & Browser Analytics β€” events record device type (Desktop/Mobile/Tablet) and browser

πŸ›‘οΈ Rate Limiting & Abuse Protection

  • Redis-backed Sliding Window Rate Limiter β€” distributed-safe, accurate per-window counting
  • Protected endpoints:
Action Limit Window
File downloads (by IP) 20 requests 60 seconds
File uploads (by user) 10 requests 60 seconds
Authentication attempts (by IP) 15 requests 10 minutes
Password-protected link attempts (by IP) 5 attempts 10 minutes
  • HTTP 429 responses with Retry-After header on limit exceeded
  • Automatic lockout clearing on successful password authentication

πŸ‘€ User Profile & Settings

  • Account Settings page (/settings) β€” accessible from the navbar avatar dropdown
  • Basic profile: Display Name, Profile Image URL
  • Professional details: Organization, Location, Bio, Job Profile (dropdown), Experience Level
  • Social links: LinkedIn, GitHub, Portfolio URL (server-side URL prefix validation)
  • App preferences: Language, Timezone, Default Link Expiry, Email Notifications toggle
  • Live navbar update β€” display name and avatar update instantly without a page reload

πŸ”“ Secure Public File Access

  • Short links are publicly accessible at /f/:shortCode β€” no login required for recipients
  • Graceful UI states for: password-protected, download limit reached, expired, not found
  • Password entry form with retry support for protected links
  • Auto-downloads on page load for public (non-password) links

πŸ§‘β€πŸ’Ό Admin Dashboard

  • System overview β€” total users, total files, total downloads, total storage used
  • Upload trends β€” daily upload count chart for the past 7 days
  • Top uploaders β€” ranked list of most active users
  • Popular tags β€” system-wide top-20 tags by usage
  • Recent activity log β€” last 10 download events (privacy-safe)
  • Active users β€” unique users active in the last 24 hours

πŸ₯ Health Check

GET /api/health
β†’ { "status": "UP" }

Used by Render for deployment health monitoring.


πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Client (Browser / Vercel)                      β”‚
β”‚           React 18 + Vite 5 + TailwindCSS 3                     β”‚
β”‚      Firebase Auth SDK  β”‚  Axios  β”‚  Recharts                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                               β”‚ HTTPS / REST
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              Spring Boot 3.2 (Java 21) β€” Render                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚ Controllers β”‚  β”‚   Services   β”‚  β”‚ Security / Firebase   β”‚   β”‚
β”‚  β”‚ (REST API)  β”‚  β”‚ (Business    β”‚  β”‚ Token Verification    β”‚   β”‚
β”‚  β”‚             β”‚  β”‚  Logic)      β”‚  β”‚ Rate Limit Intercept  β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚         β”‚                β”‚                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚             Data / Infrastructure Layer                   β”‚  β”‚
β”‚  β”‚  Neon PostgreSQL β”‚  Upstash Redis  β”‚  AWS S3              β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow β€” File Upload

User selects file
       β”‚
       β–Ό
1. Check for filename conflict (version prompt if exists)
       β”‚
       β–Ό
2. SHA-256 hash of file content (deduplication check)
       β”‚
       β”œβ”€β”€ Duplicate found β†’ reuse existing S3 object
       β”‚
       └── New file β†’ GZIP compress β†’ upload to AWS S3
               β”‚
               β–Ό
3. Save FileEntity + FileGroupEntity to Neon PostgreSQL
       β”‚
       β–Ό
4. Auto-generate tags β†’ save to tags table
       β”‚
       β–Ό
5. Return upload metadata to frontend

Data Flow β€” Short Link Download

User opens /f/:shortCode (frontend)
       β”‚
       β–Ό
FileAccess.jsx auto-triggers download attempt
       β”‚
       β”œβ”€β”€ 200 OK β†’ blob stream β†’ browser download βœ…
       β”‚
       β”œβ”€β”€ 401 β†’ shows password entry form β†’ retry with X-Download-Password header
       β”‚
       β”œβ”€β”€ 404 + "limit" β†’ shows "Download Limit Reached" card
       β”‚
       └── 404 + "expir" β†’ shows "Link Expired" card

🧰 Tech Stack

Layer Technology Version / Service
Backend Framework Spring Boot 3.2.5
Language Java 21
Database Neon PostgreSQL (serverless) β€”
Cache / Rate Limiting Upstash Redis (serverless, TLS) β€”
Object Storage AWS S3 (SDK v2) β€”
Authentication Firebase Authentication β€”
Frontend Framework React 18
Build Tool Vite 5
Styling TailwindCSS 3
Charts Recharts β€”
HTTP Client Axios β€”
Icons Lucide React β€”
Backend Hosting Render β€”
Frontend Hosting Vercel β€”

πŸ’» Local Development

Prerequisites

  • Java 21+
  • Node.js 18+ and npm
  • Docker & Docker Compose
  • A Firebase project with Email/Password and Google sign-in enabled
  • An AWS account with an S3 bucket

1. Infrastructure (Docker)

Start PostgreSQL and Redis locally:

cd infrastructure
docker-compose up -d
Service Port
PostgreSQL 5432
Redis 6379

2. Backend Setup

Firebase Service Account (local dev)

  1. Go to Firebase Console β†’ Project Settings β†’ Service Accounts
  2. Click Generate new private key and download the JSON
  3. Place it at backend/src/main/resources/firebase-service-account.json

Environment Variables

Create backend/.env:

# Database
DB_URL=jdbc:postgresql://localhost:5432/smartshare
DB_USERNAME=postgres
DB_PASSWORD=postgres

# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_SSL=false

# AWS S3
AWS_S3_BUCKET_NAME=your-bucket-name
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_REGION=us-east-1

# Firebase
FIREBASE_PROJECT_ID=your-firebase-project-id
# Leave FIREBASE_SERVICE_ACCOUNT_JSON blank to use the local JSON file

Note: The spring-dotenv library automatically loads .env on startup β€” no manual export needed.

Run

cd backend

# Windows
.\mvnw.cmd spring-boot:run

# Linux / macOS
./mvnw spring-boot:run

API available at http://localhost:8080.

3. Frontend Setup

Create frontend/.env:

VITE_API_BASE_URL=http://localhost:8080/api

# Firebase β€” from Firebase Console β†’ Project Settings β†’ Your Apps
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id

# Comma-separated admin emails
VITE_ADMIN_EMAILS=admin@yourdomain.com
cd frontend
npm install
npm run dev

App available at http://localhost:5173.


πŸš€ Production Deployment

1. Backend on Render

  1. Connect your GitHub repo to Render β†’ New Web Service
  2. Root directory: backend
  3. Runtime: Docker (uses the Dockerfile in backend/)
  4. Health check path: /api/health
  5. Set environment variables (see table below)

Render automatically injects PORT β€” no action needed.

2. Frontend on Vercel

  1. Connect your GitHub repo to Vercel β†’ New Project
  2. Root directory: frontend
  3. Framework: Vite (auto-detected)
  4. Set environment variables (see table below)

frontend/vercel.json configures SPA routing so page refreshes and direct URL access work correctly on all React Router routes.

3. Environment Variables Reference

Backend (Render)

Variable Description Example
SPRING_PROFILES_ACTIVE Must be prod prod
DB_URL Full Neon JDBC URL jdbc:postgresql://ep-xxx.neon.tech/neondb?sslmode=require
DB_USERNAME Neon DB username neondb_owner
DB_PASSWORD Neon DB password ...
REDIS_HOST Upstash Redis endpoint xxx.upstash.io
REDIS_PORT Upstash Redis port (TLS) 6380
REDIS_PASSWORD Upstash Redis password ...
REDIS_SSL Enable TLS true
AWS_ACCESS_KEY_ID AWS IAM access key AKIA...
AWS_SECRET_ACCESS_KEY AWS IAM secret key ...
AWS_REGION S3 bucket region ap-south-2
AWS_S3_BUCKET_NAME S3 bucket name smartshare-storage
FIREBASE_PROJECT_ID Firebase project ID my-project-abc
FIREBASE_SERVICE_ACCOUNT_JSON Full contents of firebase-service-account.json {"type":"service_account",...}
FRONTEND_URL Deployed frontend URL (used in short link generation + CORS) https://smartshare.vercel.app
ADMIN_EMAILS Comma-separated admin emails admin@example.com

Frontend (Vercel)

Variable Description Example
VITE_API_BASE_URL Backend API base URL https://smartshare-backend.onrender.com/api
VITE_FIREBASE_API_KEY Firebase web API key AIza...
VITE_FIREBASE_AUTH_DOMAIN Firebase auth domain project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID Firebase project ID my-project-abc
VITE_FIREBASE_STORAGE_BUCKET Firebase storage bucket project.firebasestorage.app
VITE_FIREBASE_MESSAGING_SENDER_ID Firebase sender ID 123456789
VITE_FIREBASE_APP_ID Firebase app ID 1:123:web:abc
VITE_ADMIN_EMAILS Comma-separated admin emails admin@example.com

πŸ—ΊοΈ Route Map

Path Access Description
/login Public Email/Password & Google login
/register Public Email/Password & Google sign-up
/f/:shortCode Public Secure file download page (password, limit, expiry UI)
/dashboard Auth Overview stats and recent activity
/upload Auth Upload a new file (with duplicate detection)
/files Auth My files β€” grid view with actions
/files/:fileId Auth File details: preview, analytics, versions, links
/search Auth Search files by name or tag
/analytics Auth Top downloaded files leaderboard
/bandwidth Auth Compression & deduplication savings
/settings Auth Account settings and user profile
/admin Admin only System admin dashboard

πŸ“¦ API Reference

Authentication

All protected endpoints require:

Authorization: Bearer <Firebase ID Token>

Files

Method Endpoint Description
POST /api/files/upload Upload a new file (creates v1)
GET /api/files/my-files List all current-version files for the authenticated user
GET /api/files/:id/details Full file analytics and metadata
GET /api/files/:id/preview Stream the file content (binary)
DELETE /api/files/:id Delete a file and all related data
POST /api/files/:id/check-duplicate Check if a filename already exists

File Versioning

Method Endpoint Description
POST /api/files/:groupId/versions Upload a new version to an existing file group
GET /api/files/:groupId/versions List all versions of a file group
PUT /api/files/:groupId/versions/:versionId/activate Switch the active version

Short Links

Method Endpoint Description
POST /api/shortlinks/create Create a short link for a file
GET /api/shortlinks/file/:fileId Get all short links for a file
DELETE /api/shortlinks/:shortCode Delete a short link
GET /f/:shortCode Resolve and stream file via short link (public)

Tags & Search

Method Endpoint Description
GET /api/tags/search/unified?q={keyword} Search by file name and tag (combined, deduped)
GET /api/tags/search/{tag} Search files by a single tag
GET /api/tags/user Get all tags for the authenticated user's files
GET /api/tags/popular Get system-wide popular tags

User Profile

Method Endpoint Description
GET /api/user/profile Get the authenticated user's profile
PUT /api/user/profile Update the authenticated user's profile

Analytics

Method Endpoint Description
GET /api/analytics/dashboard/overview Dashboard summary stats
GET /api/analytics/bandwidth/user Personal bandwidth savings
GET /api/analytics/bandwidth/system System-wide bandwidth savings (public)
GET /api/analytics/top-downloads Top downloaded files

Admin (Admin-only)

Method Endpoint Description
GET /api/admin/overview Full system telemetry

Health

Method Endpoint Description
GET /api/health Health check β€” {"status":"UP"}

πŸ”’ Security Model

Concern Implementation
Token Verification Firebase Admin SDK verifies every ID token server-side
User Auto-Provisioning Backend auto-creates a UserEntity on first authenticated request
Admin Authorization Admin endpoints verify the user's email against a server-side whitelist (ADMIN_EMAILS)
Short Link Passwords Transmitted via X-Download-Password header β€” never in the URL or logs
Rate Limiting Redis sliding-window limiter protects uploads, downloads, auth, and password attempts
URL Validation LinkedIn, GitHub, and Portfolio URLs validated server-side for correct prefixes
CORS Configured to allow only FRONTEND_URL (+ localhost for dev)
Production Profile Test endpoints (/api/public/test/**) are disabled via @Profile("!prod")
Route Guards Frontend ProtectedRoute and AdminRoute components prevent unauthorized navigation
Non-root Docker Production container runs as a non-root OS user

πŸ§‘β€πŸ’Ό Admin Access

Set admin emails in the backend env:

ADMIN_EMAILS=admin@example.com,owner@example.com

And in the frontend env:

VITE_ADMIN_EMAILS=admin@example.com,owner@example.com
  • Admin users are automatically redirected to /admin on login
  • Admin users cannot access regular user routes
  • The Admin Dashboard exposes system-wide telemetry without revealing private user data

πŸ“‚ Project Structure

SmartShare/
β”œβ”€β”€ infrastructure/
β”‚   └── docker-compose.yml          # Local PostgreSQL + Redis
β”‚
β”œβ”€β”€ backend/                        # Spring Boot application
β”‚   β”œβ”€β”€ Dockerfile                  # Multi-stage JDK 21 β†’ JRE 21 Alpine
β”‚   β”œβ”€β”€ .dockerignore
β”‚   β”œβ”€β”€ .env.example                # All required env vars documented
β”‚   └── src/main/java/com/smartshare/
β”‚       β”œβ”€β”€ controller/
β”‚       β”‚   β”œβ”€β”€ admin/              # Admin dashboard endpoints
β”‚       β”‚   β”œβ”€β”€ analytics/          # Analytics endpoints
β”‚       β”‚   β”œβ”€β”€ auth/               # Auth endpoints
β”‚       β”‚   β”œβ”€β”€ download/           # Short link resolution + streaming
β”‚       β”‚   β”œβ”€β”€ file/               # File management endpoints
β”‚       β”‚   β”œβ”€β”€ health/             # GET /api/health
β”‚       β”‚   β”œβ”€β”€ shortlink/          # Short link CRUD
β”‚       β”‚   β”œβ”€β”€ tagging/            # Tag & unified search
β”‚       β”‚   └── user/               # User profile endpoints
β”‚       β”œβ”€β”€ service/
β”‚       β”‚   β”œβ”€β”€ compression/        # GZIP strategy + factory pattern
β”‚       β”‚   β”œβ”€β”€ deduplication/      # SHA-256 hash dedup
β”‚       β”‚   β”œβ”€β”€ download/           # Download validation + streaming
β”‚       β”‚   β”œβ”€β”€ file/               # File CRUD, versioning, preview
β”‚       β”‚   β”œβ”€β”€ ratelimit/          # Sliding window rate limiter
β”‚       β”‚   β”œβ”€β”€ shortlink/          # Short link lifecycle
β”‚       β”‚   β”œβ”€β”€ storage/            # AWS S3 storage service (SDK v2)
β”‚       β”‚   β”œβ”€β”€ tagging/            # Auto-tag generation & search
β”‚       β”‚   └── upload/             # Upload orchestration
β”‚       β”œβ”€β”€ security/
β”‚       β”‚   β”œβ”€β”€ firebase/           # Firebase token filter
β”‚       β”‚   └── ratelimit/          # Redis sliding window limiter
β”‚       β”œβ”€β”€ model/
β”‚       β”‚   β”œβ”€β”€ entity/             # JPA entities (File, FileGroup, User, Tag, ShortLink…)
β”‚       β”‚   └── dto/                # Request/Response DTOs
β”‚       β”œβ”€β”€ repository/             # Spring Data JPA repositories
β”‚       └── config/
β”‚           β”œβ”€β”€ firebase/           # FirebaseInitializer (env-var + classpath fallback)
β”‚           β”œβ”€β”€ redis/              # RedisConfig (Upstash TLS support)
β”‚           β”œβ”€β”€ s3/                 # S3Config (AWS SDK v2)
β”‚           └── SecurityConfig.java # CORS, auth filter chain
β”‚
└── frontend/                       # React + Vite application
    β”œβ”€β”€ vercel.json                 # SPA rewrite β€” all routes β†’ index.html
    └── src/
        β”œβ”€β”€ api/                    # Axios client with auth interceptor
        β”œβ”€β”€ auth/                   # Firebase config & auth helpers
        β”œβ”€β”€ components/
        β”‚   β”œβ”€β”€ layout/             # AppLayout, Navbar, Sidebar
        β”‚   └── ui/                 # FileCard, Loader, ShortLinkModal…
        β”œβ”€β”€ context/                # AuthContext (Firebase state)
        β”œβ”€β”€ hooks/                  # Custom React hooks
        β”œβ”€β”€ pages/
        β”‚   β”œβ”€β”€ Dashboard.jsx       # Overview stats
        β”‚   β”œβ”€β”€ Upload.jsx          # File upload with duplicate detection
        β”‚   β”œβ”€β”€ MyFiles.jsx         # File grid with actions
        β”‚   β”œβ”€β”€ FileDetails.jsx     # Per-file analytics, versions, links, preview
        β”‚   β”œβ”€β”€ TagSearch.jsx       # Unified name + tag search
        β”‚   β”œβ”€β”€ Analytics.jsx       # Top downloads leaderboard
        β”‚   β”œβ”€β”€ BandwidthSavings.jsx# Compression savings metrics
        β”‚   β”œβ”€β”€ Settings.jsx        # User profile & preferences
        β”‚   β”œβ”€β”€ AdminDashboard.jsx  # Admin system overview
        β”‚   β”œβ”€β”€ FileAccess.jsx      # Public short link download page (state machine UI)
        β”‚   β”œβ”€β”€ Login.jsx           # Login page
        β”‚   └── Register.jsx        # Registration page
        └── routes/                 # ProtectedRoute, AdminRoute, AdminRouteGuard

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m "feat: add my feature"
  4. Push to the branch: git push origin feature/my-feature
  5. Open a Pull Request

Built with ❀️ using Spring Boot, React, AWS S3, and Firebase.

About

SmartShare is a full-stack intelligent file-sharing SaaS platform built with React.js and Spring Boot, featuring secure file uploads, AWS S3 storage, Redis-powered caching, Firebase OAuth authentication, file versioning, analytics dashboards, smart compression, deduplication, and secure short-link sharing.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages