V2 Marketplace Documentation
V2 marketplaces provide recipe books, path keys, and adapters that transform V2Genome to StandardizedGenome.
Overview
V2 marketplaces:
- Transform genomes: V2Genome β StandardizedGenome
- Provide recipe books: Package β Module mapping
- Define path keys: Semantic path definitions
- Implement adapters: Marketplace-specific logic
Core Concepts
- Marketplace Adapter Interface - Complete interface reference
- Recipe Books - Package β Module mapping
- Path Keys - Semantic path definitions
- Manifest - Module registry
Marketplace Structure
marketplace/
βββ adapter/
β βββ index.js # Marketplace adapter
βββ capabilities/ # Infrastructure modules
βββ features/ # Complete features
βββ manifest.json # Module registry (generated)
βββ recipe-book.json # Package β Module mapping (generated)
βββ path-keys.json # Path key definitionsKey Responsibilities
1. Transform Genomes
Marketplaces transform V2Genome to StandardizedGenome:
async transformGenome(genome: V2Genome, options, context) {
// Use CompositionEngine to resolve
const handler = new context.V2GenomeHandler(...);
const lockFile = await handler.resolveGenome(genome);
return handler.convertLockFileToResolvedGenome(lockFile, genome);
}2. Provide Recipe Books
Recipe books map business packages to technical modules:
{
"packages": {
"auth": {
"providers": {
"default": {
"modules": [
{ "id": "capabilities/auth", "targetPackage": "auth" }
]
}
}
}
}
}3. Define Path Keys
Path keys define semantic paths:
{
"pathKeys": [
{
"key": "apps.web.root",
"description": "Web app root directory",
"computed": true
}
]
}Creating a Marketplace
Use the CLI command:
architech marketplace generate <name> --type opinionatedThis creates:
- Directory structure
- Adapter with all required methods
- Build scripts
- Path keys structure
Related
- Marketplace Adapter Interface - Complete reference
- Creating Your Marketplace - Step-by-step guide
- Marketplace-CLI Relationship - How they work together