Hack the Back requires Python 3.8, and PostgreSQL at minimum, to run in real-world production environments.
Please view production installation instructions on the Wiki page.
Hack the Back provides both GraphQL and REST APIs for use by the client.
This project uses Graphene with Django Rest Framework serializers in order to build the GraphQL API. Every GraphQL server has an introspection system and Graphene is no different. To view the schema from this system, the GraphQL playground is included:
- Playground: /api/graphql
./manage.py graphql_schema --schema hacktheback.graphql.schema.schema --out graphql-schema.json
Make sure to load environment variables SECRET_KEY
and DEBUG
before running the command above.
This project uses drf-spectacular to automatically generate an OpenAPI 3.0 schema for the REST API that is built with the Django Rest Framework.
- Swagger UI: /api/swagger
- OpenAPI Schema (yaml): /api/schema.yaml
- OpenAPI Schema (json): /api/schema.json
- OpenAPI Schema (via content negotiation): /api/schema
./manage.py spectacular --file openapi-schema.yml
Make sure to load environment variables SECRET_KEY
and DEBUG
before running the command above.
Fun fact: You can take advantage of this project's OpenAPI 3.0 Schema to do automatic code generation for the client or server. In other words, you can generate SDKs for a client library or framework — such as Angular. Alternatively, you can generate some starter code in another back-end web framework with the same REST endpoints. 🤔
Hack the Back requires contributors to install Python 3.8 and Poetry at minimum, to run in a development environment. The database in the development environment uses the SQLite engine, which stores data in an SQLite file in the root directory.
Please view the Contributing Wiki pages for more details on installation and best practices.
Everything in this repository is under the MIT License. Please carefully read and comply with the license agreement.
Created with :heart: by Hack the Valley.