This repo powers the https://www.satjade.live 's backend system.
Tech stack used:
- Golang with Echo for HTTP
- PostgreSQL
- sqlc (to reduce quering redundancy and increase type safety)
- Websockets for Duel competitive matches
Requirements to spin it up locally:
- Go >=1.25.1
- PostgreSQL
- golang-migrate >=4.19
Run the following commands in a sequential order to have the system up and running:
go mod tidymigrate -path ./cmd/migrate -database "${YOUR_POSTGRES_URL}" upIn order to seed an administrator in the system run:
go run ./cmd/migrate/seed/adminStart the API
go run ./cmd/api/Optional, for alerting
go run ./cmd/alert/env variables
#for the API binary
SECRET_KEY=
REFRESH_SECRET_KEY=
SERVER_PORT=
DB=
FRONTEND_URL=
TOKEN_EXPR_HOURS=
IMAGE_STORE=
LLM_APIKEY=
AUTH_AUD=
AUTH_ISS=
LOG_FILE=
#for the alert binary
TG_BOT_API_KEY=
CHAT_ID=
#for the admin seed binary
ADMIN_EMAIL=
ADMIN_PASSWORD=