Boilerplate API project for Django following Domain-Driven Design (DDD) principles keeping the code as simple as possible.
Take a look, develop and have fun with this.
Explore the docs »
Report Bug
·
Request Feature
- First run
make build
inside root directory. - Then run
make up
to start up the project for first time. - Use/update environment variables from
.envs
folder.
Checkout the commands section for more usage.
A default Django project resides in src
directory. So, when you start the project, you will see the following screen in 8000
port:
Also when you access the django container log via make log-web
, you will see the following:
This project tries to be a full rest API platform for Indexacapital.
Bootstrap your new projects or be inspired by DDD and hexagonal architecture.
Django REST framework is a powerful and flexible toolkit for building Web APIs.
Some reasons you might want to use REST framework:
- The Web browsable API is a huge usability win for your developers.
- Authentication policies including packages for OAuth1a and OAuth2.
- Serialization that supports both ORM and non-ORM data sources.
- Customizable all the way down - just use regular function-based views if you don't need the more powerful features.
- Extensive documentation, and great community support.
- Used and trusted by internationally recognised companies including Mozilla, Red Hat, Heroku, and Eventbrite.
Full documentation for the project is available at https://www.django-rest-framework.org/.
User registration REST API, based on Django REST Framework.
Full documentation for the project is available at https://django-rest-registration.readthedocs.io/.
Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports scheduling as well.
Full documentation for the project is available at http://www.celeryproject.org/.
If you already doesn't know what it's docker, that place it's not for you. Try with that: https://docs.docker.com/get-started/overview/
- Ready to use with your django project.
- Combined with NGINX, Redis, Celery to handle relevent things.
- Alpine based images are used, so that sizes of the images are compartively low.
- Now comes built it with Numpy, Scipy and Pandas support. So you can integrate your datascience projects with this. Instructions for integrating these libraries are also shared in the
Dockerfile
. - With Numpy, Pandas and Scipy dependecies installed, the total size is 657MB(may differ if you have more packages). Without these, size reduces to 390MB.
- Now comes with support to install Pillow using django.
To use this project, run this commands:
make up
to build the project and starting containers.make build
to build the project.make start
to start containers if project has been up already.make stop
to stop containers.make shell-web
to shell access web container.make shell-db
to shell access db container.make shell-nginx
to shell access nginx container.make logs-web
to log access web container.make logs-db
to log access db container.make logs-nginx
to log access nginx container.make collectstatic
to put static files in static directory.make log-web
to log access web container.make log-db
to log access db container.make log-nginx
to log access nginx container.make restart
to restart containers.
There are some things missing (improve documentation...), feel free to add this if you want! If you want some guidelines feel free to contact us :)
1: This method is the slower and only must be used if you don't have connectivity with GitHub