Skip to content

Development Setup

Prerequisites

  • Bun 1.3+
  • Git
  • Supabase CLI (for local database)

Clone the Repository

bash
git clone https://forgejo.wyattau.com/Rankhub/rankhub_app.git
cd rankhub_app

Install Dependencies

bash
bun install

Configure Environment

bash
cp .env.example .env

Edit .env and fill in the required variables. For local development with Supabase local stack, the defaults work out of the box.

Start Local Database

bash
supabase start

This starts local PostgreSQL, Auth, and Storage services. The default .env values point to these local services.

Run Database Migrations

bash
make db-migrate

Or generate and push Drizzle migrations:

bash
cd packages/db && bun run generate
cd packages/db && bun run push

Start the Dev Server

bash
bun run dev

The web app will be available at http://localhost:3000.

Run Tests

bash
bun run test         # Vitest (792 tests)
bun run test:bun     # bun:test (254 tests)
bun run test:all     # All tests (1,046 total)

Lint and Typecheck

bash
bun run lint         # Lint and auto-fix with Biome
bun run lint:check   # Lint without fixing
make typecheck       # TypeScript type checking

Useful Commands

CommandDescription
bun run devStart web app dev server
bun run buildBuild for production
make db-studioOpen Drizzle Studio GUI
make db-generateGenerate Drizzle migration files
make helpShow all Makefile targets

Project Structure

rankhub_app/
  apps/
    web/              # SolidStart frontend + API
    do-worker/        # Cloudflare Durable Objects worker
  packages/
    engine/           # Glicko-2 rating engine
    db/               # Drizzle ORM + schema
  scripts/            # Build and deployment scripts
  tests/              # Integration tests

Reporting Issues

Report bugs and feature requests on the Forgejo issue tracker.