v2
V2 Overview

V2 Documentation

Welcome to The Architech V2 โ€” the next generation of industrial-grade code generation.

๐Ÿš€ What's New in V2

V2 introduces a federated composition model that fundamentally changes how projects are structured and generated:

Key Changes

  1. Monorepo-Only Architecture

    • All projects are monorepos (no single-app projects)
    • Workspace dependencies using workspace:* protocol
    • Shared packages across apps
  2. V2Genome Structure

    • workspace: Project metadata
    • marketplaces: Marketplace configurations
    • packages: Business-level capabilities
    • apps: Application definitions (web, mobile, api)
  3. Marketplace-CLI Relationship

    • Marketplaces transform genomes via transformGenome()
    • Recipe books map packages to modules
    • Path keys define semantic paths
  4. Framework Bootstrap

    • Frameworks initialize before modules
    • Correct working directory handling
    • Proper path resolution
  5. Execution Flow

    • Path mapping generation
    • Framework bootstrap
    • Module execution

๐Ÿ“š Documentation Structure

  • Getting Started - Create your first V2 project
  • Concepts - Core V2 concepts (V2Genome, monorepo-only, marketplace-CLI)
  • CLI - V2 CLI documentation (composition engine, framework bootstrap)
  • Marketplace - V2 marketplace documentation (adapter interface, recipe books)
  • Migration Guide - Migrate from V1 to V2

๐Ÿ”„ Migrating from V1

If you're using V1, see the Migration Guide for step-by-step instructions.

Quick Migration Checklist:

  • Convert genome to V2Genome format
  • Update to monorepo structure
  • Update marketplace adapters (if custom)
  • Test framework bootstrap
  • Verify module execution

๐ŸŽฏ Quick Start

// genome.ts
import { defineV2Genome } from '@thearchitech.xyz/types';
 
export default defineV2Genome({
  workspace: {
    name: 'my-project',
    description: 'My V2 project'
  },
  marketplaces: {
    saas: {
      type: 'npm',
      version: 'latest'
    }
  },
  packages: {
    database: {},
    auth: {},
    ui: {}
  },
  apps: {
    web: {
      type: 'web',
      framework: 'nextjs',
      packages: ['ui', 'auth']
    }
  }
});

Then run:

architech new genome.ts

๐Ÿ“– Learn More


Ready to get started? โ†’ Getting Started Guide