The backend API server for uwcoffeencode.com
The public API is served at api.uwcoffeencode.com. This is the address that internal and external applications will use to fetch Coffee 'N Code-related data.
Some information can only be accessed by authenticated clients.
To authenticate, a user must perform a login mutation:
mutation Login($username: String!, $password: String!) {
login(input: { username: $username, password: $password }) {
user {
id
}
}
}Only first-party browser clients may authenticate with the API and read/update private data; third-party browser clients may only make use of public data.
The admin console is served at barista.uwcoffeencode.com. Staff users (i.e. us) can login and securely manage backend data without direct database access.
Make sure you have
pyenv,pipenv, Docker, and Docker Compose installed.
-
Clone and enter the repo:
git clone git@github.com:UWCoffeeNCode/barista && \ cd barista
-
Install dependencies:
# Install dependencies from `Pipfile.lock`: pipenv sync -
Configure
.env:# Copy env values from example template: cp .env.example > .env # Edit to use real values: vi .env
To get started, go ahead and do the following:
# Launch external systems (database, etc.):
docker-compose up -d
# Run database migrations:
python manage.py migrate
# Run the server (development):
python manage.py runserverSome useful commands include:
# Run the shell (administration):
python manage.py shell