This guide provides step-by-step instructions to set up and run the project after cloning it from GitHub.
- Git: You need Git installed to clone the repository.
- Python 3: Ensure Python 3 is installed. (Download Python)
- Node.js and npm: Ensure Node.js (which includes npm) is installed. (Download Node.js)
-
Clone the Repository: Open your terminal or command prompt and run:
git clone https://github.com/Piyushiitk24/CS661_Course_Project.git cd CS661_Course_Project -
Create and Activate Python Virtual Environment: It's recommended to use a virtual environment.
# Create a virtual environment named 'venv' (you can choose another name) python3 -m venv venv # Activate the virtual environment # On macOS/Linux: source venv/bin/activate # On Windows: # .\venv\Scripts\activate
You should see
(venv)at the beginning of your terminal prompt. -
Install Python Dependencies: Install all required Python packages.
pip install -r requirements.txt
-
Install Node.js Dependencies for Module_Aakriti: Navigate to the
Module_Aakritidirectory and install its dependencies.cd Module_Aakriti npm install cd ..
-
Install Node.js Dependencies for Module_Sankhadeep: Navigate to the
Module_Sankhadeep/clientdirectory and install its dependencies.cd Module_Sankhadeep/client npm install cd ../..
- Start the Servers:
Make sure you are in the main project directory (
CS661_Course_Project) and your virtual environment (venv) is activated. Run the start script:Leave this terminal running. It hosts all the necessary backend and frontend servers.python start_all.py
- Open in Browser: Open your web browser and go to: http://localhost:5173
-
Close the Server Terminal: First, close the terminal window where
python start_all.pyis running (e.g., by pressingCtrl+Cand then closing the window). -
Run the Stop Script: Open a new terminal, navigate to the project's root directory (
CS661_Course_Project), and run:python stop_all.py
(Use
python3 stop_all.pyifpythondoes not point to Python 3 on your system). This ensures all server processes are properly stopped and ports are freed.
- Error: "Address already in use" (e.g., Port 5001):
This usually means a previous server process didn't shut down correctly.
- Make sure you have closed any previous server terminals.
- Run the stop script from the project root directory:
python stop_all.py
- Try running
python start_all.pyagain. - If the error persists, you might need to manually find and stop the process using the port. Replace
5001with the specific port number from the error message:Then, try# Find the process ID (PID) using the port lsof -ti :5001 # Stop the process using the PID found above (replace <PID> with the actual number) kill <PID>
python start_all.pyagain.
npm installfails: Ensure Node.js and npm are correctly installed and accessible in your terminal path.pip installfails: Ensure Python 3 and pip are correctly installed and your virtual environment is active. Check for any specific error messages during installation.