TypeScript product foundation

Raypx

TanStack Start, oRPC, Drizzle, Better Auth

Raypx

A durable starting point for authenticated agent products.

Start with real route guards, typed API calls, database-backed services, admin surfaces, and verification commands already wired into the monorepo contract.

Layer 0-2 shared packagesLayer 4 app composition/api/rpc typed oRPC
apps/web

runtime map

Route treepublic, auth, dashboard, admin
Session gatesBetter Auth beforeLoad checks
PersistenceDrizzle schema and service APIs

verify

ready
checkoxlint + oxfmt
typestsgo across packages
harnessdocs/env/boundaries
buildweb smoke path

$ bun run verify -- harness

Static checks stay close to product work.

Runtime proof

Trace the runtime contract before you write product code.

Raypx keeps production evidence close to the work: package boundaries, typed API surfaces, verified commands, and the places product teams extend first.

RPC API/api/rpc
Auth routes/api/auth/*
PersistenceNeon Postgres
Dependency direction
downward only

Layer 4

apps/web

Composes routes, layouts, providers, and server endpoints.

Layer 2

@raypx/auth

Owns sessions, roles, admin checks, and domain service rules.

Layer 1

@raypx/db

Ships Drizzle schema, operators, and the server db instance.

Layer 0

@raypx/ui

Keeps shared UI, policy, i18n, runtime, API, and logger primitives.

ship checks
bun run check
bun run check-types
bun run verify -- harness
bun run build
Getting started

Open the product runtime, then keep the repo contract close.

Raypx is already wired for app routes, typed procedures, auth sessions, database persistence, and verification commands. Start the workspace and build inside those boundaries.

TanStack StartoRPCDrizzleBetter Authshadcn/ui
Clone and install
bun install

Install the workspace catalog and package graph.

Run the app
bun run dev

Start the full-stack web app and worker from one terminal.

Architecture Spine

The foundation is already shaped around product work.

Routes, auth, APIs, persistence, UI conventions, and verification commands are wired as one operating surface instead of separate demos.

01

Typed workflows

Compose routes, API calls, and UI states from one application spine.

File routes stay guarded
API calls stay typed
Shared packages stay reusable
02

Auth and access

Better Auth sessions, role checks, and admin-only surfaces are ready before feature work.

Session-aware dashboard
Admin route gates
Account settings included
03

Database-backed runtime

Drizzle, Postgres, and service boundaries keep agent workflows attached to real persistence.

Schema-first data
Runtime health checks
Layered package imports
04

Operator console

A dense dashboard, playground, and quick actions give builders a practical control surface.

Searchable console
API playground
Reusable UI primitives
05

Repo-aware checks

Static harnesses, package docs, and TypeScript verification keep product work inside the contract.

AGENTS.md guidance
Boundary verification
Build smoke paths
Boundaries

The stack gives every concern a place to live.

Raypx keeps auth, APIs, data, UI, and runtime concerns separated while the app layer composes them into one product surface.

Layer 4
apps compose packages
RPC
typed procedures route data
Layer 2
services own domain rules
Guarded surfacesPublic, auth, dashboard, and admin routes each carry their own loading and access posture.
One typed contractRPC procedures keep client calls, server handlers, and response validation aligned.
Workspace boundariesShared logic lives in packages while apps stay focused on composition.

Verification stays visible.

Use `bun run verify -- harness`, type checks, lint, and build smoke paths before shipping changes across the monorepo.

One foundation for the product paths you keep rebuilding.

Use Raypx as the starting point for authenticated apps, internal tools, and agent-backed runtime surfaces.

Explore runtime

Authenticated products

Start with signup, sessions, settings, workspace context, and protected routes.

Internal tools

Use the dashboard and admin shell as the first operational surface.

Agent runtimes

Attach workflows to typed APIs, real data, and monitored health checks.

Ready to build

Keep the stack, boundaries, and verification path in front of the team.

Start from the runtime instead of the blank page.

Open the dashboard, inspect the playground, and keep building with real auth, real data, and real boundaries already in place.