This is a template for writing APIs. Technically, it is:
- A Django-based application
- Built with django-ninja
- Running in Docker
- Using a PostgreSQL database
- Developed with Docker compose
The only dependency to run this project is Docker Compose V2, which comes by default with Docker Desktop for Mac. If you want to run the project without Docker you can also install Poetry and run the Django app in /src
directly. You'll need a Postgres database and some environment configuration. We recommend Docker, but up to you.
You should be able to run the project by simply executing make dev
(make sure Docker is running). The first time this might take a minute or two depending on your connection speed.
Once everything is ready you should see the following in your terminal.
openapi-template | INFO: Started server process [111]
openapi-template | INFO: Waiting for application startup.
openapi-template | INFO: ASGI 'lifespan' protocol appears unsupported.
openapi-template | INFO: Application startup complete.
Now you can interact with the API in localhost:8000/api/docs. Success 🚀!
This project uses GNU make to simplify running local commands inside the development container. To see all available commands you can inspect the Makefile.
- @TODO Folder architecture
- @TODO Testing
- @TODO Linting & Formatting
- @TODO Continuous integration
- @TODO Deploying to Cloud Run