MACHUPS Architecture & Planning
Complete technical planning and architecture documentation.
Multi-Site Architectureβ
MACHUPS is built as a multi-site ecosystem:
π app.machups.comβ
Purpose: Main brand generation application
Stack:
- Next.js 15 (App Router)
- React 19 + TypeScript
- Tailwind CSS + Framer Motion
- thirdweb SDK (Web3)
Key Features:
- Brand generation form
- Real-time progress updates
- Results preview
- ZIP download
- NFT minting
π docs.machups.comβ
Purpose: Project documentation (this site)
Stack:
- Docusaurus 3.9
- MDX for interactive docs
- Custom React components
Key Features:
- Getting started guides
- API reference
- Technical documentation
- Planning documents
Status: β Live
π¨ design.machups.comβ
Purpose: Design system showcase
Stack:
- Docusaurus 3.9
- Custom components
- Live code playground
Key Features:
- Interactive color palette
- Component documentation
- Live code examples
- Token viewer
- Brand guidelines
Dynamic Subdomains:
[brand-id].design.machups.comfor each generated brand
π wallet.machups.comβ
Purpose: NFT certificate manager
Stack:
- Next.js 15
- thirdweb SDK
- Monad blockchain
Key Features:
- NFT collection viewer
- Certificate details
- Claiming unclaimed NFTs
- Admin dashboard
- Contract analytics
System Architectureβ
High-Level Flowβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Input Form β
β (Business idea, style, tech stack, wallet address) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Generation Pipeline β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Claude AI βββββΆβ Analysis βββββΆβ Extraction β β
β β Sonnet 4.5 β β & Planning β β & Parsing β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Parallel Generation Tasks β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β 1. Logo Generation (3 variants) β β
β β 2. Color Palette (12-15 colors) β β
β β 3. Typography System β β
β β 4. Design Tokens (W3C DTCG) β β
β β 5. Component Library (30+ components) β β
β β 6. Documentation (Docusaurus) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Package βββββΆβ Upload to βββββΆβ Mint NFT β β
β β to ZIP β β Storage β β (Monad) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Deliverables β
β β
β β’ ZIP Download URL β
β β’ Documentation Site URL β
β β’ NFT Transaction Hash β
β β’ Component Preview β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Data Flowβ
1. Design Token Flowβ
Brand Analysis
β
W3C DTCG Tokens
β
ββββ΄βββ¬βββββββ¬βββββββββ
β β β β
JSON CSS SCSS Tailwind
β β β β
Components
β
User's App
2. NFT Metadata Flowβ
Brand Generated
β
Create Metadata (JSON)
β
Upload to IPFS
β
Get IPFS Hash (ipfs://Qm...)
β
Call Smart Contract
β
Mint NFT to Wallet
β
Return Token ID
Technology Stackβ
Frontendβ
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 15.1.0 | React framework with App Router |
| React | 19.0.0 | UI library |
| TypeScript | 5.9 | Type safety |
| Tailwind CSS | 3.4 | Utility-first styling |
| Framer Motion | 12.23 | Animations |
AI & Generationβ
| Technology | Purpose |
|---|---|
| Claude Sonnet 4.5 | Primary LLM for brand analysis |
| Custom Prompts | Engineered prompts for consistent output |
| Streaming | Real-time response streaming |
Blockchainβ
| Technology | Purpose |
|---|---|
| Monad | L1 blockchain for NFT minting |
| thirdweb SDK 5.0 | Web3 SDK for wallet & contracts |
| ERC-721 | NFT standard |
| x402 Protocol | Micropayments (optional) |
Documentationβ
| Technology | Purpose |
|---|---|
| Docusaurus 3.9 | Documentation framework |
| MDX | Interactive documentation |
| React Components | Custom doc components |
Deploymentβ
| Service | Purpose |
|---|---|
| Vercel | Hosting (all sites) |
| GitHub Actions | CI/CD pipeline |
| Cloudflare | CDN |
| IPFS | NFT metadata storage |
Database Schemaβ
Brands Tableβ
CREATE TABLE brands (
id UUID PRIMARY KEY,
name VARCHAR(255) NOT NULL,
business_idea TEXT NOT NULL,
style VARCHAR(50) NOT NULL,
-- Brand attributes
tagline VARCHAR(255),
primary_color VARCHAR(7),
secondary_color VARCHAR(7),
-- Assets
logos_url TEXT,
tokens_url TEXT,
components_url TEXT,
docs_url TEXT,
-- NFT
nft_token_id INTEGER,
nft_transaction_hash VARCHAR(66),
wallet_address VARCHAR(42),
-- Metadata
generation_time INTEGER, -- seconds
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
NFT Metadataβ
{
"name": "Brand Name - MACHUPS Certificate",
"description": "Brand generated at Monad Blitz SF #18",
"image": "ipfs://Qm.../logo.png",
"attributes": [
{ "trait_type": "Event", "value": "Monad Blitz SF #18" },
{ "trait_type": "Brand Name", "value": "..." },
{ "trait_type": "Generated Date", "value": "2025-12-06" },
{ "trait_type": "Primary Color", "value": "#0066FF" },
{ "trait_type": "Style", "value": "modern" },
{ "trait_type": "Generation Time", "value": "175s" }
]
}
API Designβ
Generation APIβ
POST /api/generate
// Request
{
businessIdea: string;
targetAudience: string;
style: 'modern' | 'classic' | 'bold' | 'minimal';
techStack: 'react' | 'vue' | 'html';
features: string[];
walletAddress?: string;
}
// Response
{
jobId: string;
estimatedTime: number;
websocketUrl: string;
}
GET /api/status/[jobId]
// Response
{
status: 'pending' | 'processing' | 'completed' | 'failed';
progress: number; // 0-100
currentStep: string;
estimatedTimeRemaining: number;
result?: {
downloadUrl: string;
docsUrl: string;
nftTokenId?: string;
};
}
View Complete API Reference β
Smart Contractβ
MACHUPSCertificate (ERC-721)β
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract MACHUPSCertificate is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
mapping(uint256 => string) private _brandIds;
mapping(string => uint256) private _brandIdToTokenId;
function mintCertificate(
address recipient,
string memory tokenURI,
string memory brandId
) public onlyOwner returns (uint256);
function getBrandId(uint256 tokenId)
public view returns (string memory);
function totalSupply()
public view returns (uint256);
}
Networks:
- Monad Testnet: For development & testing
- Monad Mainnet: For production certificates
Workflow Diagramsβ
We've created 12 comprehensive Mermaid diagrams covering:
User Workflows (3)β
- Brand Generation Flow (standard path)
- Premium Feature Purchase Flow
- NFT Certificate Claiming Flow
Admin Workflows (2)β
- Contract Deployment Flow
- Monitoring & Analytics Flow
Application Flows (4)β
- Brand Generation Pipeline (internal)
- Real-time Progress Updates (WebSocket)
- Error Handling & Retry Logic
- CI/CD Pipeline
Deployment Flows (2)β
- Multi-Site Deployment
- Emergency Rollback
Data Flows (2)β
- Design Token Flow
- NFT Metadata Flow
Performance Targetsβ
Generation Performanceβ
| Metric | Target | Notes |
|---|---|---|
| Total Generation Time | < 3 minutes | End-to-end |
| Brand Analysis | < 30 seconds | Claude AI |
| Logo Generation | < 60 seconds | 3 variations |
| Component Generation | < 45 seconds | 30+ components |
| Documentation Build | < 30 seconds | Docusaurus |
Core Web Vitalsβ
| Metric | Target | Category |
|---|---|---|
| LCP (Largest Contentful Paint) | < 2.5s | Good |
| FID (First Input Delay) | < 100ms | Good |
| CLS (Cumulative Layout Shift) | < 0.1 | Good |
Application Performanceβ
| Metric | Target |
|---|---|
| Bundle Size | < 300KB (gzipped) |
| Time to Interactive | < 3s |
| API Response Time | < 200ms |
| WebSocket Latency | < 50ms |
Security Measuresβ
Code Securityβ
- β TruffleHog secret scanning
- β ESLint code quality
- β TypeScript type safety
- β Dependabot updates
Blockchain Securityβ
- β Smart contract testing
- β Testnet before mainnet
- β Private key management
- β Rate limiting on minting
Application Securityβ
- β Input validation
- β CORS policies
- β Rate limiting
- β HTTPS only
- β CSP headers
Deployment Strategyβ
Environmentsβ
| Environment | Branch | Domain | Network |
|---|---|---|---|
| Development | develop | dev.machups.com | Testnet |
| Staging | staging | staging.machups.com | Testnet |
| Production | main | app.machups.com | Mainnet |
CI/CD Pipelineβ
on: [push]
jobs:
build:
- ESLint
- TypeScript check
- TruffleHog scan
- Build Next.js
- Build Docusaurus
deploy:
- Deploy to Vercel
- Update DNS
- Run E2E tests
- Notify team
Planning Documentsβ
All comprehensive planning documentation:
| Document | Description | Word Count |
|---|---|---|
| Wallet Integration | Complete wallet & NFT setup | 3,500+ |
| Workflow Diagrams | 12 Mermaid diagrams | - |
| App Structure | app.machups.com structure | 4,000+ |
| Design Site | design.machups.com structure | 3,800+ |
| Wallet Site | wallet.machups.com structure | 3,500+ |
| Pre-Event Status | Readiness report | 2,500+ |
Total: ~20,000 words of planning documentation
Resourcesβ
Internal Documentationβ
External Resourcesβ
Ready to build? Check out the Event Day Plan β