Skip to content

dougrich/tokenerator

Repository files navigation

Token Builder

This is all the code that powers https://tokens.dougrich.net

Architecture

The code is roughly broken into 5 big parts: api, batch, ux, pipe, and gateway.

api is an HTTP service which hosts the service endpoints and authentication

batch is a pubsub subscriber which asynchronously handles batch commands

ux is both an HTTP service and a client-side application

pipe is a pipe to take the legacy storage (mongodb documents) and pump them into the new DB

gateway is a NGINX gateway that correctly maps all the routes, handles SSL termination, and caches static assets

Additionally, there are the following root folders:

.circleci which contains the continuous integration commands

deploy which contains deployment scripts and utilities

misc which contains related pictures and similar that don't fit under a specific group

token-parts which contains the raw token parts

Common Developer Operations

Reset new parts:

cd tooling
npm start -- remove tag new

Run locally

Do Once

  1. Create a config.json based on config.example.json & give access to google compute by providing a creds.json which contains a google account code. You'll need to create the firebase account in google compute.
  2. Create a config.auth.json based on config.auth.example.json. Each provider will need to be setup with their own credentials.

Developer Loop

  1. Start the containers with
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build
  1. Bundle the token parts
cd tooling
npm start -- bundle
  1. Make changes to either code (re-run docker-compose commands) or token parts (re-run bundling commands)

Troubleshooting

Missing ux/src/token-parts or api/src/token-parts - you're missing the output from the token parts bundle. Check that you ran step 2 of the developer loop.

Part Development Checklist

If you're adding a new part, run through this checklist:

  • Create artwork
  • Ensure layers are separate. Each layer needs to be a root level g tag in the SVG
  • Ensure each layer can be colored independently. Each layer will have the fill style element replaced with a new value.
  • Each layer needs a unique class attribute. This determines their name in the code & should be on the g element. It is saved as part of the token.

About

No description, website, or topics provided.

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE.md
Unknown
LICENSE-ART.md

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages