Your terminal should be running commands in the root directory of this project.
Ensure that your terminal supports both pip and npm commands.
pip install -r backend/requirements.txt
fastapi dev backend/app/base.py
- Access docs by navigating to
localhost:8000/docson your web browser - To run the backend for debugging purposes, run
uvicorn backend.app.base:app --reloadin your terminal.- Note that this only runs the backend. It can not be navigated to on the web browser, nor will documentation be available.
npm install
npm start
- These commands should install all required packages for the webpage, as well as start the frontend. The webpage should automatically open in your default browser under the tab "Birdmig".
- This process may take a few minutes.
- Ensure that the Docker daemon is running
- Opening the Docker desktop app is the easiest way to ensure this step
- Build and run the containers with the command:
docker-compose up -d --no-deps --build - Go to
http://localhost:3000to observe changes.
This project uses Jest alongside @testing-library/react for testing React components.
Before running tests, make sure you have:
- Node.js installed on your system.
- All the project dependencies installed. If you haven't done so already, you can install them by running
npm installin the project's root directory.
To run all the tests in the project, you can use the following command:
npm testRunning Tests with Coverage To run tests and generate a coverage report, you can use the following command:
npm test -- --coverageThis will not only test your components but also provide a detailed report of your test coverage.
Test files are located alongside the components they are testing, with a .test.js or .test.jsx file extension. For example, if you have a component in src/components/MyComponent.js, its tests should be in src/components/MyComponent.test.js.