A minimal, secure cloud storage service with a focus on privacy and accessibility.
- The Problem
- The Solution
- Key Features
- Tech Stack
- Architecture & Core Concepts
- Getting Started
- Challenges Faced
- Future Scope
- Contributing
Most major cloud storage platforms require tying your account to a personal identity (like a Google or Apple account), which can lead to privacy concerns. Furthermore, the risk of forgetting to log out on a shared or public computer is a significant security liability.
CloudVault offers a straightforward and secure file storage solution using traditional email and password authentication with JWT. It provides a familiar, intuitive user interface similar to Google Drive’s navigation, ensuring a private and accessible user experience without relying on external identity providers.
- JWT-Based Authentication: Secure and private login using only an email and password.
- Full File Management: Supports file upload, delete, rename, and folder creation.
- Intuitive Navigation: Features a breadcrumb-based navigation system, mimicking the user experience of Google Drive.
- Modern UI/UX: A fully responsive layout with a user-friendly drag-and-drop interface for file uploads.
- Privacy-Focused: No external identity providers or tracking analytics.
- Isolated Storage: Each user's files and folder hierarchy are completely isolated from other users.
| Frontend | Backend | Auth | Storage | Deployment |
|---|---|---|---|---|
| React | Node.js | JWT | Supabase | Vercel |
| Tailwind CSS | Express | bcrypt | Netlify |
The application is built with a classic client-server architecture, focusing on secure, stateless authentication and isolated file management.
- High-Level Architecture: An overview of the client, server, and storage interactions.
- Database Schema: The ERD for the user and file metadata.
For a deeper dive into the core logic, visit here
Follow these instructions to get a local copy of the project up and running for development.
- Node.js (v16 or newer)
- npm or Yarn
- PostgreSQL database
-
Clone the repository:
git clone https://github.com/addy118/cloudvault.git cd cloudvault -
Install dependencies: You will need to do this for both the
clientandserverdirectories.# Install server dependencies cd server npm install # Install client dependencies cd ../client npm install
-
Set up environment variables: In the
serverdirectory, create a.envfile and populate it with your credentials.How to Generate Secrets: For
ACCESS_TOKEN,REFRESH_TOKEN, andSECRET, you can generate secure random strings by running the following command in your terminal:node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"# --- General Settings --- PORT=3000 IS_PROD=false # --- JWT Secrets (Generate these yourself) --- # Run `openssl rand -hex 32` in your terminal to generate secure secrets ACCESS_TOKEN=your_generated_access_token_secret REFRESH_TOKEN=your_generated_refresh_token_secret SECRET=your_generated_jwt_secret # --- Development Database --- # Your local PostgreSQL connection string DATABASE_URL="postgresql://YOUR_DB_USER:YOUR_DB_PASSWORD@localhost:5432/cloud-vault?schema=public" # --- Supabase (Optional, if you use it for storage/DB) --- # Get these from your Supabase project settings SUPABASE_URL=your_supabase_project_url SUPABASE_KEY=your_supabase_anon_key SUPABASE_DB_PASS=your_supabase_db_password PROJECT_ID=your_supabase_project_id # A default password if needed for seeding or other scripts USER_PASS=a_strong_default_password
-
Run database migrations: From the
serverdirectory, apply the database schema.cd server npx prisma migrate dev -
Start the development servers: You need to run the backend and frontend servers in separate terminals.
# In your first terminal, from the /server directory npm run dev # In your second terminal, from the /client directory npm run dev
- Ensuring secure, stateless access control without creating persistent login sessions that could be a liability on shared devices.
- Structuring the file storage system to support nested folders while guaranteeing strict user isolation.
- Building a responsive and dynamic breadcrumb navigation component that correctly syncs with the file path state.
- File Previews: Add in-app previews for common file types like PDF, images, and text documents.
- Cloud Storage Integration: Migrate the storage backend from the local filesystem to a cloud service like AWS S3 or Cloudinary for scalability.
- Sharing Features: Enable multi-user file/folder sharing and secure, link-based access.
- Two-Factor Authentication (2FA): Implement 2FA for an additional layer of account security.
Contributions are welcome! Please fork the repository and create a pull request with your changes. For major updates, please open an issue first to discuss the proposed change.