This section provides a comprehensive guide to setting up the BugSnapper project on your local machine.
This section walks you through the process of setting up the BugSnapper backend, which is built using FastAPI, on your local machine.
Clone the repository to your local machine using the following command:
https://github.com/CS3213-Team-8/bug_analysis_BE.git
Navigate to the project directory and create a virtual environment:
cd bug_analysis_BE
python -m venv venv
Activate the virtual environment:
venv\Scripts\activate
source venv/bin/activate
Then, there are two ways to set up the backend. You can either use Docker or set it up manually.
If you prefer to use Docker, ensure you have Docker installed on your machine. Then, run the following command in the project directory:
docker-compose up
If you prefer to set up the backend manually, follow these steps:
pip install -r requirements.txt
.env file in the root of the project directory and add the following environment variables:DATABASE_URL=""
SECRET_KEY=""
OPENAI_API_KEY=""
Replace the values with your PostgreSQL database URL, a secret key for JWT authentication, and your OpenAI API key.
CREATE DATABASE devdb;
python main.py
[Note: You may have to use Base.metadata.create_all(bind=engine) to create the database tables if they do not exist.]
This section walks you through the process of setting up the BugSnapper frontend, which is built using React, on your local machine.
Clone the repository to your local machine using the following command:
git clone https://github.com/CS3213-Team-8/bug_analysis_FE.git
Navigate to the project directory and install the required dependencies:
cd bug_analysis_FE
npm install
Create a .env file in the root of the project directory and add the following environment variables:
REACT_APP_API_URL=<your_api_url>
Replace <your_api_url> with the URL of your locally running backend server.
Start the development server using the following command:
npm start