init Command

The init command initializes a new zopio project with the recommended structure and configuration.

Usage

zopio init [options]

Options

  • -t, --template <template> - Template to use (default: “default”)
  • -l, --locale <locale> - Default locale for internationalization (default: “en”)

Examples

zopio init

Project Structure

The init command creates a new zopio project with the following structure:

my-zopio-app/
├─ .zopio/                # Zopio configuration
├─ app/                   # Next.js application
│  ├─ [locale]/           # Locale-specific routes
│  ├─ api/                # API routes
│  └─ layout.tsx          # Root layout
├─ components/            # React components
├─ dictionaries/          # Translation files for next-international
│  ├─ en/
│  └─ tr/                 # If specified with --locale
├─ locales/               # Translation files for next-intl
│  ├─ en/
│  └─ tr/                 # If specified with --locale
├─ i18nConfig.ts          # Internationalization configuration
├─ languine.json          # Additional i18n configuration
├─ package.json           # Dependencies and scripts
└─ tsconfig.json          # TypeScript configuration

Available Templates

  1. default - Standard template with basic setup
  2. fullstack - Complete setup with frontend and backend
  3. api - API-only setup
  4. minimal - Minimal setup with core features only

Supported Locales

The following locales are supported out of the box:

  • en - English (default)
  • tr - Turkish
  • es - Spanish
  • de - German

Additional locales can be added later using the i18n command.