Note
This is a rewrite currently WIP that will take time. Drink a coffee and join us if you would like to contribute.
Currently we are building a backend which can be reached by other services/repos with a tRPC client. If you are using another language than TS... then you might fulfill a PR and implement gRPC (are you sure u want pain?).
Requirements:
- Bun installed
- A Postgres database
Note
Azure credentials are optional. When AZURE_TENANT_ID, AZURE_CLIENT_ID, and
AZURE_CLIENT_SECRET are all omitted, the Azure tRPC routes use a seeded in-memory directory.
Its changes last until the backend restarts. Set all three variables to connect to Microsoft Graph.
- Install packages
bun install
- Setup environment variables in
.env(use.env.exampleas template and see./src/env.tsas source of truth) - Run the DB migration
bun db:migrate
- Run the server
bun dev
- (Optional, for logging into the admin panel locally) Seed a test user with Telegram already linked and the
ownerrole:The script sends a sign-in OTP tobun run seed:user
test@example.comand prints a link to a temporary inbox where you can read the code — paste it when prompted. Without this step, logging into admin withtest@example.comlands on the "Link your Telegram account" onboarding page, since that account has notelegramIdassociated yet. Re-run with--forceto recreate the test user from scratch.