A production-grade, secure file vault system engineered with Go, React, and PostgreSQL. It features efficient, deduplicated storage, powerful search capabilities, and granular file sharing controls, all designed for scalability and a seamless user experience.
A comprehensive, interactive API specification has been meticulously documented using Postman. It details every endpoint, request/response model, and includes multiple examples for success and error cases, providing a clear and professional contract for the API.
This project fulfills all core requirements of the capstone task and goes further by implementing several bonus features to enhance functionality, security, and user experience.
- 🗂️ Efficient Storage with Deduplication: Employs SHA-256 content hashing to ensure that identical files are only stored once, with a reference counting system to manage ownership and deletions. This provides significant storage savings, which are tracked and displayed to the user.
- 🚀 Advanced File Uploads: A modern, responsive UI supporting single, multiple, and drag-and-drop file uploads. The system performs both client-side and server-side MIME type validation to prevent content mismatches.
- 🤝 Powerful Sharing Capabilities:
- Public Sharing: Generate a public link for any file, making it accessible to anyone.
- Private Sharing: Share files directly and securely with other registered users on the platform.
- 🔍 Advanced Search & Filtering: A powerful, multi-filter search engine allowing users to query files by filename, MIME type, size range, and date range.
- 📊 Storage Analytics: A dedicated analytics dashboard for users to visualize their storage usage, including a clear breakdown of savings achieved through deduplication.
- 🖥️ Admin Panel: An administrative dashboard providing a system-wide view of all files, user details, and download statistics.
- ☁️ Full Cloud Deployment: The entire application stack is deployed on modern cloud infrastructure: Vercel for the frontend, Render for the backend Go API, and Supabase for the PostgreSQL database.
- 🔐 Role-Based Access Control (RBAC): A robust RBAC system is implemented, distinguishing between
userandadminroles to secure administrative endpoints. - 📜 Comprehensive Audit Logs: The system records all critical file activities (upload, download, share, delete), providing a complete audit trail for user actions.
- 📄 In-Browser PDF Previews: Users can preview
.pdffiles directly within the application, enhancing convenience and workflow. - 📈 Real-Time Upload Progress: The frontend provides a visual progress bar during uploads, offering a superior user experience.
The architecture is designed for scalability and maintainability, leveraging a modern, production-ready tech stack.
A detailed write-up on the system design and architectural decisions is available here: Architecture.md
The database is structured to support the application's features efficiently, with a clear separation between user file metadata and the physical, deduplicated file records.
The complete schema and migration files are version-controlled and located in the /supabase/migrations directory.
Entity-Relationship Diagram of the KeyVia Database
The entire application stack can be run locally with a single command using Docker Compose.
git clone [https://github.com/Abhishekkjainn/BalkanID-Task.git](https://github.com/Abhishekkjainn/BalkanID-Task.git)
cd BalkanID-TaskCreate .env files for both the backend and frontend by copying the provided .env.example files.
Backend (backend/.env):
cp backend/.env.example backend/.envUpdate backend/.env with your local PostgreSQL connection string and a unique JWT secret.
Frontend (frontend/keyvia/.env):
cp frontend/keyvia/.env.example frontend/keyvia/.envThe VITE_API_BASE_URL is already configured for local development.
From the root directory of the project, run the following command to build and start all services:
docker-compose up --buildThe services will be available at:
- Frontend (React App):
http://localhost:5173 - Backend (Go API):
http://localhost:8080
