Home

Awesome

<div align="center"> <h1>Hack the Back</h1> </div> <div align="center"> <strong>An elegant backend for Hackathons</strong> </div> <div align="center"> <em>A Hackathon event platform to elegantly handle Hacker apps, with ready-made GraphQL and REST endpoints.</em> </div> <br/> <div align="center"> <a href="./LICENSE"> <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /> </a> <a href="https://github.com/psf/black"> <img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" /> </a> <a href="https://www.python.org/downloads/release/python-380/"> <img src="https://img.shields.io/badge/python-3.8-blue.svg" alt="Python 3.8" /> </a> </div>

Table of Contents

Installation

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.

Schema Documentation

Hack the Back provides both GraphQL and REST APIs for use by the client.

GraphQL Documentation

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:

Download the Schema via the CLI

./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.

REST Documentation

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.

Download the Schema via the CLI

./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. :thinking:

Contributing

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.

License

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.


<p align="center"> <a target="_blank" rel="noreferrer noopener" href="https://hackthevalley.io"> <img src="https://cdn.hackthevalley.io/assets/logo?color=gray" width="25"/> </a> </p>