Before getting started, ensure you have the following installed on your machine:
-
Python (latest version recommended)
-
Node.js & npm (for the frontend)
-
Virtual Environment (for Python dependencies)
-
MongoDB: Ensure IP address is whitelisted in Mongo
-
Redis: Set up Redis running on port 6379 on the localhost/127.0.0.1
note: Redis is Linux native, so this will need to be run in WSL on Windows
-
Create & Activate a Virtual Environment (if not already set up):
python -m venv venv # Create a virtual environment source venv/bin/activate # Mac/Linux venv\Scripts\activate # Windows
-
Install Python Dependencies:
pip install -r requirements.txt
-
Generate Redis Secret Key:
python -c "import secrets; print(secrets.token_hex())" export SECRET_KEY=<TOKEN_FROM_ABOVE>
Note: use set if on Windows
-
Start the Backend:
python app.py
- Navigate to the Frontend Directory:
cd student-section-frontend
- Install React Dependencies:
npm ci
- Start the Frontend:
npm start
- Your backend should now be running on
http://127.0.0.1:5000
- Your frontend should be accessible at
http://localhost:3000
- Keep both processes running in separate terminal windows or use a split terminal