AI-Powered Interactive Story Creator - Create immersive narrative worlds with AI-generated characters, scenes, and interactive mystery gameplay.
๐ฌ Contact: @jayfxfx on Telegram
| Feature | Description |
|---|---|
| ๐ฃ๏ธ Natural Language Creation | Describe your world in plain English and watch it come to life |
| ๐ญ AI-Generated NPCs | Unique characters with personalities, goals, and hidden secrets |
| ๐จ AI Visuals | Environment scenes and character portraits generated by AI |
| ๐บ๏ธ Interactive World Map | Visual world builder with draggable location markers |
| ๐ Mystery Game Mode | Play through stories as interactive detective games |
| ๐ฌ Multi-turn Editing | 5-turn context memory for coherent story refinement |
| Category | Technology |
|---|---|
| Frontend | React 18 + Vite |
| Styling | Tailwind CSS + shadcn/ui |
| 3D Engine | Three.js + React Three Fiber |
| LLM | OpenRouter API (Gemini 2.5 Flash) |
| Image Generation | Google Gemini |
| Deployment | Cloudflare Pages |
- Node.js 18+
- OpenRouter API Key
- Google Gemini API Key
# Clone the repository
git clone https://github.com/socekin/flimo_world.git
cd flimo_world
# Install dependencies
npm install
# Copy environment example
cp .env.example .env.localEdit .env.local with your API keys:
# LLM (Required)
VITE_OPENROUTER_API_KEY=your_openrouter_key
VITE_OPENROUTER_MODEL=google/gemini-3-flash-preview
# Image Generation (Required)
VITE_GEMINI_API_KEY=your_gemini_key
VITE_GEMINI_IMAGE_MODEL=gemini-2.0-flash-exp-image-generationnpm run dev
# Open http://localhost:5173npm run buildflimo_world/
โโโ src/
โ โโโ agent/ # AI Agent System
โ โ โโโ orchestrator/ # Workflow orchestrator
โ โ โโโ router/ # Intent recognition & routing
โ โ โโโ skills/ # Modular skill modules (19+ skills)
โ โโโ components/ # Shared React components
โ โโโ pages/ # Page components (Create, Play, Game)
โ โโโ game/ # 3D game mode components
โ โโโ lib/ # API clients & utilities
โ โโโ i18n/ # Internationalization
โโโ public/ # Static assets (images, videos, fonts)
โโโ *.json # Sample story & NPC data
flowchart LR
subgraph Input
A[User Prompt]
end
subgraph LLM["๐ค LLM Processing"]
B[Story World Generator]
C[NPC Designer]
D[Mystery Generator]
end
subgraph ImageAI["๐จ Image AI"]
E[Environment Image]
F[NPC Portrait]
G[World Map Image]
end
subgraph Output
H[Complete Story]
end
A --> B
B --> C
C --> D
B --> E
C --> F
D --> G
E --> H
F --> H
G --> H
Create Mode LLM Skills (18 Skills):
| Skill | LLM Call | Description |
|---|---|---|
story-world |
โ | Generate world setting, background, truth |
story-npc |
โ | Create NPCs with personalities & secrets |
mystery-world |
โ | Generate mystery plot & clues |
mystery-npc |
โ | Create NPC dual versions (creator/player) |
environment-image |
โ | Generate scene images via Gemini |
npc-image |
โ | Generate character portraits |
worldmap-layout |
โ | Plan location layout on map |
worldmap-image |
โ | Generate final world map image |
flowchart TD
subgraph Init["Game Start"]
A[Create Session] --> B[Initialize NPCs]
end
subgraph Loop["๐ Behavior Loop"]
C{NPC Idle?}
D["๐ค Think API"]
E[Get New Action]
F[Navigate to Location]
G[Perform Action]
end
subgraph Chat["๐ฌ Player Interaction"]
H[Open Chat]
I["๐ค Chat API"]
J[NPC Response]
K[Update Memory]
end
B --> C
C -->|Yes| D
D --> E
E --> F
F --> G
G --> C
C -->|Player talks| H
H --> I
I --> J
J --> K
K --> C
Play Mode LLM APIs:
| API | LLM Call | Description |
|---|---|---|
POST /sessions |
โ | Initialize NPC states with AI |
POST /npcs/{id}/think |
โ | NPC decides next action |
POST /chat |
โ | NPC responds to player |
POST /interact |
โ | NPC-to-NPC dialogue |
POST /chat/open |
โ | NPC greeting when player opens chat |
POST /chat/close |
โ | Summarize conversation to memory |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under CC BY-NC-SA 4.0.
- โ Attribution - You must give appropriate credit
- โ ShareAlike - Derivatives must use the same license
- โ NonCommercial - Commercial use is not permitted
- OpenRouter - LLM API Gateway
- Google Gemini - AI Image Generation
- Three.js - 3D Graphics
- Vite - Build Tool
- Tailwind CSS - Styling
Made with โค๏ธ by Jay