Documentation
Learn how to use ArchForge for system design practice.
Getting Started
How to Register and Login
Register by providing a username, email, and password. After registration, sign in with your credentials to access all features.
How to Browse Problems
Navigate to the Problems page to see the full problem library. Filter by difficulty (Easy, Medium, Hard) and search by title to find challenges that match your skill level.
How to Submit a DSL Solution
Open a problem, write your system architecture in the ArchForge DSL YAML format using the built-in Monaco editor, then click Submit Solution. Your submission will be evaluated by the AI scoring engine.
How to View Scores and Feedback
After submission, visit the Submissions page to view your score breakdown across six dimensions. Each score comes with detailed AI-generated feedback and evidence citations.
Problem Library
Problem Difficulty Levels
Easy problems focus on core concepts with limited scope — great for beginners. Medium problems require deeper architecture decomposition. Hard problems involve complex distributed systems with many trade-offs.
DSL YAML Format Overview
ArchForge uses a structured YAML DSL based on the C4 model with seven sub-modules: metadata, systems, relationships, events, capacity, decisions (ADRs), and non-functional requirements (NFRs).
metadatasystemsrelationshipseventscapacitydecisionsnfrsHow to Use the DSL Editor
The Monaco-based DSL editor provides syntax highlighting, auto-completion, and real-time validation. Hover over elements for documentation, use Ctrl+Space for suggestions, and check the validation panel for errors.
Sample DSL Snippet
metadata:
name: "URL Shortener"
version: "1.0"
author: "johndoe"
description: "A scalable URL shortening service"
systems:
api-gateway:
type: container
description: "NGINX reverse proxy"
shortener-service:
type: component
description: "Core URL shortening logic"
parent: api-gateway
cache:
type: container
description: "Redis cache for hot URLs"
relationships:
- from: api-gateway
to: shortener-service
type: sync-http
- from: shortener-service
to: cache
type: async-pubsub
events:
url_created:
producer: shortener-service
consumers: [analytics-service]
payload: { url_id: string, original_url: string }
capacity:
daily_active_users: 10_000_000
read_qps: 100_000
write_qps: 1_000
storage_tb: 50
decisions:
- id: ADR-001
title: "Use Redis for caching"
context: "Hot URL lookups dominate traffic"
decision: "Redis cluster with read replicas"
consequences: "Adds operational complexity but reduces DB load 90%"
nfrs:
availability: "99.95%"
latency_p99_ms: 50
security: "HTTPS-only, API key auth"How AI Scoring Works
Submissions are evaluated across six dimensions (each scored 1–5): Requirements Clarification & Scoping, Architecture Decomposition & Technical Depth, Trade-off Reasoning & Decision Quality, Failure Handling & Reliability, Cost Awareness & Operability, and Problem Alignment (how well the design matches the original problem statement). Problem Alignment carries the highest weight (25-30%).
You can choose from three weight schemes: Equitable (equal 20%), Junior (Requirements & Architecture 30% each), and Senior (Trade-offs & Failures 25% each).
Community Guidelines
Forum Usage Rules
Be respectful and constructive. Stay on topic within each category. Use appropriate tags (General, Question, Showcase, Announcement) for your posts.
Solution Sharing Etiquette
Share your DSL solutions with clear explanations. Describe your design decisions and trade-offs. Credit others ideas when you build upon them. Avoid posting solutions without context.
Voting on Solutions
Vote on community solutions to surface the best approaches. Upvote designs that are well-structured, clearly reasoned, and demonstrate strong technical depth. Constructive comments are encouraged.
Prohibited Content
Do not post spam, offensive material, personal attacks, or plagiarized content. Do not share solutions during active contests. Do not use the platform for commercial advertising.
Mute / Ban Policy
Violations of community guidelines may result in temporary muting or permanent account suspension. Moderators review reports and may issue warnings before taking action. Repeat offenders will be banned.
Admin Contact
For bug reports, feature requests, or account issues, please contact the admin team.
Bug Reports & Feature Requests
Encountered a bug or have an idea for a new feature? Send an email with a detailed description, steps to reproduce (for bugs), and any relevant screenshots or logs.
admin@archforge.devAccount Issues
For login problems, account recovery, role changes, or other account-related issues, reach out to the admin email. Include your registered username and a brief description of the issue.
admin@archforge.devDSL Language Reference
ArchForge DSL is a structured YAML format based on the C4 model for describing system architectures. It consists of seven sub-modules, each covering a distinct aspect of system design.
1. metadata/元数据
Identifies the design document: project name, version, authors, description, and tags. Always include this block so reviewers can trace the design provenance.
project:
name: "url_shortener"
display_name: "URL Shortener Service"
description: "A scalable URL shortening platform"
owner: "platform-team"
tags: ["web", "url-shortener"]
metadata:
schema_version: "1.0"
authors:
- name: "Alice Wang"
email: "alice@example.com"
role: architect
created_at: "2025-01-15"
description: "System design for the ArchForge URL shortener challenge"2. systems/系统定义
Defines the C4-model hierarchy: systems (L1), containers (L2), and components (L3). Each level nests within its parent. Use dot-notation references (e.g., "My System.API Gateway") for cross-referencing.
systems:
- name: "API Gateway"
description: "NGINX reverse proxy — entry point for all client traffic"
containers:
- name: "nginx"
technology: "NGINX 1.25"
type: gateway
components:
- name: "rate_limiter"
technology: "Lua + Redis"
type: handler
responsibilities:
- "Per-IP rate limiting"
- "Request throttling"
- name: "Shortener Service"
description: "Core URL shortening logic"
containers:
- name: "api_server"
technology: "FastAPI + Python 3.12"
type: api_server
- name: "postgres"
technology: "PostgreSQL 16"
type: database3. relationships/关系定义
Specifies how systems communicate: the source, target, protocol, and whether the interaction is synchronous or asynchronous. Use dot-notation to refer to nested containers and components.
relationships:
- type: calls
source: "API Gateway.nginx"
target: "Shortener Service.api_server"
protocol: https
synchronous: true
description: "Client requests proxied to shortener API"
- type: reads_from
source: "Shortener Service.api_server"
target: "Shortener Service.postgres"
protocol: jdbc
synchronous: true
- type: publishes_to
source: "Shortener Service.api_server"
target: "analytics_kafka.url_created_topic"
protocol: tcp
synchronous: false
description: "Emit URL creation events to Kafka"4. events/事件定义
Describes event-driven communication: broker technology, topics/queues, producer and consumer components, message schema format, and retention policies.
events:
brokers:
- name: "analytics_kafka"
type: kafka
version: "3.6"
config:
bootstrap_servers: "kafka:9092"
topics:
- name: "url_created_topic"
broker: "analytics_kafka"
type: topic
partitions: 6
replication_factor: 3
retention: "7d"
schema_format: avro
producers:
- "Shortener Service.api_server"
consumers:
- "Analytics Service.click_processor"5. capacity/容量估算
Estimates the system scale: daily active users (DAU), queries per second (QPS), storage requirements, and network bandwidth. These numbers drive architecture decisions like sharding and caching strategies.
capacity:
dau:
estimated: 10000000
peak_multiplier: 3.0
growth_yoy_pct: 50
qps:
average: 5000
peak: 15000
per_endpoint:
create_short_url: 2000
redirect: 12000
storage:
per_record_bytes: 512
records_per_day: 5000000
retention_days: 365
breakdown:
urls_table:
estimated_gb: 930
storage_type: relational
bandwidth:
ingress_mbps: 25
egress_mbps: 200
peak_egress_mbps: 6006. decisions (ADR)/架构决策记录
Documents architecture decisions using the ADR (Architecture Decision Record) format. Each decision includes the context, the chosen option, evaluated alternatives with pros/cons, and the consequences of the decision.
decisions:
- id: "ADR-0001"
title: "Use PostgreSQL for persistent storage"
status: accepted
date: "2025-01-15"
context: "Need a durable store for URL mappings with strong consistency"
decision: "PostgreSQL 16 with read replicas for scaling reads"
options:
- name: "PostgreSQL"
pros: ["ACID compliance", "Strong consistency", "Mature ecosystem"]
cons: ["Vertical scaling limits", "Replication lag on read replicas"]
trade_off_dimensions:
cost: medium
complexity: low
maturity: high
scalability: medium
risk_level: low
- name: "MongoDB"
pros: ["Schema flexibility", "Horizontal scaling"]
cons: ["Eventual consistency by default", "Complex transactions"]
trade_off_dimensions:
cost: medium
complexity: medium
maturity: high
scalability: high
risk_level: medium
consequences: "Strong consistency guarantees for URL mappings. Need connection pooling and read replica failover strategy."7. nfrs/非功能性需求
Defines non-functional requirements: availability targets, latency SLOs, throughput, data consistency model, and security requirements including authentication, encryption, and compliance frameworks.
nfrs:
availability:
target_pct: 99.95
max_downtime_minutes_per_month: 21.9
sla_description: "Three and a half nines"
latency:
p50_ms: 20
p95_ms: 100
p99_ms: 500
per_endpoint:
redirect:
p50_ms: 5
p95_ms: 20
p99_ms: 50
throughput:
peak_qps: 15000
sustained_qps: 5000
burst_qps: 25000
data_consistency: strong
security:
authentication: [oauth2, api_key]
authorization_model: rbac
data_classification: confidential
encryption_at_rest: true
encryption_in_transit: true
compliance: [soc2, gdpr]Common Mistakes
Missing required top-level fields
Every DSL document must include "version" and "project" at the top level. Without these, validation fails immediately.
A document starting directly with "systems:" without "version" and "project" fields.
Always begin with: version: "1.0" project: name: "my_project" Then add other sections.
Using flat identifiers instead of dot-notation in relationships
In the v1.0 schema, relationships use dot-notation references like "API Gateway.nginx" rather than simple IDs.
Wrong: source: "api-gateway"
Correct: source: "API Gateway.nginx"
Confusing NFRs with capacity estimates
Capacity (Module 5) is about expected scale — DAU, QPS, storage. NFRs (Module 7) are about requirements — latency targets, availability, security. Do not put latency SLOs in the capacity block.
Putting "latency_p99_ms: 500" inside the "capacity:" block.
Latency targets belong under "nfrs.latency.p99_ms". Capacity has "dau", "qps", "storage", and "bandwidth".
Omitting ADR options comparison
Every ADR decision must include at least 2 evaluated options with pros, cons, and trade-off dimensions. Single-option decisions are rejected.
Wrong: decisions with only one option or options without pros/cons.
Correct: Each ADR has 2+ options, each with "pros", "cons", and "trade_off_dimensions".