This document provides detailed instructions for setting up the Time Table Generator project.
- Prerequisites
- Backend Setup
- Frontend Setup
- Docker Setup
- Docker Compose Setup
- Running the Tests
- Troubleshooting Tips
- Integration Setup
Before setting up the project, ensure you have the following installed on your system:
- Python 3.9 or higher
- Node.js 14 or higher
- Docker
- Docker Compose
- Clone the repository:
git clone https://github.com/your-username/time-table-generator.git
cd time-table-generator
- Navigate to the
Backend
directory:
cd Backend
- Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the required dependencies:
pip install -r requirements.txt
- Create a
.env
file in theBackend
directory and add the following environment variables:
MONGODB_CONNECTION_STRING=mongodb://localhost:27017/timetable
SECRET_KEY=your_secret_key
- Start the backend server:
uvicorn app:app --reload
- Navigate to the root directory of the project:
cd ..
- Install the required dependencies:
npm install
- Start the frontend development server:
npm start
- Build the Docker image:
docker build -t timetable-generator .
- Run the Docker container:
docker run -p 8000:8000 timetable-generator
- Start the services using Docker Compose:
docker-compose up
- Install the required dependencies:
pip install -r Backend/requirements.txt
- Navigate to the
Backend
directory:
cd Backend
- Run the tests using
pytest
:
pytest
- Install the required dependencies:
npm install
- Run the tests using
Jest
:
npm test
-
Issue: Backend server not starting. Solution: Ensure that the MongoDB server is running and the connection string in the
.env
file is correct. -
Issue: Frontend server not starting. Solution: Ensure that all dependencies are installed correctly by running
npm install
again. -
Issue: Docker container not starting. Solution: Check the Docker logs for any errors and ensure that the Docker daemon is running.
-
Issue: Tests failing. Solution: Ensure that all dependencies are installed correctly and that the backend server is running before running the tests.
-
Create a Trello account and obtain your API key and token from the Trello Developer Portal.
-
Add the following environment variables to your
.env
file in theBackend
directory:
TRELLO_API_KEY=your_trello_api_key
TRELLO_TOKEN=your_trello_token
- Restart the backend server to apply the changes.
-
Create an Asana account and obtain your Personal Access Token from the Asana Developer Portal.
-
Add the following environment variables to your
.env
file in theBackend
directory:
ASANA_ACCESS_TOKEN=your_asana_access_token
- Restart the backend server to apply the changes.