Overview
Accountability uses a modern, type-safe technology stack optimized for developer productivity and runtime safety. The stack is intentionally minimal, with each technology chosen for specific strengths.Backend Technologies
Effect-TS (v3.19+)
Purpose: Functional programming framework for TypeScript Why Effect:- Type-safe error handling: All errors in the type signature
- Composable effects: Build complex logic from simple pieces
- Dependency injection: Context system for testable services
- Built-in concurrency: Fibers, streams, and structured concurrency
- Excellent testing support: TestClock, property-based testing
Effect Schema
Purpose: Runtime type validation and schema definition Why Schema:- Single source of truth: One schema for TypeScript types and runtime validation
- Automatic validation: Decode unknown data safely
- Transformations: Convert between representations (e.g., string → Date)
- Branded types: Prevent primitive obsession
- Error messages: Detailed validation errors
@effect/sql (v0.49+)
Purpose: Type-safe SQL query builder Why @effect/sql:- Template literal queries: Write SQL naturally
- Schema validation: Decode results with Effect Schema
- Transaction support: Automatic rollback on error
- Connection pooling: Efficient resource management
- PostgreSQL optimized: Leverage Postgres-specific features
Effect HttpApi
Purpose: Type-safe HTTP API framework Why HttpApi:- Type-safe endpoints: Request/response types enforced
- Automatic OpenAPI generation: Single source of truth
- Middleware support: Authentication, logging, error handling
- Schema validation: Automatic payload/query param validation
- Error mapping: Map domain errors to HTTP status codes
Frontend Technologies
React (v19)
Purpose: UI library for component-based interfaces Why React 19:- Server Components: Better SSR performance
- Improved hydration: Faster client-side startup
- Stable ecosystem: Mature tooling and libraries
- Large talent pool: Easy to hire React developers
- Functional components only (no class components)
- Hooks for state and side effects
- Component composition over prop drilling
- Presentational vs. container components
TanStack Start (v1.147+)
Purpose: Full-stack React framework with SSR Why TanStack Start:- File-based routing: Routes based on file structure
- Type-safe routing: Generated route types
- Data loaders: SSR data fetching built-in
- Nested layouts: Shared layouts for route groups
- Streaming SSR: Progressive page rendering
openapi-fetch
Purpose: Type-safe fetch client generated from OpenAPI spec Why openapi-fetch:- Auto-generated types: No manual client code
- Compile-time safety: Catches API mismatches at build time
- Standard fetch API: Familiar interface
- Lightweight: Minimal runtime overhead
Tailwind CSS (v4.1+)
Purpose: Utility-first CSS framework Why Tailwind:- Rapid development: Build UIs without writing CSS
- Consistent design: Predefined spacing, colors, typography
- Responsive by default: Mobile-first breakpoints
- Tree-shakable: Unused styles removed in production
- No naming conflicts: No global CSS class collisions
Database
PostgreSQL (v14+)
Purpose: Primary data store Why PostgreSQL:- ACID compliance: Strong consistency guarantees
- JSON support: Flexible for complex data structures
- Full-text search: Built-in search capabilities
- Advanced features: CTEs, window functions, array types
- Mature ecosystem: Excellent tooling and extensions
- Open source: No licensing costs
- Migrations written in TypeScript using Effect
- Version-controlled SQL schema
- Automated migration execution on startup
Testing Technologies
Vitest (v3.2+)
Purpose: Unit and integration test runner Why Vitest:- Fast: Blazing fast test execution
- Compatible: Works with Vite ecosystem
- Watch mode: Instant feedback during development
- Coverage: Built-in code coverage reports
- ESM native: No CommonJS quirks
@effect/vitest
Purpose: Effect-specific test utilities Why @effect/vitest:- TestClock: Fast-forward time in tests
- Layer support: Easy service mocking
- Property testing: FastCheck integration
- it.effect: Effect-aware test functions
Playwright (v1.57+)
Purpose: End-to-end browser testing Why Playwright:- Multi-browser: Test Chrome, Firefox, Safari
- Auto-wait: Waits for elements automatically
- Debugging: Visual debugger and trace viewer
- CI-friendly: Headless mode for automated runs
- Network mocking: Intercept and mock requests
testcontainers
Purpose: Spin up real PostgreSQL for integration tests Why testcontainers:- Real database: Test against actual PostgreSQL
- Isolated: Each test suite gets fresh DB
- No mocks: Test real SQL queries
- CI-friendly: Works in Docker-enabled CI
Development Tools
TypeScript (v5.8+)
Purpose: Type-safe JavaScript with modern features Configuration:strict: true- All strictness checks enablednoUncheckedIndexedAccess: true- Safe array/object accessexactOptionalPropertyTypes: true- Strict optional properties
ESLint (v9+)
Purpose: Code linting and style enforcement Custom Rules:no-disable-validation- BandisableValidation: trueno-silent-error-swallow- Prevent() => Effect.voidin catchno-effect-ignore- BanEffect.ignoreno-catchAllCause- BanEffect.catchAllCause
Prettier (v3.7+)
Purpose: Code formatting Configuration:- 2 space indentation
- Semicolons required
- Double quotes
- Trailing commas (ES5)
Package Manager
pnpm (v10.17+)
Purpose: Fast, disk-efficient package manager Why pnpm:- Fast: Symlinks packages from global store
- Disk efficient: Shared packages across projects
- Strict: No phantom dependencies
- Workspace support: Built-in monorepo management
Build Tools
Vite (v7.1+)
Purpose: Frontend build tool and dev server Why Vite:- Fast HMR: Instant hot module replacement
- ESM native: Native ES modules in dev
- Plugin ecosystem: Rich plugin ecosystem
- Optimized builds: Rollup-based production builds
Rolldown (via rolldown-vite)
Purpose: Rust-based bundler (Vite alternative) Why Rolldown:- 10x faster builds: Rust performance
- Vite compatible: Drop-in replacement
- Future-proof: Next-gen tooling
Deployment
Nitro
Purpose: Universal server for TanStack Start Why Nitro:- Framework-agnostic: Works with any framework
- Multiple targets: Node, Workers, serverless
- Auto-imports: Smart code splitting
- Built-in optimizations: Compression, caching
Version Requirements
| Technology | Minimum Version | Current Version |
|---|---|---|
| Node.js | 20.0.0 | 20.x LTS |
| pnpm | 10.17.1 | 10.17.1 |
| TypeScript | 5.8.0 | 5.8.3 |
| React | 19.0.0 | 19.0.0 |
| Effect | 3.19.0 | 3.19.14 |
| PostgreSQL | 14.0 | 16.x |
Dependency Management
Core Dependencies
Backend:effect- Effect runtime@effect/platform- Platform abstractions@effect/sql- SQL client@effect/sql-pg- PostgreSQL driver
react+react-dom- UI library@tanstack/react-start- Full-stack frameworkopenapi-fetch- API clienttailwindcss- CSS frameworklucide-react- Icon library
vitest- Test runner@effect/vitest- Effect test utilities@playwright/test- E2E testing@testcontainers/postgresql- Database testing
Update Strategy
- Effect packages: Update together (same version)
- React ecosystem: Update conservatively (test thoroughly)
- Database: Pin to major version (14, 15, 16)
- Tooling: Update frequently (Vite, ESLint, Prettier)
Next Steps
- Project Structure - How packages are organized
- Effect Framework - Effect patterns and best practices
- Frontend Architecture - React patterns and UI guidelines