Cookbook
Every entry answers one "how do I" question and links to the page that owns the answer. For a guided path instead of a lookup table, start with the Quickstart and build through the verified scenarios.
Project Setup
- Create a new Project:
forj new. Quickstart - Understand the generated layout. Project Structure
- Add or remove components after the first render. Configuration
- Change ports, drivers, or settings. Configuration and Environment Variables
- Start with a frontend included. Starter Kits
- Add a second deployable app:
forj make:app billing. Apps
HTTP
- Build a JSON route end to end. JSON API Route
- Create a controller:
forj make:controller users. Controllers - Register routes and route groups. Routes
- Validate request input. Requests and Validation
- Shape JSON responses and errors. Responses and Errors
- Add middleware to a route or group. Middleware
- See every route the App serves:
forj route:list. Routes - Serve Swagger and OpenAPI. OpenAPI
- Call an external API with a typed client. HTTP Clients
- Add health and readiness checks. Health and Readiness
Background Work
- Move work to the background:
forj make:job emails:send --queue default. Jobs - Dispatch a durable job from an event. Reports Generate Job
- Set retries, timeouts, and idempotency. Retries and Idempotency
- Run workers for one queue:
forj worker --queue reports. Workers - Add a second named queue. Queues
- Run something every night:
forj make:schedule reports:daily --every 24h. Scheduler - Announce a fact other code reacts to. Events and Event Subscribers
- Decide between an event and a job. Events versus Queues
Data
- Choose a database and driver. Database Strategy
- Decide local versus production drivers for any primitive. Driver Selection
- Write and run migrations:
forj migrate. Migrations - Put reads and writes behind a boundary. Repositories
- Use transactions safely. Transactions
- Cache an expensive read. Cached User Profile and Cache Patterns
- Add locks, counters, or rate limits. Cache Patterns
- Accept file uploads. File Upload Storage
- Add a named storage disk. Storage Patterns
- Query the database from a shell:
forj db. Database Shell
CLI and Wiring
- Add a CLI command. Commands
- Keep business logic out of controllers. Services
- Provide a new dependency. Dependency Injection and Providers
- Copy a known-good wiring shape. Wiring Recipes
- Decode a Wire build failure. Reading Wire Errors
- See every generator, or undo one with
--remove. Make Commands - Keep a feature's files together. Organizing Generated Code
- Name things the way the framework expects. Naming Conventions
Email and Security
- Send and preview email. Mail
- Add login, sessions, and password reset. Auth
- Encrypt values with key rotation. Crypt
Operations
- Run everything as one process. Standalone versus Distributed
- Split into separate processes for scale. Runtime Processes
- Expose Prometheus metrics. Metrics
- See what a request, job, or schedule run actually did. Inspects
- Watch the App from a first-party UI. Lighthouse
- Configure logging. Logging
- Keep workers healthy in production. Queue Workers
- Ship a binary to a server. Deployment Basics
- Check readiness before launch. Production Checklist
Testing
- Decide what kind of test to write. Testing Overview
- Test a route without starting a browser. HTTP Tests
- Test jobs and queues. Job and Queue Tests
- Test event publish and subscribe. Event Tests
- Test CLI commands. Command Tests
- Test against real backends in containers. Integration Tests
Debugging
- Dump any value, readable and colorized. godump
- Inspect an outbound HTTP call. HTTP Clients
- Run the rebuild-and-restart loop:
forj dev. forj dev
If a task you expected is missing here, that is a gap worth telling us about. The sidebar holds the full map, and every page ends with next steps.