The core idea of Pixels is to have a collaborative canvas, where users paint pixel by pixel, by PUTting co-ordinates and a colour code to an API.
Our main goal for this project is to focus on it being a learning tool, for users who may not have previous experience with APIs.
With that said however, users of all experience levels are both welcome and encouraged to join in with the event!
This repository holds the source code for the web app running over at pixels.yazilimcilarinmolayeri.com.
The documentation can be found live here.
If you aren't, feel free to open an issue and we will have a look at it!
This project uses docker-compose
to setup the stack quickly. Running docker-compose up
after setting up environment variables will start the development server on http://localhost:8000. As usual, you can navigate to http://localhost:8000/authorize to get a new token.
You must use a .env
file to setup variables. See this document for uvicorn/fastAPI image env vars. We recommend you to set LOG_LEVEL
to debug
.
Additionally, the project uses these environment variables:
# Used to hide moderation endpoints in Redoc.
PRODUCTION=false
# Where the root endpoint can be found.
BASE_URL=http://localhost:8000
# The webhook to periodically post the canvas state to
WEBHOOK_URL=<Discord Webhook URL>
WEBHOOK_LOG_URL=<Discord Webhook Log URL>
# Add the redirect BASE_URL/callback to your application, then generate an OAuth2 URL with scopes: identify.
AUTH_URL=<Discord OAuth2 URL>
# Postgres database URL. Not required when using docker-compose.
DATABASE_URL=postgres://<username>:<password>@<address>:<port>/<database name>
# Redis storage URL. Not required when using docker-compose.
REDIS_URL=redis://<address>:<port>/<db id>?password=<password>
# Discord OAuth variables. Create an application at https://discord.com/developers/applications/.
CLIENT_ID=<Discord app client ID>
CLIENT_SECRET=<Discord app client secret>
# 32 byte (64 digit hex string) secret for encoding tokens. Any value can be used.
JWT_SECRET=c78f1d852e2d5adefc2bc54ed256c5b0c031df81aef21a1ae1720e7f72c2d39
Any contribution is welcomed! In case of a Pull Request, please make sure that you have an approved issue opened first. See our Contributing Guidelines for more information.