{"id":30232163,"url":"https://github.com/kapilsinghnegi/project-drive","last_synced_at":"2026-04-04T20:32:02.156Z","repository":{"id":307904160,"uuid":"1030741875","full_name":"kapilsinghnegi/project-drive","owner":"kapilsinghnegi","description":"A Google Drive-inspired backend app using Node.js, Express, MongoDB, and Supabase Storage for secure user authentication, file upload, management, and download.","archived":false,"fork":false,"pushed_at":"2025-08-03T17:28:56.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-14T23:21:25.249Z","etag":null,"topics":["ejs","express","jwt","mongodb","mongoose","multer","nodejs","supabase-storage"],"latest_commit_sha":null,"homepage":"https://project-drive-x53s.onrender.com","language":"EJS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kapilsinghnegi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-02T08:15:04.000Z","updated_at":"2025-08-03T17:51:41.000Z","dependencies_parsed_at":"2025-08-02T23:35:31.853Z","dependency_job_id":"e5a1369c-557c-4a0b-a1a1-ce2777c12f41","html_url":"https://github.com/kapilsinghnegi/project-drive","commit_stats":null,"previous_names":["kapilsinghnegi/project-drive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kapilsinghnegi/project-drive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilsinghnegi%2Fproject-drive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilsinghnegi%2Fproject-drive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilsinghnegi%2Fproject-drive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilsinghnegi%2Fproject-drive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kapilsinghnegi","download_url":"https://codeload.github.com/kapilsinghnegi/project-drive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kapilsinghnegi%2Fproject-drive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31413267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ejs","express","jwt","mongodb","mongoose","multer","nodejs","supabase-storage"],"created_at":"2025-08-14T23:12:24.166Z","updated_at":"2026-04-04T20:32:02.149Z","avatar_url":"https://github.com/kapilsinghnegi.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Drive\n\nA Google Drive-like backend built with Node.js, Express, MongoDB, Supabase Storage, and JWT authentication.\nThis project allows users to register, log in, upload files, and download them securely. It uses Supabase for file storage and MongoDB for user management.\nThis is a simple implementation of a file storage system similar to Google Drive, focusing on backend functionality.\n\n## Features\n\n- User registration and login\n- JWT-based authentication\n- File upload (stored in Supabase Storage)\n- File download (from Supabase Storage)\n- User-specific file access\n- Secure file storage and retrieval\n\n## Tech Stack\n\n- Node.js\n- Express\n- MongoDB (Mongoose)\n- Supabase Storage\n- Multer (for file uploads)\n- JWT (jsonwebtoken)\n- EJS (templating)\n\n## Getting Started\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/yourusername/drive-clone.git\n   cd drive-clone\n   ```\n\n2. **Install dependencies:**\n\n   ```sh\n   npm install\n   ```\n\n3. **Configure environment variables:**\n\n   - Copy `.env.example` to `.env` and fill in your credentials:\n     ```\n     MONGO_URI=your_mongo_uri\n     JWT_SECRET=your_jwt_secret\n     SUPABASE_URL=your_supabase_url\n     SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key\n     ```\n\n4. **Start the server:**\n\n   ```sh\n   npm start\n   ```\n\n5. **Access the app:**\n   - Visit `http://localhost:3000` in your browser.\n\n## Folder Structure\n\n```\nproject-drive/\n  app.js\n  config/\n    db.js\n    multer.config.js\n    supabaseClient.js\n  middlewares/\n    auth.js\n  models/\n    files.models.js\n    user.model.js\n  routes/\n    index.routes.js\n    user.routes.js\n  views/\n    home.ejs\n    index.ejs\n    login.ejs\n    register.ejs\n  .env\n  package.json\n  README.md\n```\n\n## API Routes\n\n### **Authentication \u0026 User**\n\n- `GET /user/register` — Render registration page\n- `POST /user/register` — Register a new user\n- `GET /user/login` — Render login page\n- `POST /user/login` — Login user and issue JWT\n- `GET /user/logout` — Logout user\n\n### **Home \u0026 Dashboard**\n\n- `GET /` — Render landing page\n- `GET /home` — Render user dashboard (requires authentication)\n\n### **File Operations**\n\n- `POST /upload` — Upload a file (authenticated, stores in Supabase Storage)\n- `GET /download/:path` — Download a file by its Supabase Storage path (authenticated)\n- `GET /files` — List all files for the logged-in user (authenticated)\n- `DELETE /file/:id` — Delete a file by its database ID (authenticated)\n\n\u003e **Note:**  \n\u003e All file routes require the user to be authenticated via JWT.\n\n**Security Note:**  \nNever expose your Supabase service role key on the frontend.  \nThis project is intended for educational purposes. Always follow best practices for security in production applications.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapilsinghnegi%2Fproject-drive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkapilsinghnegi%2Fproject-drive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkapilsinghnegi%2Fproject-drive/lists"}