Files
lunarfront-app/docs/setup.md
Ryan Moon 9400828f62 Rename Forte to LunarFront, generalize for any small business
Rebrand from Forte (music-store-specific) to LunarFront (any small business):
- Package namespace @forte/* → @lunarfront/*
- Database forte/forte_test → lunarfront/lunarfront_test
- Docker containers, volumes, connection strings
- UI branding, localStorage keys, test emails
- All documentation and planning docs

Generalize music-specific terminology:
- instrumentDescription → itemDescription
- instrumentCount → itemCount
- instrumentType → itemCategory (on service templates)
- New migration 0027_generalize_terminology for column renames
- Seed data updated with generic examples
- RBAC descriptions updated
2026-03-30 08:51:54 -05:00

2.2 KiB

Development Setup

Prerequisites

  • Bun v1.1+
  • PostgreSQL 16
  • Valkey 8 (or Redis 7+)

Installation

git clone <repo-url> && cd lunarfront
bun install

Environment

Create a .env file in the project root:

DATABASE_URL=postgresql://lunarfront:lunarfront@localhost:5432/lunarfront
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-secret-here
NODE_ENV=development

All Environment Variables

Variable Default Description
DATABASE_URL postgresql://lunarfront:lunarfront@localhost:5432/lunarfront PostgreSQL connection string
REDIS_URL redis://localhost:6379 Valkey/Redis connection string
JWT_SECRET (auto-generated in dev) Secret for signing JWTs. Required in production.
PORT 8000 Backend API port
HOST 0.0.0.0 Backend bind address
NODE_ENV development, test, or production
LOG_LEVEL info Pino log level (debug, info, warn, error, silent)
LOG_FILE Path to log file (production only, also logs to stdout)
STORAGE_PROVIDER local File storage provider (local or s3)
STORAGE_LOCAL_PATH ./data/files Local file storage directory
CORS_ORIGINS * (dev) Comma-separated allowed origins
APP_URL http://localhost:5173 Frontend URL (used in password reset links)

Database

# Create the database
createdb lunarfront

# Run migrations
cd packages/backend
source ../.env  # or source .env from project root
bunx drizzle-kit migrate

Running

# From project root — starts all packages
bun run dev

# Or individually:
cd packages/backend && source .env && bun run dev   # API on :8000
cd packages/admin && bun run dev                     # UI on :5173

Testing

# API integration tests (starts a backend, seeds DB, runs HTTP tests)
cd packages/backend
source .env
bun run api-test

# Filter by suite or tag
bun run api-test --suite accounts
bun run api-test --tag crud

# Unit tests
bun run test

Useful Commands

bun run lint      # ESLint across all packages
bun run format    # Prettier write
bun run build     # Build all packages