Wooster was an AI travel planner I built before agents existed. Users described a trip and the app generated day-by-day itineraries via LLM API calls, with a React frontend and a Node/Express backend backed by PostgreSQL. My first time wiring an LLM into a real backend: structured logging, auth, rate limiting, dockerized test environments. The hardest part was the server side, parsing unpredictable LLM output into typed responses and recovering when the model returned garbage JSON.

Key Features

  • AI-powered itinerary generation with type-safe prompt system
  • Token-based rate limiting with configurable time windows
  • Structured logging system with request correlation
  • Comprehensive error handling with sanitized production traces
  • Dockerized test environment with transaction rollbacks
  • Service layer abstraction with dependency injection
  • Custom middleware chain for auth and validation

Technical Architecture

Frontend

Built type-safe React application with TanStack Query for state management. Implemented accessible component system with ARIA compliance. Developed error boundaries with fallback UI for graceful degradation. Created modular prompt engineering interface with validation schemas.

Backend

Designed service layer abstraction with dependency injection patterns. Implemented PostgreSQL database with versioned migrations and rollback support. Built custom middleware chain for auth, request validation, and response caching. Developed regex-based JSON sanitization for malformed LLM responses. Created token-based rate limiting with configurable time windows.

Testing

Implemented dockerized PostgreSQL environment with transaction rollbacks. Built mock LLM client with typed responses and configurable failure scenarios. Designed retry mechanism for flaky integration tests with custom matchers. Created reusable test fixtures with factory patterns for complex data scenarios.

Infrastructure

Deployed distributed system on DigitalOcean with GitHub Actions. Implemented structured logging with request correlation and context propagation. Built custom error hierarchy with environment-aware error responses. Created fallback mechanisms for AI service degradation. Set up Nginx reverse proxy with SSL/HTTPS and response caching.