Prerequisites
- Bun or Node.js runtime
- PostgreSQL database
- Environment variables configured
Environment Configuration
The app uses@t3-oss/env-core for type-safe environment variables. Required variables:
src/core/constants/env.ts:4 for the complete schema.
Development Mode
Using Bun (Recommended)
- Loads environment variables from
.env.dev - Enables hot reloading
- Preloads OpenTelemetry instrumentation
- Runs
src/bun.ts:1
Using Node.js
tsx with watch mode and runs src/node.ts:1.
Production Mode
Bun Runtime
.env.prod environment file.
Node.js Runtime
Build the application:Server Configuration
The server runs on port 3333 (defined insrc/core/constants/global.ts:3).
Bun Entry Point
Node.js Entry Point
src/node.ts:1 for full implementation.
Database Scripts
Authentication
Generate BetterAuth schema:src/db/auth-schema.ts.
Testing
.env.dev environment.
