Skip to content

UWCoffeeNCode/barista

Repository files navigation

barista

The backend API server for uwcoffeencode.com

Build Status

Usage

Public API

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.

Administration

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.


Development

Setup

Make sure you have pyenv, pipenv, Docker, and Docker Compose installed.

  1. Clone and enter the repo:

    git clone git@github.com:UWCoffeeNCode/barista && \
    cd barista
  2. Install dependencies:

    # Install dependencies from `Pipfile.lock`:
    pipenv sync
  3. Configure .env:

     # Copy env values from example template:
     cp .env.example > .env
    
     # Edit to use real values:
     vi .env

Workflow

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 runserver

Some useful commands include:

# Run the shell (administration):
python manage.py shell

About

The backend API server for uwcoffeencode.com

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages