A secure, privacy-focused file sharing platform with end-to-end encryption using zero-knowledge architecture. Deployed with Kubernetes and automated CI/CD.
- Zero-Knowledge Encryption: Files are encrypted client-side with RSA-OAEP-2048 and AES-256-GCM
- Public Link Sharing: Share files via password-protected public links with download limits
- Secure File Sharing: Share encrypted files with other users
- Dark Mode: Persistent theme preference with light/dark mode toggle
- Real-time Notifications: WebSocket-based notification system
- Usage Tracking: Monitor storage usage and file statistics
- Key Backup Management: Secure backup and recovery of encryption keys
- Responsive UI: Modern, mobile-friendly interface built with React and Tailwind CSS
- Kubernetes Deployment: Production-ready container orchestration
- CI/CD Pipeline: Automated builds and deployments with GitHub Actions
- API Gateway (Port 8000): Routes requests to appropriate services
- Auth Service (Port 8001): User authentication and JWT management
- File Service (Port 8002): File upload, download, and storage
- Metadata Service (Port 8003): File metadata and sharing management
- Subscription Service (Port 8004): User subscription management
- Notification Service (Port 8005): Real-time notifications via WebSocket
- React 19 with Vite
- Tailwind CSS for styling
- shadcn/ui component library
- Client-side encryption with Web Crypto API
- Dark mode with persistent localStorage
- MongoDB 7: Document storage for users, files, and metadata
-
Clone the repository
git clone https://github.com/yourusername/zkshare.git cd zkshare -
Set up environment variables
cd zkshare-backend cp .env.example .env # Edit .env and set your JWT_SECRET
-
Build and run with Docker Compose
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- API Gateway: http://localhost:8000
For local development without Docker:
Backend:
cd zkshare-backend
go mod download
# Run individual services
go run cmd/api-gateway/main.goFrontend:
cd zkshare-frontend
pnpm install
pnpm devzkshare/
βββ zkshare-backend/ # Go microservices
β βββ cmd/ # Service entry points
β βββ internal/ # Business logic
β βββ pkg/ # Shared packages
β βββ migrations/ # Database migrations
β βββ docker-compose.yml # Docker orchestration
βββ zkshare-frontend/ # React application
β βββ src/
β β βββ components/ # React components
β β βββ contexts/ # React contexts
β β βββ lib/ # Utilities and API clients
β β βββ config/ # Feature flags
β βββ public/ # Static assets
βββ k8s/ # Kubernetes manifests
β βββ namespace.yaml
β βββ auth/ # Auth service deployment
β βββ file/ # File service deployment
β βββ gateway/ # API gateway deployment
β βββ frontend/ # Frontend deployment
β βββ mongo/ # MongoDB deployment
β βββ secrets/ # Secret templates
βββ infra/
β βββ kind/ # Kind cluster config
βββ .github/
βββ workflows/ # CI/CD pipelines
βββ ci.yaml # Build and push
βββ cd.yaml # Deploy to Kind
- Client-Side Encryption: All files are encrypted in the browser before upload
- Zero-Knowledge: Server never has access to unencrypted data or encryption keys
- Secure Key Management: RSA key pairs generated and stored locally
- JWT Authentication: Secure token-based authentication
- CORS Protection: Configured CORS policies
Backend:
- Go 1.23
- MongoDB Driver
- JWT-Go
- Gorilla WebSocket
- Gorilla Mux
Frontend:
- React 19
- Vite
- Tailwind CSS
- shadcn/ui
- Lucide Icons
- Web Crypto API
Infrastructure:
- Docker & Docker Compose
- Kubernetes (Kind for local, ready for cloud)
- GitHub Actions (CI/CD)
- GitHub Container Registry (GHCR)
- Nginx (Frontend serving)
- MongoDB 7
DevOps:
- Container Orchestration (Kubernetes)
- Infrastructure as Code (K8s YAML manifests)
- Automated CI/CD pipelines
- Multi-stage Docker builds
- Secret management
- Health checks & liveness probes
POST /auth/register- Register new userPOST /auth/login- User loginGET /auth/verify- Verify JWT token
POST /files/upload- Upload encrypted fileGET /files/list- List user's filesGET /files/download/:id- Download fileDELETE /files/:id- Delete file
POST /files/public-share- Create public share linkGET /files/public/:shareId- Get public share infoPOST /files/public/:shareId/download- Download via public link (no auth)GET /files/my-public-shares- List your public sharesDELETE /files/public-share/:shareId- Delete public share
POST /metadata/share- Share file with userGET /metadata/shared- Get files shared with userDELETE /metadata/share/:id- Revoke file sharing
Configure features in zkshare-frontend/src/config/features.js:
SUBSCRIPTIONS_ENABLED: false, // Hide subscription features
USAGE_TRACKING_ENABLED: true // Show usage statisticsServices won't start:
docker-compose down
docker-compose up -d --buildMongoDB connection issues:
docker-compose logs mongoFrontend build errors:
cd zkshare-frontend
pnpm install
docker-compose build frontend- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
Yash
- Zero-knowledge encryption inspired by modern privacy-focused applications
- UI components from shadcn/ui
- Icons from Lucide