This project is a cloud-based file collaboration platform with a React frontend and a Node.js/Express backend.
Screencast.from.2026-01-19.12-46-39.mp4
backend/: Contains the Node.js/Express API.frontend/: Contains the React application.
Follow these steps to set up and run the project locally.
- Node.js (LTS version recommended)
- npm or yarn
- AWS Account with S3 bucket and credentials (for document storage)
- Log in to your AWS Management Console.
- Navigate to the S3 service.
- Create a new S3 bucket. Choose a unique name (e.g.,
your-app-name-documents). - Ensure the bucket is configured for public access if your application requires it, or configure appropriate bucket policies for access from your backend.
- Note down the bucket name and the region it's created in.
Navigate to the backend directory:
cd backendnpm install
# or
yarn installCreate a .env file in the backend/ directory based on .env.example (if available, otherwise create these variables):
PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
AWS_ACCESS_KEY_ID=your_aws_access_key_id
AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key
AWS_REGION=your_aws_region
S3_BUCKET_NAME=your_s3_bucket_name
NODE_ENV=development
USE_LOCALSTACK=true
MONGO_URI: Your MongoDB connection string. If you're using a local MongoDB, it might bemongodb://localhost:27017/filecollab.JWT_SECRET: A strong, random string for JWT token signing.AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_REGION,S3_BUCKET_NAME: Your AWS credentials and S3 bucket details for document storage.NODE_ENV: Set todevelopmentfor local development.USE_LOCALSTACK: Set totrueif you are using LocalStack for local AWS services.
First, initialize the database (creates necessary collections/indexes if they don't exist):
node initDb.jsThen, seed the database with sample users and documents:
node seedDb.jsnpm start
# or
yarn startThe backend API will be running at http://localhost:5000 (or your specified PORT).
Open a new terminal and navigate to the frontend directory:
cd frontendnpm install
# or
yarn installCreate a .env file in the frontend/ directory.
VITE_API_BASE_URL=http://localhost:5000/api
VITE_API_BASE_URL: Should point to your backend API URL.
npm run dev
# or
yarn devThe frontend application will typically open in your browser at http://localhost:5173 (or another port if 5173 is in use).
After seeding the database, you can log in with the following sample users, all using the password password123:
- Alice Smith:
alice@example.com - Bob Johnson:
bob@example.com - Charlie Brown:
charlie@example.com - Diana Prince:
diana@example.com - Eve Adams:
eve@example.com
Feel free to register new users through the application's registration page as well.