Skip to content

Build your app

Build in the same order your users experience the product. Start with the data your feature owns, then decide who can access it. Validate each request before an API route writes data. Add a client page once the server contract is clear.

You do not need every page for every feature. A public read-only page, for example, may only need a route and database query. Start with the smallest relevant path.

  • Database

    Add application models with Mongoose. - Authentication

    Configure Better Auth and protect data on the server. - Validation

    Check untrusted request data before it reaches the database or another service. - API routes

    Define a contract, implement an Express handler, and call it from the client. - File uploads

    Upload to private storage, confirm metadata, and request temporary downloads. - Cron jobs

    Schedule cleanup of abandoned uploads. - Client pages

    Add typed TanStack Router pages and loaders. - Emails

    Render React Email templates and send them with Resend. - Middleware

    Reuse authentication and authorization guards. - 404 page

    Customize the screen shown for an unknown URL.

Next step

Start with Database, then follow the widget example through Validation, API routes, and Client pages.

References