mystack

A starting point. With a point of view.

View on GitHub

Project structure

Find the right home for a route, a service or a presentation change.

Source ownership

You work in the generated application. The starter repository is the maintained reference template and generator source. The generated README contains instructions for your selected database, runtime and providers.

Source ownership
src/
  routes/
  server/
  services/
  middlewares/
  db/
  lib/
  styles/

Routes and server functions

File-based pages and API routes live in src/routes. TanStack Start server functions live in src/server. State-changing server functions use POST and validate their inputs. Pure reads use GET so route loaders can prefetch them.

Business logic

Framework-independent domain logic lives in src/services. Route handlers, server functions and middleware delegate to these services. Framework configuration and integration glue live in src/lib.

Data access

Database schemas and connection setup live in src/db. PostgreSQL work that must respect row-level security uses the application’s RLS transaction helpers. SQLite variants use server guards and explicit ownership predicates. Keep privileged migration credentials separate from runtime credentials.

Headless presentation

Base UI supplies interaction behavior; theme values, layout and motion are replaceable. Customize the styles and page composition while preserving keyboard access, reduced motion, hydration safety and the signed OAuth request flow.

Project checks

Use the generated scripts to check formatting, types and application behavior. Database integration suites need the corresponding local database environment; PostgreSQL test suites use Docker and Testcontainers.

Project checks
bun run check
bun run typecheck
bun run test