All .env files are included in the repository for simplicity. This is not a good practice, but it is done for simplicity.
The project all you to visualize the data of the following API
There is 2 possible ways to fetch the data, the first one is to use the API directly, the second one is to import the data in a database and use the database.
I've decided to implement both solutions. On the web app you can choose the source you want to use.
- Postgres is used for the database.
- Nest.js and Prisma(ORM) are used for the backend.
- Next.js and tailwindcss are used for the frontend.
Run the docker compose file with the following command:
docker compose up -d --build
Start the database with the following command:
docker compose up -d db
Install the dependencies in each folder (backend and frontend) with the following command:
yarn install
Start the backend with the following command:
yarn start
Start the frontend with the following command:
yarn dev
To populate the database, you must run the following command inside the backend folder:
yarn prisma migrate reset
It will run the migrations and seeders.
Move inside the backend folder and run yarn test
. The local database should be started