A web explorer for Cosmo's Objekts, focused on the client-side experience. Cosmo is an app by Modhaus Inc. that decentralizes K-pop using blockchain technology; Objekts are its digital photocard NFTs.
Live at objekt.top.
- Browse and filter every indexed Objekt collection
- Per-profile collections, pins, locks and ownership history
- Time travel: view any profile's collection as it was on a past date
- Trade lists (have/want) with matching between profiles
- Market listings and price tracking
- Live activity feed, chat and notifications (Centrifugo)
| Layer | Technology |
|---|---|
| Runtime | Bun 1.4 |
| Frontend | TanStack React Start, Vite, React 19, Tailwind CSS 4 |
| API | ORPC (type-safe RPC) with Zod |
| Database | PostgreSQL 18, Drizzle ORM |
| Auth | Better Auth |
| Real-time | Centrifugo (self-hosted), centrifuge-js |
| i18n | Inlang (Paraglide) |
| Indexer | Subsquid (EVM processor) |
| Lint/Format | oxlint, oxfmt |
| Path | Package | Purpose |
|---|---|---|
apps/web |
web |
Frontend (TanStack React Start) |
apps/worker |
worker |
Background jobs (Bun.cron) |
apps/indexer |
indexer |
On-chain NFT metadata indexer (Subsquid) |
packages/api |
@repo/api |
ORPC routers and services shared by the server |
packages/db |
@repo/db |
Drizzle schema and migrations for both databases |
packages/lib |
@repo/lib |
Shared utilities and types |
packages/cosmo |
@repo/cosmo |
Cosmo SDK |
packages/email |
@repo/email |
Auth email templates (jsx-email) |
packages/lint |
@repo/lint |
Shared oxlint config |
packages/tsconfig |
@repo/tsconfig |
Shared TypeScript configs |
Bun workspaces manage the packages, Turbo runs the tasks.
Requirements: Bun 1.4+, PostgreSQL 18, a Valkey/Redis instance and Centrifugo for real-time. docker-compose.yml provides all of them if you'd rather not install them locally.
bun install
cp .env.example .env # then fill it inAll apps read the same root .env, so there is nothing to configure per package. The essential variables:
| Variable | Purpose |
|---|---|
DATABASE_URL |
Main PostgreSQL connection |
INDEXER_DATABASE_URL |
Indexer PostgreSQL connection |
REDIS_URL |
Valkey (Redis-compatible) connection |
BETTER_AUTH_SECRET |
Auth encryption key |
SITE_URL |
Public origin, read at runtime |
CENTRIFUGO_URL |
Centrifugo server API URL |
CENTRIFUGO_API_KEY |
Centrifugo server API key |
CENTRIFUGO_TOKEN_SECRET |
Secret that signs browser connection tokens |
COSMO_KEY |
Encrypted API key for the Cosmo SDK |
See .env.example for the full list, including S3 storage, SES mail, OAuth providers and indexer RPC settings.
Apply the migrations and start everything:
bun run --filter=@repo/db db:migrate
bun run devThe web app is then served on http://localhost:3200.
Run from the repository root; --filter takes a package name.
bun run dev # start all dev servers
bun run dev --filter=web # start one app
bun run build # build everything
bun run lint # oxlint across the monorepo
bun run lint:fix # lint and auto-fix
bun run typecheck # type-check everything
bun run test # bun test across the monorepo
bun run check # lint, typecheck and test in one run, as CI does
bun run format # oxfmt across the monorepoDatabase tasks live in @repo/db:
bun run --filter=@repo/db db:generate # generate a migration from the schema
bun run --filter=@repo/db db:migrate # apply migrations
bun run --filter=@repo/db db:studio # open Drizzle Studiodocker-compose.yml brings up the full stack: web, worker, indexer processor, both PostgreSQL instances with pgbouncer in front, Valkey and Centrifugo.
docker compose up -dBefore opening a pull request, make sure bun run check and bunx oxfmt --check are clean. CI runs the same checks and builds the web Docker image; the worker and indexer images are built on deploy.
- teamreflex/cosmo-web (Apollo) for Cosmo types, Cosmo utils and the Subsquid indexer. Some features are heavily inspired by Apollo.
- Discord: .ryusion