Before you begin, ensure you have met the following requirements:
- Python 3
- PostgreSQL
- Node.js
- IDE of Choice (Intelli.j)
For testing purposes:
- Database: pgAdmin4
- API Endpoints: Postman (port 8080)
Install dependencies:
-
Backend:
- python3 -m venv env
- pip install fastapi uvicorn sqlalchemy
-
Frontend:
- cd Frontend
- npm install
- npm install axios
- Frontend: React, Axios
- Backend: Python, FastAPI
- Database: PostgreSQL
- You can download the Zip file and extract it
- Open the project in you preferred IDE with the root folder named
QuizApp
- Navigate to
backend/database.py
- Modify the following based on your the setup of PostgreSQL: make sure schema name on application.properties is same as pgAdmin4
USERNAME= <your_username>
PASSWORD= <your_password>
HOSTNAME = <your_hostname>
PORT = <your_port_num>
SCHEMA_NAME = <your_schema>
- Locate the terminal and run the following commands to start the Backend:
- Enter
cd backend
- uvicorn main:app --reload
- Enter
- Check the build terminal, to see if the FastAPI project is running (API endpoints on localhost:8080, PostgreSQL on port 5433)
- To start the Frontend, open Terminal on IDE and enter the following:
- Enter
pwd
to verify that your path is currently/QuizApp
- Enter
cd frontend/
- navigates to the React frontend - Enter
npm install
- installs all the necessary dependencies - Check terminal to see all dependencies are installed
- Then enter
npm start
- start the localhost:3030 server
- Enter
- Once both the frontend and backend are running, the project is up and running successfully.