Welcome to Cloud9 (formerly DRIVE_clone)! This guide will walk you through the project in simple terms, making it easy for beginners to set up, understand, and contribute.
Cloud9 is a modern web application built using Node.js, Express, and MongoDB. It uses EJS for server-side rendering along with Tailwind CSS and Flowbite for sleek, responsive styling.
- 🔒 Secure Authentication: User registration and login with encrypted passwords.
- 🌙 Modern UI: Responsive design with full dark mode support.
- ☁️ Cloud Storage: Direct file uploads to Firebase.
- ⏱️ Demo Mode (New!): Limit uploads, enforce a 24-hour TTL (Time-To-Live) on files, and enable a one-click guest login bypass.
- 🗑️ File Management (New!): Upload files via a drag-and-drop modal (now showing selected file names) and easily delete them from both the database and Firebase storage.
- Backend: Node.js, Express, JWT, bcrypt
- Frontend: EJS, Tailwind CSS, Flowbite
- Database: MongoDB, Mongoose
- Storage: Firebase Cloud Storage, Multer
We've recently introduced a Demo Mode (DEMO_MODE=true in .env) tailored for public showcases:
- Guest Login Bypass: Disables new registrations and pre-fills the login page with a
guest/guest123account that bypasses the database completely. - File Upload Limits: Caps uploads at 5 files per account and restricts file sizes to 100 KB.
- 24-Hour Auto-Deletion: Automatically deletes uploaded files after 24 hours using MongoDB TTL indexes and UI banners to notify users.
- Enhanced UI:
- A functional delete button allows users to immediately delete their files.
- The drag-and-drop upload form now displays the selected file name before submission.
/DRIVE_clone
│
├── app.js # Main entry point of the application.
├── .env # Environment variables (MongoDB URI, JWT secret).
├── config/ # Database, Firebase, and Multer configs.
├── models/ # Mongoose schemas (User, Files).
├── middlewares/ # JWT authentication middleware.
├── routes/ # Express routes (index, user).
├── views/ # EJS templates (home, login, register).
└── public/ # Static assets (logo.svg).
- Node.js and npm installed.
- MongoDB running locally or a connection string ready.
- A Firebase project configured with Cloud Storage.
-
Clone & Install
git clone <your-repo-url> cd DRIVE_clone yarn install
-
Environment Variables Copy the example environment file:
cp .env.example .env
Update
.envwith your credentials:MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_secure_random_string DEMO_MODE=false # Set to true to enable demo features
-
Set Up Firebase
- Create a project in the Firebase Console.
- Generate a private key (Project Settings > Service Accounts).
- Save the JSON file as
firebase-credentials.jsonin the root. - Update
config/firebase.config.jswith your Firebase bucket name.
Start the server:
yarn startThe server will run on http://localhost:3000.
- Login:
http://localhost:3000/user/login - Register:
http://localhost:3000/user/register(UnlessDEMO_MODE=true) - Home:
http://localhost:3000/home
- Never commit
.envor Firebase credential files. - Keep your JWT secret secure and randomly generated.
- Regularly rotate Firebase credentials in production.
Enjoy exploring and developing Cloud9!



