Frive is a lightweight Google Drive–like storage application built with Node.js and Express.js. It allows users to create folders, upload files, move and rename them, and download content — all stored via Supabase and managed in a PostgreSQL database with Prisma ORM.
demo.mp4
-
Authentication
- Local authentication with Passport.js
- JWT-based authentication for protected routes
-
Storage
- Supabase integration for file storage
- Multer for file uploads
-
Database
- PostgreSQL with Prisma ORM
-
Views
- EJS for rendering server-side views
-
Folder Management
- Create, delete, rename, move folders
- Nested folder support
-
File Management
- Upload, delete, rename, move files
- Download files from storage
| Category | Technology |
|---|---|
| Runtime | Node.js |
| Framework | Express.js |
| Auth | Passport.js (Local & JWT) |
| ORM | Prisma |
| Database | PostgreSQL |
| Storage | Supabase |
| Upload Handling | Multer |
| Views | EJS |
git clone https://github.com/yourusername/Frive.git
cd Frivenpm installCreate a .env file with:
DATABASE_URL=postgresql://user:password@localhost:5432/frive
SUPABASE_URL=your_supabase_project_url
SUPABASE_KEY=your_supabase_key
BUCKET_NAME=your_supabase_bucket_name
JWT_SECRET=your_jwt_secret
PORT=port_processnpx prisma migrate devnpm run dev| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Home page (auth landing) |
| GET | /signup |
Signup form |
| POST | /signup |
Create new account |
| GET | /login |
Login form |
| POST | /login |
Authenticate and redirect to /mystorage |
| Method | Endpoint | Description |
|---|---|---|
| GET | /mystorage |
Main storage view (auth req) |
| GET | /mystorage/logout |
Logout and clear cookies |
| Method | Endpoint | Description |
|---|---|---|
| GET | /:id |
Open folder |
| POST | /:id |
Create subfolder |
| PUT | /:id/rename |
Rename folder |
| PUT | /move/:id |
Move folder |
| DELETE | /:id |
Delete folder |
| Method | Endpoint | Description |
|---|---|---|
| POST | /:folderId |
Upload file |
| GET | /:id |
Show file details |
| PUT | /:id/rename |
Rename file |
| PUT | /:id/move |
Move file |
| DELETE | /:id |
Delete file |
| GET | /:id/download |
Download file |
- isAuth — Ensures the user is authenticated.
- populateUser — Loads user info for request handling.
- populateMainFolder — Loads user's root folder.
- handleUploads — Multer setup for handling file uploads.
- signToken — Signs JWT after successful login and assign cookies.
- Drag-and-drop file upload
- File preview in browser
- Sharing files via link
- Real-time collaboration
This project is licensed under the MIT License.