- Backend/ Frontend: Python, Django
- Database: PostgreSQL
- CI/CD: GitHub Actions, Docker
- A recipe app built with Django framework and PostgreSQL, along with GitHub Actions for TDD and Docker for containerization
- Run all the unit tests and check linting:
docker-compose run --rm app sh -c "python manage.py test && flake8"
-
Run
docker-compose up
to start the docker, if successfully launched, the terminal will show the message below:... recipe_django_app-app-1 | Django version 3.2.25, using settings 'app.settings' recipe_django_app-app-1 | Starting development server at http://0.0.0.0:8000/
-
Check Swagger API: http://127.0.0.1:8000/api/docs/
..
├── app/ # Django project
├── app/
├── core/ # store models and database migrations
├── recipe/
├── user/
manage.py # entry point for the Django project
├── .github # GitHub Actions yaml file
- Create a new unit test for the model in
app/core/tests
and create a new model class inapp/core/models
. - Make database migrations by running
docker-compose run --rm app sh -c "python manage.py makemigrations"
. - To enable Django admin access the new model by adding
admin.site.register(models.[model name])
in the fileadmin.py
underapp/core
. - Create a new Django app folder to store all the endpoints by running
docker-compose run --rm app sh -c "python manage.py startapp [app name]"
. - Add each API endpoint unit test and implement the functions.