AI-Assisted Platform for Civil and Architectural Workflows
Quick Start β’ Features β’ Architecture β’ Documentation
CadArena is an AI-powered architectural design platform that transforms natural language prompts into professional CAD floor plans. Whether you're an architect, engineer, or designer, CadArena streamlines your workflow with intelligent design generation, real-time preview, and compliance checking.
- β±οΈ Time-consuming manual drafting β AI generates layouts in seconds
- π Iterative design cycles β Chat-driven modifications
- π Building code compliance β Automatic EBC 2023 validation
- π Language barriers β Arabic & English support
- πΎ Format compatibility β DXF export for AutoCAD/Revit
graph LR
A["Natural Language<br/>Prompt"] -->|AI Parser| B["Design Intent<br/>Classification"]
B -->|Layout Engine| C["Floor Plan<br/>Generation"]
C -->|Validator| D["EBC 2023<br/>Compliance Check"]
D -->|Renderer| E["DXF Export<br/>+ Preview"]
style A fill:#38CBEA,stroke:#71F3FF,color:#000
style B fill:#38CBEA,stroke:#71F3FF,color:#000
style C fill:#38CBEA,stroke:#71F3FF,color:#000
style D fill:#38CBEA,stroke:#71F3FF,color:#000
style E fill:#38CBEA,stroke:#71F3FF,color:#000
| Feature | Description |
|---|---|
| AI-Powered Generation | Convert prompts to professional floor plans instantly |
| Real-time Preview | See changes as you describe them |
| DXF Export | Compatible with AutoCAD, Revit, and other CAD tools |
| EBC 2023 Compliance | Automatic validation against Egyptian Building Code |
| Community Q&A | Share knowledge and get answers from architects |
| Multi-language | Arabic and English support |
| Responsive Design | Works on desktop, tablet, and mobile |
| WCAG 2.1 AA | Fully accessible to all users |
graph TB
subgraph Frontend["π¨ Frontend (React)"]
UI["React UI<br/>Components"]
Chat["Chat Interface"]
Preview["DXF Preview"]
Community["Community Hub"]
end
subgraph Backend["βοΈ Backend (FastAPI)"]
Router["Intent Router"]
Parser["Design Parser"]
Validator["Layout Validator"]
Renderer["DXF Renderer"]
end
subgraph Storage["πΎ Storage"]
DB["SQLite Database"]
Files["DXF Files"]
end
UI -->|HTTP/WebSocket| Router
Chat -->|Prompts| Router
Router -->|Classify Intent| Parser
Parser -->|Generate Layout| Validator
Validator -->|Validate EBC| Renderer
Renderer -->|Output| Preview
Renderer -->|Save| Files
Router -->|User Data| DB
Community -->|Q&A| DB
style Frontend fill:#61dafb,stroke:#0891b2,color:#000
style Backend fill:#009688,stroke:#00695c,color:#fff
style Storage fill:#ff9800,stroke:#e65100,color:#fff
sequenceDiagram
participant User
participant Frontend
participant Backend
participant Parser
participant Validator
participant Renderer
User->>Frontend: "3 bedroom apartment 100 sqm"
Frontend->>Backend: POST /design/generate
Backend->>Parser: Parse intent & extract specs
Parser->>Parser: Generate layout
Parser->>Validator: Validate against EBC 2023
alt Compliant
Validator->>Renderer: Render to DXF
Renderer->>Frontend: Return preview + file
Frontend->>User: Display floor plan
else Non-compliant
Validator->>Backend: Return violations
Backend->>Frontend: Suggest modifications
Frontend->>User: "Adjust room sizes..."
end
- Python 3.12+
- Node.js 18+
- npm or yarn
- Docker (optional)
cd backend
# Setup environment
cp .env.example .env
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd frontend
# Install dependencies
npm install
# Start development server
npm start- React App: http://localhost:3000
- Studio: http://localhost:3000/studio
- Community: http://localhost:3000/community
- API Docs: http://127.0.0.1:8000/docs
# From project root
docker compose -f docker/docker-compose.yml up --build
# Access at http://localhost:8000CadArena/
βββ π backend/ # FastAPI application
β βββ app/
β β βββ main.py # Application entry point
β β βββ routes/ # API endpoints
β β βββ models/ # Database models
β β βββ schemas/ # Pydantic schemas
β β βββ services/
β β β βββ design_parser/ # Layout generation engine
β β β β βββ layout_planner.py # Spatial planning
β β β β βββ layout_validator.py # EBC compliance
β β β β βββ opening_planner.py # Door/window placement
β β β β βββ egyptian_building_code.py # EBC constants
β β β βββ intent_router.py # Intent classification
β β β βββ dxf_room_renderer.py # DXF generation
β β βββ utils/
β β β βββ design_prompt.py # System prompts
β β βββ tests/ # Test suite
β βββ requirements.txt
β βββ .env.example
β βββ README.md
β
βββ π frontend/ # React application
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ hooks/ # Custom hooks
β β βββ utils/ # Utilities
β β βββ styles/ # Global styles
β β βββ App.js
β β βββ index.js
β βββ public/
β β βββ assets/ # Logo & images
β β βββ studio-app/ # Legacy studio
β βββ package.json
β βββ tailwind.config.js
β βββ jest.config.js
β βββ README.md
β
βββ π docker/ # Container setup
β βββ Dockerfile # Multi-stage build
β βββ docker-compose.yml # Compose config
β βββ README.md
β
βββ π docs/ # Documentation
β βββ ARCHITECTURE.md
β βββ API.md
β βββ DESIGN.md
β
βββ .dockerignore
βββ .gitignore
βββ LICENSE
βββ README.md
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.12+ | Core language |
| FastAPI | 0.100+ | Web framework |
| SQLAlchemy | 2.0+ | ORM |
| Pydantic | 2.0+ | Data validation |
| Uvicorn | 0.23+ | ASGI server |
| pytest | 7.0+ | Testing |
| Technology | Version | Purpose |
|---|---|---|
| React | 18+ | UI framework |
| Tailwind CSS | 3.0+ | Styling |
| Framer Motion | 10+ | Animations |
| Lucide React | Latest | Icons |
| Jest | 29+ | Testing |
| React Testing Library | 14+ | Component testing |
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Docker Compose | Orchestration |
| Git | Version control |
# Backend tests
cd backend
pytest app/tests -v
# Frontend tests
cd frontend
npm test
# With coverage
pytest app/tests --cov=app
npm test -- --coverage- Backend: Unit tests, integration tests, API tests
- Frontend: Component tests, hook tests, utility tests
- EBC Compliance: 15+ test cases for building code validation
docker compose -f docker/docker-compose.yml up --build- β Multi-stage build for optimized images
- β Non-root user for security
- β Health checks for monitoring
- β Volume persistence for data
- β Network isolation
- β Environment configuration
See docker/README.md for detailed instructions.
- Backend README - API documentation and setup
- Frontend README - Component guide and development
- Docker README - Deployment and containerization
- Architecture - System design and decisions
- API Reference - Complete API documentation
CadArena enforces Egyptian Building Code (EBC 2023) standards:
graph LR
A["Bedroom<br/>9.0 mΒ²<br/>2.75 m min"] -->|EBC Ch.7| B["Bathroom<br/>2.5 mΒ²<br/>1.20 m min"]
B --> C["Kitchen<br/>4.0 mΒ²<br/>1.80 m min"]
C --> D["Living<br/>12.0 mΒ²<br/>3.00 m min"]
D --> E["Corridor<br/>1.20 m width<br/>HARD LIMIT"]
style A fill:#4CAF50,stroke:#2E7D32,color:#fff
style B fill:#4CAF50,stroke:#2E7D32,color:#fff
style C fill:#4CAF50,stroke:#2E7D32,color:#fff
style D fill:#4CAF50,stroke:#2E7D32,color:#fff
style E fill:#f44336,stroke:#c62828,color:#fff
| Type | Min Area | Typical Rooms |
|---|---|---|
| Studio | 25β45 mΒ² | 1 room + kitchen + bathroom |
| 1-Bedroom | 45β75 mΒ² | 1 bed + living + kitchen + bathroom |
| 2-Bedroom | 75β120 mΒ² | 2 beds + living + kitchen + bathroom |
| 3-Bedroom | 100β160 mΒ² | 3 beds + living + kitchen + 2 bathrooms |
| 4-Bedroom | 140β220 mΒ² | 4 beds + living + kitchen + 2 bathrooms |
| Villa | 200β500 mΒ² | Multiple zones + outdoor spaces |
graph LR
A["β Bathroom"] -->|Forbidden| B["Kitchen"]
C["β Bedroom"] -->|Forbidden| D["Kitchen"]
E["β Bathroom"] -->|Forbidden| F["Dining"]
style A fill:#f44336,stroke:#c62828,color:#fff
style B fill:#f44336,stroke:#c62828,color:#fff
style C fill:#f44336,stroke:#c62828,color:#fff
style D fill:#f44336,stroke:#c62828,color:#fff
style E fill:#f44336,stroke:#c62828,color:#fff
style F fill:#f44336,stroke:#c62828,color:#fff
We welcome contributions! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes and commit (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style
- Write tests for new features
- Update documentation
- Ensure all tests pass
- Keep commits atomic and well-documented
- Non-root Docker user
- Environment variable management
- Input validation and sanitization
- CORS configuration
- Rate limiting
- Security headers
For security concerns: security@cadarena.dev
This project is licensed under the MIT License - see LICENSE for details.
- π Documentation
- π¬ Community Discussions
- π Report Issues
- π‘ Feature Requests
- Website: cadarena.dev
- Community: cadarena.dev/community
- Email: cadarena.ai@gmail.com
Built with β€οΈ using:
- FastAPI - Modern Python web framework
- React - UI library
- Tailwind CSS - Utility-first CSS
- Framer Motion - Animation library
- Lucide React - Icon library
- Jest - Testing framework
- pytest - Python testing
- Backend: Python + FastAPI
- Frontend: React + Tailwind CSS
- Tests: 100+ test cases
- Components: 20+ reusable components
- API Endpoints: 30+ endpoints
- Documentation: Comprehensive
- Accessibility: WCAG 2.1 AA compliant
- Building Code: EBC 2023 compliant
Made with β€οΈ by the CadArena Team