Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.
DevelopmentContributing

Development Setup

Environment setup and day-to-day development workflows for TimeTiles.

Quick Start

git clone https://github.com/jfilter/timetiles.git cd timetiles make init # installs deps, starts DB, runs migrations, seeds, starts dev server

See Quick Start for prerequisites and database mode options.

Commands

CommandWhat it does
make devStart dev server (auto-starts database)
make checkLint + typecheck all packages
make testRun unit + integration tests
make test-e2eRun Playwright E2E tests
make formatFormat code
make migrateRun database migrations
make seedSeed database with sample data
make freshFull reset: database + migrate + seed
make statusCheck environment health

Database Seeding

make seed ARGS="development" # Rich, realistic data (default) make seed ARGS="testing --truncate" # Fast, deterministic data for tests make seed ARGS="demo" # Polished data for demos

Available presets: minimal, testing, e2e, development, demo, benchmark. Add --truncate to clear existing data first.

Workflow

  1. Create a feature branch from main
  2. Make your changes
  3. Run make check — lint and typecheck must pass
  4. Write tests for new functionality
  5. Commit using conventional commits
  6. Open a pull request

Code Standards

  • TypeScript strict mode — all code must pass strict type checking
  • Named imports onlyimport { foo } from 'bar'
  • No console.log — use logger.info() / logError() from @/lib/logger
  • React Query for all data fetching — never fetch directly in components
  • Coordinates in [longitude, latitude] order (GeoJSON standard)
  • PostGIS for spatial queries — no client-side geo computations

Layered Architecture

The lib/ directory follows a strict import hierarchy:

Layer 0 — Foundation (no lib/ deps) utils/, security/, types/, constants/, geospatial/, filters/ Layer 1 — Infrastructure (can import Layer 0) services/, database/, middleware/ Layer 2 — Domain (can import Layer 0 + 1) import/, ingest/, account/, export/, email/, collections/ Layer 3 — Application (can import anything) api/, hooks/, jobs/, blocks/, config/, globals/

Each layer can only import from the same layer or below. Enforced via ESLint.

Migrations

cd apps/web pnpm payload:migrate:create # Auto-generate from schema changes pnpm payload:migrate # Apply pending migrations

Never create migration files manually — always use Payload’s generator.

Troubleshooting

ProblemSolution
Port 3000 in usemake kill-dev
Database connection errormake down && make up
Stale statemake fresh
TypeScript errors after updatespnpm install && make check

Further Reading

Last updated on