Skip to content

BlockCloud-dev/blockcloud-frontend

Repository files navigation

๐Ÿงฑ 3D Lego AWS Infrastructure Builder

A revolutionary visual infrastructure builder that lets you construct AWS cloud infrastructure using 3D Lego-style blocks. Drag, drop, connect, and watch your architecture come to life while generating production-ready Terraform code in real-time.

3D Lego AWS Builder

โœจ Features

๐ŸŽฏ Visual Infrastructure Design

  • 3D Lego Blocks: Each AWS service is represented as a unique Lego-style block
  • Drag & Drop: Intuitive building experience with grid snapping
  • Flat Panel Roads: Modern flat-style road connections between services
  • Physical Stacking: AWS architecture-compliant infrastructure layering
  • Interactive 3D Scene: Professional lighting, shadows, and camera controls

๐Ÿ—๏ธ AWS Architecture Intelligence

  • Smart Stacking: Automatic VPC โ†’ Subnet โ†’ Service layer detection
  • Road Network: Color-coded service communication paths
  • AWS-Compliant: Follows real AWS infrastructure relationships
  • Auto-Connections: Physical stacking creates infrastructure connections automatically
  • Manual Roads: Service-level connections via interactive road building

๐Ÿ—๏ธ AWS Services Support

  • ๐Ÿข EC2 - Office buildings for compute instances
  • ๐ŸŒ VPC - Network foundations
  • ๐Ÿ›ฃ๏ธ Subnets - Highway segments for network isolation
  • ๐Ÿช S3 - Warehouses for object storage
  • ๐Ÿ—„๏ธ RDS - Database towers
  • โš–๏ธ ALB - Traffic light load balancers
  • ๐Ÿ›ก๏ธ Security Groups - Guard posts for security
  • โšก Lambda - Function boxes for serverless
  • ๐Ÿšช API Gateway - Gateway arches for APIs

๐Ÿ’ป Advanced Code Generation

  • Terraform HCL: Production-ready infrastructure as code
  • Monaco Editor: Professional code editing with syntax highlighting
  • Real-time Generation: Code updates as you build
  • Export Functionality: Download your Terraform files

๐ŸŽฎ Interactive Experience

  • Keyboard Shortcuts: Professional workflow with hotkeys
  • Property Editing: Configure AWS resource parameters
  • Connection Management: Link services with visual feedback
  • Help System: Interactive tutorials and guides

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

  1. Clone the repository

    git clone <repository-url>
    cd 3d-lego-aws-builder
  2. Install dependencies

    npm install
  3. Start the development server

    npm run dev
  4. Open your browser Navigate to http://localhost:5173

๐ŸŽฏ How to Use

1. Building Infrastructure

  1. Select Components: Click AWS service blocks from the left palette
  2. Drag & Drop: Place blocks in the 3D scene with automatic grid snapping
  3. Physical Stacking: Stack components following AWS architecture (VPC โ†’ Subnet โ†’ EC2/SG/LB)
  4. Road Connections: Use connection mode for service communications (EC2 โ†” Security Group, EC2 โ†” EBS)
  5. Configure Properties: Use the right panel to edit resource parameters

2. AWS Architecture Rules

  • ๐Ÿ—๏ธ Physical Stacking (Infrastructure Layers):
    • VPC (Foundation) โ†’ Subnet โ†’ EC2, Security Group, Load Balancer
    • Automatic connections created when stacking
  • ๐Ÿ›ฃ๏ธ Road Connections (Service Communications):
    • EC2 โ†” Security Group (access control)
    • EC2 โ†” EBS Volume (storage attachment)
    • Load Balancer โ†” EC2 (traffic distribution)
    • Load Balancer โ†” Security Group (security rules)

3. Connection Types

  • Flat Panel Roads: Modern flat-style roads instead of cylindrical
  • Color-coded: Different colors for different connection types
  • Auto-detection: Physical stacking automatically creates infrastructure connections
  • Manual Roads: Service connections require manual road creation

4. Keyboard Shortcuts

  • Delete - Remove selected component
  • Escape - Deselect all components
  • Ctrl + G - Generate Terraform code
  • Ctrl + Shift + C - Clear entire workspace
  • F1 - Show help and tutorials

5. Code Generation

  • Real-time Updates: Terraform code generates automatically
  • Export: Click the download button to save .tf files
  • Validation: Built-in syntax checking and best practices

๐Ÿ—๏ธ Architecture

Technology Stack

  • React 18 - Modern UI framework
  • Three.js + React Three Fiber - 3D graphics and interactions
  • TypeScript - Type-safe development
  • Zustand - Lightweight state management
  • Monaco Editor - Professional code editing
  • Tailwind CSS - Utility-first styling
  • Vite - Fast development and building

Project Structure

src/
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ three/              # 3D scene components
โ”‚   โ”‚   โ”œโ”€โ”€ BaseLegoBlock.tsx
โ”‚   โ”‚   โ”œโ”€โ”€ ConnectionLine.tsx
โ”‚   โ”‚   โ””โ”€โ”€ Scene.tsx
โ”‚   โ””โ”€โ”€ ui/                 # User interface components
โ”‚       โ”œโ”€โ”€ BlockPalette.tsx
โ”‚       โ”œโ”€โ”€ CodeEditor.tsx
โ”‚       โ”œโ”€โ”€ PropertyPanel.tsx
โ”‚       โ”œโ”€โ”€ Toolbar.tsx
โ”‚       โ””โ”€โ”€ StatusBar.tsx
โ”œโ”€โ”€ hooks/                  # Custom React hooks
โ”œโ”€โ”€ store/                  # State management
โ”œโ”€โ”€ types/                  # TypeScript definitions
โ””โ”€โ”€ utils/                  # Utility functions

๐ŸŽจ Customization

Adding New AWS Services

  1. Define the service in types/infrastructure.ts
  2. Create block template in utils/blockTemplates.ts
  3. Add Terraform generation logic in store/infrastructureStore.ts

Styling Modifications

  • Lego colors defined in tailwind.config.js
  • 3D materials and lighting in components/three/
  • UI components use Tailwind utility classes

๐Ÿงช Development

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

Testing

# Run unit tests
npm run test

# Run tests with coverage
npm run test:coverage

๐Ÿ”ฎ Roadmap

Upcoming Features

  • ๐Ÿ”„ Import Terraform - Load existing .tf files
  • ๐ŸŒ Multi-Region Support - Global infrastructure visualization
  • ๐Ÿ’ฐ Cost Estimation - Real-time AWS pricing
  • โœ… Validation - Infrastructure best practices checking
  • ๐ŸŽต Sound Effects - Audio feedback for interactions
  • ๐Ÿ“ฑ Mobile Support - Touch-friendly interface

Advanced Capabilities

  • Team Collaboration - Real-time multi-user editing
  • Version Control - Infrastructure change tracking
  • Templates - Pre-built architecture patterns
  • Integration - CI/CD pipeline connections

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and test thoroughly
  4. Commit your changes: git commit -m 'Add amazing feature'
  5. Push to your branch: git push origin feature/amazing-feature
  6. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Three.js Community - For excellent 3D web graphics
  • AWS - For comprehensive cloud services
  • LEGO Group - For inspiring the block-based design concept
  • Terraform - For infrastructure as code innovation

๐Ÿ“ž Support


Built with โค๏ธ by developers who believe infrastructure should be as fun as playing with LEGO blocks!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages