You'll need a Postgres instance running with standard credentials. A basic docker service included and can be run with compose:
$ docker-compose up -d
From there, activate a virtualenv using Python 3.7.x (this is automatic if you're using pyenv and direnv), and install the dependencies:
$ make
Lastly, upgrade the database:
$ atlas migrate
Atlas is made up of two key services.
The backend service is a Django application exporting a graphql API. It runs on top of a Postgres database and is completely stateless.
The frontend service is a next.js application implementing the majority of user interactions as well as authentication.
These services can be run easily in local development using the included proxy with the following:
$ npm start
From there you can access the UI at http://localhost:8080. This will expose the backend at /graphql/
and the UI at /
.
The backend is a GraphQL implementation powered by Graphene. The exposed endpoint is /graphql/
.
To launch the backend service (from within your virtualenv) run the following:
$ atlas runserver
Authentication is done via the following:
- Perform a login mutation:
mutation {
login(email: "foo@example.com", password: "bar") {
errors
ok
token
user {
id
email
name
}
}
}
- Capture the token in the response and send it with future requests:
Authorization: Token {value}
Here's a helpful app which lets you bind an auth header:
https://github.com/skevy/graphiql-app
The frontend service is built on top of next.js. It contains all user interface logic as well as various business flows.
To launch the frontend service run the following:
$ cd frontend && npm run dev