MirrorWorld AI is an advanced 3D simulation platform that allows users to generate, visualize, and interact with complex systems using natural language and computer vision. By integrating Google's Gemini 1.5 Pro/Flash, it transforms text descriptions and uploaded diagrams into live, physics-based digital twins.
The goal of MirrorWorld is to bridge the gap between abstract ideas and concrete simulations. Instead of manually coding nodes and edges, users can simply say "Build a city with 3 hospitals and high traffic" or upload a sketch of a network, and the AI will construct a fully interactive 3D model.
This tool is designed for decision intelligenceallowing you to test "What If" scenarios in real-time.
MirrorWorld is versatile and can be applied in various domains:
-
Urban Planning & Smart Cities
- Simulate traffic flow, congestion, and public transit optimization.
- Test evacuation routes for disaster management (floods, earthquakes).
-
Healthcare Operations
- Model patient flow through hospitals.
- Optimize emergency room triage and resource allocation during surges.
-
Supply Chain & Logistics
- Visualize distribution networks (warehouses to hubs to retailers).
- Identify bottlenecks in delivery routes.
-
Network Topology
- Visualize server clusters and data flow.
- Simulate load balancing and connection failures.
Follow these steps to get MirrorWorld running locally.
- Node.js (v18 or higher)
- npm or yarn
- A Google Gemini API Key
-
Clone the Repository
git clone https://github.com/Musfiq-003/MirrorWorld.git cd MirrorWorld -
Install Dependencies
npm install
-
Configure Environment Variables
- Create a
.envfile in the root directory. - Add your Gemini API Key (get one from Google AI Studio).
VITE_GEMINI_API_KEY=your_actual_api_key_here
- Create a
-
Run Development Server
npm run dev
- Open your browser at
http://localhost:5173.
- Open your browser at
The sidebar is your command center. You can interact via:
- Text Mode: Type commands like "Create a futuristic city with floating drones" or "Simulate a hospital under high load".
- Vision Mode: Click the Image Icon to upload a map, diagram, or sketch. The AI will analyze the image and reconstruct the topology in 3D.
- Rotate: Left-click + Drag.
- Pan: Right-click + Drag.
- Zoom: Scroll wheel.
- Select: Click on any node to see its details (load, capacity, status).
- Play/Pause: Start or stop the physics engine.
- Manual Control: Use the "Settings" icon to manually drop nodes (Hospitals, Bridges, etc.) into the world.
- God Mode: Trigger disasters or miracles using natural language (e.g., "Collapse the main bridge").
MirrorWorld uses a sophisticated prompt engineering layer to communicate with Gemini:
- Spatial Reasoning: The AI understands coordinate systems (X, Y, Z) and can place objects at specific altitudes (e.g., flying drones vs. ground vehicles).
- Architectural Explanation: After generating a world, the AI acts as an architect, explaining why it placed certain buildings where it did and how the system flows.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License.