Skip to content

SprocketBot/sprocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2,297 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sprocket Project Repo

Discord Server Support us on Ko-Fi Twitter LinkedIn


Sprocket is a platform primarily used to manage and automate organized Esports leagues, one such example being Minor League Esports. The platform uses a Microservice pattern, and this repository contains everything needed to quickly start a new microservice.

Repository Layout

Application code lives under clients/, microservices/, common/, and core/. Infrastructure code now lives under infra/, which contains the Pulumi projects migrated from the former sprocket-infra repository:

  • infra/global
  • infra/layer_1
  • infra/layer_2
  • infra/platform

The committed Pulumi.*.yaml files moved with the code so stack configuration remains in version control. Pulumi backend state is still remote and must be accessed with the same backend login used before the migration.

Agent Entry Point

For autonomous or agent-assisted work, start with:

These files define the current repo operating surface, canonical commands, and machine-readable service/lane metadata.

Canonical Command Surface

For routine repo operation, prefer the root command layer:

npm run dev:up
npm run dev:status
npm run dev:logs -- core
npm run dev:smoke
npm run verify:tier0 -- local-dev
npm run verify:tier0 -- main-prod
npm run verify:tier1 -- main-prod /absolute/path/to/tier1.env league
npm run verify:all -- main-prod /absolute/path/to/tier1.env

These commands wrap the current docker-compose and harness workflows in a more stable agent-friendly surface.

Building / Running this Repository

Installing Dependencies:

# In the root directory
npm i

Building Projects

# In the root directory
npm run build --workspaces --if-present

Running Projects

# In the project directory
npm run dev
# For the replay parse service
./start.sh

Building Docker images

Build the base image

docker build . -f dockerfiles/node.Dockerfile -t sprocket-base-image --build-arg COMMIT_SHA=$(git log -1 --format=%H)

docker image ls | grep sprocket
# ->
#    sprocket-base-image                                   latest             cfb627899675   5 seconds ago   1.01GB

Build microservice image

For example, building clients/web:

docker build . -f clients/web/Dockerfile -t sprocket-web --build-arg BASE_IMAGE=sprocket-base-image

docker image ls | grep sprocket
# ->
#    sprocket-web                                          latest             6661a25ebce4   5 seconds ago    1.01GB
#    sprocket-base-image                                   latest             cfb627899675   30 seconds ago   1.01GB

Inspecting COMMIT_SHA of Image / Container

docker inspect --format='{{range .Config.Env}}{{println .}}{{end}}' <image/container name or id> | grep COMMIT_SHA

About

Sprocket is a platform to manage and automate organized Esports leagues

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors