Skip to content

namanjain24-sudo/archforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸš€ ArchForge β€” AI-Powered System Design Engine

ArchForge is an experimental AI-assisted system design engine that transforms natural language prompts into structured, production-inspired architecture diagrams.

It combines rule-based engineering, flow modeling, and LLM augmentation to generate system architectures with increasing realism and explainability.


🌐 Live Demo

πŸ‘‰ https://archforge.vercel.app


🧠 What It Does

Provide a prompt like:

"scalable e-commerce platform with payments and analytics"

ArchForge generates:

  • 🧩 System architecture diagram (React Flow)
  • πŸ— Microservices & infrastructure breakdown
  • πŸ”„ Multi-hop data flow pipelines
  • πŸ“¦ Data storage and messaging topology
  • πŸ’‘ AI + rule-based improvement suggestions

⚠️ Important Note

This project is not a perfect system design generator.

Generating diagrams is easy. Generating correct, production-grade system design is extremely hard.

ArchForge is an exploration of that problem space, not a final solution.


πŸ— Architecture Overview

The system follows a multi-stage pipeline:

Input β†’ Parser β†’ Capability Mapping β†’ Components β†’ AI Enhancement
     β†’ Flow Engine β†’ Graph Builder β†’ Validation β†’ Visualization

βš™οΈ Core Engine Pipeline

1. Parser

Extracts capabilities from user intent:

  • e-commerce
  • analytics
  • real-time
  • messaging

2. Capability Mapper

Maps capabilities into architectural layers:

  • Interaction
  • Processing
  • Data
  • Integration

3. Component Generator

Creates deterministic baseline components:

  • API Gateway
  • Services
  • Databases
  • Queues

4. AI Enhancement Layer

Hybrid system:

  • Rule-based inference (deterministic)
  • LLM-based augmentation (optional)

Supports:

  • OpenAI
  • Gemini
  • Groq
  • Ollama (local fallback)

Fail-safe:

If all AI fails β†’ engine still produces architecture


5. Flow Engine

Generates multi-hop execution pipelines:

Example:

Client β†’ CDN β†’ Gateway β†’ Service β†’ Cache β†’ DB
       β†’ Kafka β†’ Worker β†’ Data Warehouse
       β†’ Response β†’ Client

Includes:

  • async flows
  • event-driven pipelines
  • feedback loops
  • pipeline grouping

6. Validation Engine

Enforces system design principles:

βœ” Database per service βœ” No invalid connections βœ” Proper async boundaries βœ” No direct DW writes βœ” Cache usage rules


7. Agentic AI Layer (Experimental)

Implements:

  • Planner β†’ identifies architecture pattern
  • Critic β†’ detects flaws
  • Fixer β†’ attempts corrections

8. Graph Builder

Creates structured graph:

  • nodes (components)
  • edges (flows)
  • metadata (priority, type, layer)

9. View Engine

Generates multiple views:

  • Simple
  • Detailed
  • Layered
  • Flow view

🧠 Key Concepts Implemented

πŸ”Ή Multi-Hop Flow Modeling

Not just connections β€” full execution pipelines

πŸ”Ή Architecture Invariants

Ensures:

  • DB-per-service
  • async processing
  • proper layering

πŸ”Ή Domain-Aware Injection

Adds:

  • payment services
  • analytics pipelines
  • search systems

πŸ”Ή Hybrid AI System

Combines:

  • deterministic logic
  • LLM augmentation
  • fallback safety

πŸ”Ή Explainability

Each connection includes:

  • type (request/event/async)
  • reason (why it exists)

πŸ›  Tech Stack

Frontend

  • React
  • React Flow
  • Tailwind CSS

Backend

  • Node.js
  • Express

AI Layer

  • OpenAI / Gemini / Groq
  • Ollama (local models)

Visualization

  • Graph-based rendering
  • Layered architecture UI

πŸ“Έ Example Output

(Add screenshots here)


🚧 Current Limitations

  • Not 100% architecturally accurate
  • Some flows may still be overly generic
  • Complex distributed patterns (Saga, CQRS) are partially modeled
  • Visualization can become dense for large systems

🎯 What This Project Explores

  • Can system design be automated?
  • Where does AI fail in architecture reasoning?
  • How to combine rules + AI effectively?
  • How to validate system correctness programmatically?

πŸ§ͺ Future Improvements

  • Better connection validation engine
  • Stronger domain-specific architectures
  • Cleaner graph layout (reduce edge overlap)
  • More accurate async vs sync modeling
  • Improved AI reasoning with structured prompts
  • Collaboration & editing support

🀝 Contributing

Contributions are welcome!

Ideas:

  • Improve validation rules
  • Add new domain templates
  • Optimize flow engine
  • Improve UI/UX

πŸ“š Learnings

This project taught me that system design is not about diagrams β€” it's about constraints, trade-offs, and correctness.


πŸ“„ License

MIT


πŸ™Œ Feedback

Would love feedback from engineers working on large-scale systems.


⭐ If you like this project

Give it a star β€” it motivates further improvements!

Releases

No releases published

Packages

 
 
 

Contributors