Skip to Content
DocumentationGetting startedOverview

Getting started

This section guides you through creating a new TwoTaps-powered site from scratch. The fastest path is the bootstrap:site CLI command — it clones a ready-to-use Next.js boilerplate, wires in your environment variables, generates TypeScript types for your schemas, and scaffolds all your block components automatically.

A complete sandbox site, fully connected to your TwoTaps organisation, takes under 5 minutes to set up.

What you’ll need

  • Node.js 22 or later
  • Git installed and available in your PATH
  • Yarn (the boilerplate uses Yarn as its package manager)
  • A TwoTaps API token — generate one from your organisation’s administration panel

What the bootstrapper does

The bootstrap:site command automates every manual step involved in setting up a new TwoTaps site:

StepWhat happens
1Clones the official Next.js boilerplate into your target directory
2Setting up.env and fills in your GraphQL URL, public host, and base path
3Runs yarn to install all dependencies
4Calls the schema-builder endpoint to generate types.ts with TypeScript interfaces for every schema in your schema set
5Fetches your block schema names and scaffolds a stub React component for each one in src/components/
6Configures components in NEXT_COMPONENTS wiring map — ready to drop into a block renderer
Last updated on