Creating Your Marketplace
Build a Custom Marketplace for Your Ecosystem
This comprehensive guide shows you how to create a custom marketplace for The Architech CLI β whether for your company, community, or a specific technology ecosystem.
β οΈ Important: A production marketplace involves significant infrastructure (scripts, types, validation). We're developing
architech create marketplaceto scaffold this for you. Until then, use our official marketplace as a reference.
Why Create a Marketplace?
For Companies
- β Enforce standards across all projects
- β Share knowledge through reusable modules
- β Onboard faster with consistent patterns
- β Maintain control over technology choices
For Communities
- β Serve your ecosystem (Vue, Angular, Svelte)
- β Share best practices with the community
- β Build specialized tools for your domain
- β Drive innovation in your space
For Individuals
- β Codify your preferences in reusable modules
- β Automate your workflow across projects
- β Showcase expertise with a public marketplace
- β Contribute to the ecosystem
Marketplace Types
Choose the type that fits your needs:
1. Ecosystem Marketplace
For: Specific framework communities (Vue, Angular, Svelte)
Example: Vue.js marketplace with Pinia, Vite, and Vue Router
Golden Core equivalent:
- State: Pinia
- Data Fetching: TanStack Query (framework-agnostic!)
- Forms: VeeValidate + Zod
- Testing: Vitest
2. Company Marketplace
For: Internal use with company-approved technologies
Example: ACME Corp marketplace with Angular, Firebase, and enterprise SSO
Golden Core equivalent:
- State: NgRx
- Data Fetching: Angular HttpClient + RxJS
- Forms: Angular Forms + Custom validators
- Auth: Company SSO provider
3. Domain Marketplace
For: Specific domains (blockchain, e-commerce, AI/ML)
Example: Web3 marketplace with ethers.js, wagmi, and wallet connectors
Golden Core equivalent:
- Wallet: RainbowKit
- Blockchain: wagmi + viem
- State: Zustand
- Data: TanStack Query
Getting Started
Current Approach: Fork Official Marketplace
Until the architech create marketplace command is ready, fork our official marketplace:
# Step 1: Clone as template
git clone https://github.com/the-architech-xyz/marketplace my-marketplace
cd my-marketplace
# Step 2: Install dependencies
npm install
# Step 3: Explore the structure
ls -laUnderstanding the Structure
my-marketplace/
βββ package.json # Exports, scripts (30+ scripts!)
βββ tsconfig.json # TypeScript config
βββ adapters/ # Technology installations
β βββ framework/
β βββ database/
β βββ ui/
β βββ ...
βββ connectors/ # Technology bridges
β βββ docker-nextjs/
β βββ drizzle-nextjs/
β βββ ...
βββ features/ # Complete capabilities
β βββ auth/
β βββ payments/
β βββ ...
βββ genomes/ # Project templates
β βββ official/
βββ scripts/ # Infrastructure (KEEP THESE!)
β βββ generation/ # Auto-generate types, manifests
β βββ validation/ # Validate modules
β βββ utilities/ # Build tools
βββ types/ # Auto-generated (DON'T EDIT!)What to Keep vs Replace
β KEEP (Infrastructure):
scripts/folder β All 30+ utility scriptspackage.jsonscripts β Build pipelinetsconfig.jsonβ TypeScript configuration.husky/β Pre-commit hooks- Build system β Type generation, validation
π REPLACE (Content):
adapters/β Your technology adaptersconnectors/β Your technology bridgesfeatures/β Your business featuresgenomes/β Your project templatesREADME.mdβ Your documentation
π οΈ CUSTOMIZE:
package.jsonβ Name, description, repository, authormarketplace.config.tsβ Your standards (create this file)
Step-by-Step: Create Your Marketplace
Step 1: Customize Package Metadata
// package.json
{
"name": "@yourcompany/marketplace",
"version": "1.0.0",
"description": "Your marketplace description",
"repository": {
"type": "git",
"url": "https://github.com/yourorg/marketplace.git"
},
"author": "Your Team",
"homepage": "https://your-marketplace-docs.com",
// KEEP all the scripts!
"scripts": {
"validate": "tsx scripts/validation/validate-blueprints.ts",
"generate:manifest": "tsx scripts/generation/generate-marketplace-manifest.ts",
"types:generate:constitutional": "tsx scripts/generation/generate-constitutional-types-cli.ts",
// ... 20+ more scripts - keep them all!
}
}Step 2: Define Your Standards
Create a configuration file (optional but recommended):
// marketplace.config.ts
export const marketplaceConfig = {
name: 'my-marketplace',
version: '1.0.0',
// Your "Golden Core" equivalent
standards: {
framework: 'vue', // Your primary framework
stateManagement: 'pinia', // Your state solution
dataFetching: 'tanstack-query', // Works with any framework!
forms: 'vee-validate', // Your form solution
testing: 'vitest', // Testing framework
},
// Module categories
categories: [
'framework',
'database',
'auth',
'ui',
'state',
'payment',
'email',
],
// Quality requirements
requirements: {
typescript: true,
tests: true,
documentation: true,
examples: true,
}
};Step 3: Create Your First Adapter
Example: Vue 3 framework adapter
# Create directory
mkdir -p adapters/framework/vue
# Create adapter.json// adapters/framework/vue/adapter.json
{
"id": "framework/vue",
"name": "Vue 3",
"description": "Vue 3 framework with Vite and TypeScript",
"category": "framework",
"version": "1.0.0",
"provides": [
{
"name": "vue",
"version": "3.4.0",
"description": "Vue 3 framework"
},
{
"name": "vite",
"version": "5.0.0",
"description": "Vite build tool"
}
],
"capabilities": {
"framework": {
"version": "1.0.0",
"provides": ["vue", "vite", "typescript"]
}
},
"parameters": {
"typescript": {
"type": "boolean",
"default": true,
"description": "Enable TypeScript"
},
"router": {
"type": "boolean",
"default": true,
"description": "Include Vue Router"
}
}
}// adapters/framework/vue/blueprint.ts
import { BlueprintAction, BlueprintActionType } from '@thearchitech.xyz/types';
import { TypedMergedConfiguration } from '../../../types/blueprint-config-types.js';
export default function generateBlueprint(
config: TypedMergedConfiguration<'framework/vue'>
): BlueprintAction[] {
const actions: BlueprintAction[] = [];
// Install Vue + Vite
actions.push({
type: BlueprintActionType.INSTALL_PACKAGES,
packages: ['vue@^3.4.0', 'vite@^5.0.0']
});
if (config.module.parameters.typescript) {
actions.push({
type: BlueprintActionType.INSTALL_PACKAGES,
packages: ['typescript', '@vitejs/plugin-vue'],
dev: true
});
}
// Create vite.config.ts
actions.push({
type: BlueprintActionType.CREATE_FILE,
path: 'vite.config.ts',
template: 'templates/vite.config.ts.tpl'
});
// Create main.ts
actions.push({
type: BlueprintActionType.CREATE_FILE,
path: 'src/main.ts',
template: 'templates/main.ts.tpl'
});
return actions;
}Step 4: Create Your First Connector
Example: Pinia + Vue connector
// connectors/pinia-vue/blueprint.ts
export default function generateBlueprint(config) {
const actions = [];
// Install Pinia
actions.push({
type: BlueprintActionType.INSTALL_PACKAGES,
packages: ['pinia']
});
// Create store setup
actions.push({
type: BlueprintActionType.CREATE_FILE,
path: 'src/stores/index.ts',
template: 'templates/store-setup.ts.tpl'
});
// Modify main.ts to add Pinia
actions.push({
type: BlueprintActionType.ENHANCE_FILE,
path: 'src/main.ts',
modifier: 'vue-plugin-injector',
params: {
plugin: 'pinia',
import: { name: 'createPinia', from: 'pinia' }
}
});
return actions;
}Step 5: Define Your Golden Core
Document your architectural standards:
# Your Marketplace Standards
## Our Golden Core
### State Management: Pinia
Why: Official Vue state solution, simple API, excellent TypeScript support
### Data Fetching: TanStack Query
Why: Framework-agnostic, industry standard, works perfectly with Vue
### Forms: VeeValidate + Zod
Why: Type-safe validation, Vue-friendly API
### Testing: Vitest
Why: Fast, Vite-native, excellent Vue support
## Agnostic Edges
- UI Libraries: Vuetify, PrimeVue, Element Plus (user choice)
- Databases: Any ORM (Drizzle, Prisma, TypeORM)
- Auth: Any provider (Auth0, Supabase, custom)Step 6: Build and Validate
# Generate types from your modules
npm run types:generate:constitutional
# Generate marketplace manifest
npm run generate:manifest
# Validate everything
npm run validate:all
# Build the marketplace
npm run buildThe scripts automatically:
- β Generate TypeScript types from your modules
- β Create marketplace manifest with all modules
- β Validate all blueprints for syntax
- β Ensure contracts compliance (if using contracts)
- β Check template existence
The Auto-Generated Infrastructure
Types (Don't Edit These!)
The types/ folder is automatically generated:
types/
βββ adapters/ # Generated from adapter.json files
β βββ framework/
β β βββ vue/
β β βββ index.d.ts
β βββ database/
βββ connectors/ # Generated from connector.json files
βββ features/ # Generated from feature.json files
βββ contracts/ # Generated from contract definitions
βββ genome-types.d.ts # All module IDs for autocomplete
βββ blueprint-parameters.d.ts # Type-safe parametersHow it works:
- You create module JSON files (
adapter.json,connector.json) - Run
npm run types:generate:constitutional - Scripts scan your modules
- Generate complete TypeScript definitions
- Your genomes get full autocomplete!
Scripts (Keep These!)
Generation scripts:
generate-marketplace-manifest.ts- Creates manifest.jsongenerate-constitutional-types-cli.ts- Generates typesgenerate-feature-manifests.ts- Creates feature manifests
Validation scripts:
validate-blueprints.ts- Blueprint syntax validationvalidate-templates.ts- Template existence checksvalidate-contract-correctness.ts- Contract compliancevalidate-comprehensive.ts- All validations
Utility scripts:
blueprint-parser.ts- Parse blueprint filestemplate-path-resolver.ts- Resolve template paths
Don't modify these unless you know exactly what you're doing. They're complex but battle-tested.
Testing Your Marketplace
Local Testing
# Link your marketplace locally
cd my-marketplace
npm link
# Use in a test project
cd ../test-project
npm link @yourcompany/marketplace
# Test module installation
architech add adapter vue
architech add connector pinia-vueValidation
# Run all validations
npm run validate:all
# Specific validations
npm run validate:blueprints
npm run validate:templates
npm run validate:contracts
# Check for issues
npm run validate:issuesPublishing Your Marketplace
npm Publishing (Recommended)
# Step 1: Update version
npm version 1.0.0
# Step 2: Build
npm run prepublishOnly
# Step 3: Publish
npm publish --access publicUsers install with:
npm install @yourcompany/marketplaceGit-Based Distribution
# Users can install from Git
npm install git+https://github.com/yourorg/marketplace.git
# Or specific tag/branch
npm install git+https://github.com/yourorg/marketplace.git#v1.0.0Private npm Registry
For company-internal marketplaces:
# Publish to private registry
npm publish --registry https://npm.yourcompany.com
# Users configure
npm config set @yourcompany:registry https://npm.yourcompany.comMarketplace Configuration
Create marketplace.config.ts to define your standards:
export default {
name: 'my-marketplace',
version: '1.0.0',
// Your architectural standards
standards: {
framework: 'vue',
stateManagement: 'pinia',
dataFetching: 'tanstack-query',
forms: 'vee-validate',
testing: 'vitest',
linting: 'eslint',
formatting: 'prettier'
},
// Module organization
categories: [
'framework',
'database',
'auth',
'ui',
'state',
'payment',
'email',
'deployment'
],
// Quality requirements for modules
moduleRequirements: {
typescript: true,
tests: true,
documentation: true,
examples: true,
contractCompliance: true
},
// Validation rules
validation: {
strictContracts: true,
requireTemplates: true,
enforceNaming: true
}
};This configuration drives:
- Type generation
- Validation rules
- Module organization
- Build pipeline
Module Development Workflow
Creating an Adapter
# 1. Create directory
mkdir -p adapters/category/adapter-name
# 2. Create adapter.json (metadata)
# 3. Create blueprint.ts (generation logic)
# 4. Create templates/ (optional)
# 5. Test locally
# 6. Run validation
npm run validateCreating a Connector
# 1. Create directory
mkdir -p connectors/connector-name
# 2. Create connector.json (declares requirements)
# 3. Create blueprint.ts (integration logic)
# 4. Create templates/
# 5. Follow your Golden Core patterns
# 6. Test and validateCreating a Feature
# 1. Create contract (interface definition)
features/feature-name/contract.ts
# 2. Create tech-stack (headless logic)
features/feature-name/tech-stack/
# 3. Create backend implementation
features/feature-name/backend/provider-framework/
# 4. Create frontend implementation
features/feature-name/frontend/ui-library/
# 5. Validate contract compliance
npm run validate:contractsReal-World Examples
Example 1: Vue.js Ecosystem Marketplace
Structure:
@vue-marketplace/core/
βββ adapters/
β βββ framework/vue
β βββ framework/nuxt
β βββ state/pinia
β βββ router/vue-router
β βββ ui/vuetify
βββ connectors/
β βββ pinia-vue
β βββ tanstack-query-vue
β βββ vee-validate-vuetify
βββ features/
βββ auth-vue
βββ payments-vue
βββ i18n-vueGolden Core:
- State: Pinia
- Data: TanStack Query
- Forms: VeeValidate + Zod
- Routing: Vue Router
Example 2: Enterprise Angular Marketplace
Structure:
@acme/enterprise-marketplace/
βββ adapters/
β βββ framework/angular
β βββ state/ngrx
β βββ auth/company-sso
β βββ monitoring/datadog
βββ connectors/
β βββ ngrx-angular
β βββ company-sso-angular
β βββ datadog-angular
βββ genomes/
βββ microservice-api.genome.ts
βββ admin-portal.genome.ts
βββ mobile-app.genome.tsGolden Core:
- State: NgRx
- Data: HttpClient + RxJS
- Forms: Angular Reactive Forms
- Auth: Company SSO
Example 3: Blockchain Domain Marketplace
Structure:
@web3/marketplace/
βββ adapters/
β βββ blockchain/ethers
β βββ blockchain/wagmi
β βββ wallet/rainbowkit
β βββ wallet/web3modal
βββ connectors/
β βββ wagmi-rainbowkit
β βββ ethers-nextjs
β βββ web3-auth
βββ features/
βββ wallet-connect
βββ nft-gallery
βββ token-swapGolden Core:
- Wallet: RainbowKit
- Blockchain: wagmi + viem
- State: Zustand
- Data: TanStack Query
Understanding the Scripts
Generation Scripts
These auto-generate infrastructure:
# Generate TypeScript types from modules
npm run types:generate:constitutional
# Generate marketplace manifest (for landing pages)
npm run generate:manifest
# Generate feature manifests (for feature resolution)
npm run generate:feature-manifestsValidation Scripts
These ensure quality:
# Validate all blueprints
npm run validate
# Validate templates exist
npm run validate:templates
# Validate contracts (if using feature contracts)
npm run validate:contracts
# Comprehensive validation (runs all)
npm run validate:allBuild Pipeline
# Clean, validate, generate, compile
npm run build
# Pre-publish checks
npm run prepublishOnlyModule Organization Best Practices
Naming Conventions
Adapters:
adapters/category/technology-name/
Example: adapters/database/drizzle/Connectors:
connectors/tech1-tech2/
Example: connectors/drizzle-nextjs/Features:
features/feature-name/implementation-type/provider-framework/
Example: features/auth/frontend/shadcn/File Organization
Each module must have:
- β
Metadata JSON (
adapter.json,connector.json, orfeature.json) - β
Blueprint (
blueprint.ts) - β README.md (documentation)
Optional:
- Templates folder (for code generation)
- Tests folder (unit/integration tests)
- Examples folder (usage examples)
Quality Standards
For All Modules
- β TypeScript: All code must be TypeScript
- β Documentation: README with examples
- β Tested: Unit tests for blueprints
- β Validated: Pass all validation scripts
For Features
- β Contract: Define clear interface
- β Headless logic: Separate business logic from UI
- β Multiple implementations: Support different tech stacks
- β Golden Core: Follow your marketplace's standards
Maintenance
Version Management
Follow semantic versioning:
1.0.0 β Initial release
1.1.0 β New module added
1.0.1 β Bug fix in existing module
2.0.0 β Breaking change (API change, dropped module)Changelog
Maintain CHANGELOG.md:
# Changelog
## [1.1.0] - 2025-10-20
### Added
- New adapter: `ui/vuetify`
- New connector: `vuetify-vue`
### Fixed
- Template path resolution in pinia-vue connector
### Changed
- Updated Vue to 3.4.0CI/CD Pipeline
# .github/workflows/validate.yml
name: Validate Marketplace
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: npm install
- run: npm run validate:all
- run: npm run buildSuccess Criteria
A successful marketplace:
For Users
- β Easy to start β Clear docs and templates
- β Productive β Reduces boilerplate
- β Reliable β High-quality, well-tested modules
- β Flexible β Enough options without overwhelming
For Maintainers
- β Organized β Clear structure and conventions
- β Automated β Scripts handle types, validation
- β Documented β Comprehensive guides
- β Sustainable β Manageable maintenance burden
Getting Help
Building a marketplace? We're here to help:
- Discord: #marketplace-creators channel (opens in a new tab)
- Discussions: GitHub Discussions (opens in a new tab)
- Official Marketplace: Study our implementation
- Contributing: See Contributing Guide β
Future: CLI Scaffold Command
We're developing:
# Coming soon!
architech create marketplace my-marketplace
# Templates:
# - minimal: Basic structure + essential scripts
# - full: Everything from official marketplace
# - ecosystem: For framework communities (Vue, Angular)
# - company: For internal enterprise useThis will:
- β Create complete directory structure
- β Copy all necessary scripts
- β Set up type generation
- β Configure build pipeline
- β Create example modules
Until then, fork the official marketplace β the infrastructure is production-ready!
Next Steps
- Custom Modifiers β - Extend CLI functionality
- CLI Configuration β - Advanced config
- Contributing β - Add to official marketplace
- CLI Internals β - Understand the engine
The official marketplace is your template. Copy the infrastructure, replace the modules, define your standards. Build the marketplace that fits your world.