A simple project to manager orders with users, the solution is a REST API using python, fastapi and prisma
- Create, read and delete users
- Create, read, update and delete orders
- Prisma ORM to manage the database
- FastAPI to create the REST API
- Docker to manage the database and the api
- Swagger documentation
- Insomnia file to test the api
- Folder structure to manage the project in a clean way
assets
: Contains the insomina fileprisma
: Contains the prisma schema and the migrationssrc/repositories
: Contains the repositories to manage the databasesrc/routes
: Contains the routes to the apisrc/main.py
: Contains the main file to start the api
There are some requirements to run the project:
-
Clone the repository
git clone [email protected]:ViniciosLugli/2024-1A-T2-M10-A1.git
-
Enter the project folder
cd 2024-1A-T2-M10-A1
-
Run the project docker compose to start the database and the api
docker compose -f docker-compose.yml up --build
-
Now you can access the api at http://localhost:3000 and they documentation at http://localhost:3000/docs
You can use the insomnia to test the api, just import the file insomnia.json to your insomnia and you will have all the requests to test the api.