Collaborative-Edge is a full-stack application featuring a React-based frontend and a Node.js/Express backend, connected to a MongoDB database. The project is designed to facilitate concurrent development and execution of both the frontend and backend, making it ideal for collaborative projects.
- Project Structure
- Prerequisites
- Setup Instructions
- Running the Project
- Frontend Overview
- Backend Overview
- Contributing
- License
Collaborative_Edge/
├── frontend/ # React frontend (Vite)
│ ├── node_modules/ # Frontend dependencies (not pushed to Git)
│ ├── public/ # Static assets
│ ├── src/ # React source code
│ ├── .env # Frontend environment variables (not pushed to Git)
│ ├── package.json # Frontend dependencies and scripts
│ └── ... # Other frontend files
├── backend/ # Node.js/Express backend
│ ├── node_modules/ # Backend dependencies (not pushed to Git)
│ ├── models/ # MongoDB models
│ ├── routes/ # API routes
│ ├── .env # Backend environment variables (not pushed to Git)
│ ├── index.js # Backend entry point
│ ├── package.json # Backend dependencies and scripts
│ └── ... # Other backend files
├── node_modules/ # Node.js dependencies (not pushed to Git)
├── package.json # Root package.json for concurrent execution
└── README.md # Project documentation
Before running the project, ensure you have the following installed:
- Node.js (v16 or higher recommended)
- npm (comes with Node.js)
- MongoDB (running locally or a connection string to a remote instance)
-
Clone the repository:
git clone https://github.com/Umair-Habibx123/FYP_CE.git cd FYP_CE -
Install root dependencies:
npm install -g concurrently npm install --save-dev concurrently
-
Install frontend dependencies:
cd frontend npm install -
Install backend dependencies:
cd ../backend npm install -
Set up environment variables:
- Frontend: Create a
.envfile in thefrontenddirectory and add necessary variables (e.g., API endpoints). - Backend: Create a
.envfile in thebackenddirectory and add your MongoDB connection string and other required variables.
- Frontend: Create a
From the root directory, run:
npm run startThis command will concurrently start:
- The frontend development server (using Vite).
- The backend server (using
nodemonfor hot-reloading).
The frontend is built using React with Vite for fast development. It includes:
public/: Static assets like images and HTML files.src/: React components, styles, and application logic..env: Environment variables for the frontend.
cd frontend
npm run devThe backend is built using Node.js and Express, with MongoDB as the database. It includes:
models/: MongoDB schemas and models.routes/: API routes and controllers..env: Environment variables for the backend.
cd backend
nodemon index.jsThis project uses MongoDB (Atlas). Follow these steps:
- Create a free cluster at MongoDB Atlas
- Whitelist your IP address.
- Create a database user and password.
- Copy the connection string into your .env: MONGO_URI=mongodb+srv://:@cluster0.mongodb.net/collaborativeEdge
- Models are automatically created in MongoDB when used in the backend code (no SQL migrations needed).
- If seed data is required, contact me.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes.
- Push your branch and open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
Developed by Umair Habib.