An open API service indexing awesome lists of open source software.

https://github.com/octavadi/interactive-story-project

๐Ÿ”ง Modular Interactive Story Template | n8n Chatbot Integration | Web Components Architecture | Cross-browser Compatible | Perfect for creating engaging story experiences with AI narrator support
https://github.com/octavadi/interactive-story-project

ai-narrator chatbot cross-browser css3 html5 interactive-fiction interactive-story javascript modular-architecture n8n-integration responsive-design story-template storytelling template-system web-components

Last synced: about 1 month ago
JSON representation

๐Ÿ”ง Modular Interactive Story Template | n8n Chatbot Integration | Web Components Architecture | Cross-browser Compatible | Perfect for creating engaging story experiences with AI narrator support

Awesome Lists containing this project

README

          

# ๐Ÿ“– Interactive Story Project

[![GitHub](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![HTML5](https://img.shields.io/badge/HTML5-E34F26?logo=html5&logoColor=white)](#)
[![CSS3](https://img.shields.io/badge/CSS3-1572B6?logo=css3&logoColor=white)](#)
[![JavaScript](https://img.shields.io/badge/JavaScript-F7DF1E?logo=javascript&logoColor=black)](#)

Template sistem untuk membuat interactive story dengan integrasi chatbot n8n. Proyek ini menggunakan arsitektur modular dengan chatbot template yang dapat digunakan ulang di berbagai proyek story.

## โœจ Demo

![Interactive Story Demo](assets/images/posterStory_gemini2.5.png)

## ๐Ÿš€ Features

### ๐Ÿ“– Story Features
- โœ… Interactive story content dengan pilihan cerita
- โœ… Editable text (double-click to edit)
- โœ… Image upload untuk scenes
- โœ… Responsive design untuk semua device
- โœ… Navigation system yang intuitif
- โœ… Chat history dan save progress

### ๐Ÿค– Chatbot Features
- โœ… n8n workflow integration
- โœ… Real-time chat dengan typing indicators
- โœ… Configurable bot personality
- โœ… Multiple persona templates
- โœ… Message history dan context awareness
- โœ… Error handling & retry mechanism
- โœ… Webhook security protection

### ๐Ÿ”ง Technical Features
- โœ… Cross-browser compatibility (Chrome, Safari, Edge, Firefox)
- โœ… Mobile-first responsive design
- โœ… Web Components architecture
- โœ… Modular template system
- โœ… Comprehensive debugging tools
- โœ… Performance optimized
- โœ… PWA ready

## ๐Ÿ—๏ธ Project Structure

```
interactiveStory_proj/
โ”œโ”€โ”€ ๐Ÿ“„ index.html # Main story page
โ”œโ”€โ”€ ๐Ÿ“„ discussion.html # Discussion page
โ”œโ”€โ”€ ๐ŸŽจ styles/ # Styling files
โ”‚ โ”œโ”€โ”€ main.css # Core styles
โ”‚ โ”œโ”€โ”€ index.css # Homepage styles
โ”‚ โ”œโ”€โ”€ discussion.css # Discussion page styles
โ”‚ โ””โ”€โ”€ browser-compatibility.css # Cross-browser support
โ”œโ”€โ”€ โšก js/ # JavaScript files
โ”‚ โ”œโ”€โ”€ main.js # Main story logic
โ”‚ โ”œโ”€โ”€ browser-polyfills.js # Browser compatibility
โ”‚ โ”œโ”€โ”€ error-handler.js # Error management
โ”‚ โ”œโ”€โ”€ performance-utils.js # Performance utilities
โ”‚ โ””โ”€โ”€ chat-history-manager.js # Chat history functionality
โ”œโ”€โ”€ ๐Ÿค– chatbot-template/ # Reusable chatbot system
โ”‚ โ”œโ”€โ”€ components/ # Chat UI components
โ”‚ โ”œโ”€โ”€ js/ # Core chatbot logic
โ”‚ โ”œโ”€โ”€ styles/ # Chatbot styling
โ”‚ โ”œโ”€โ”€ tools/ # Debugging tools
โ”‚ โ”œโ”€โ”€ examples/ # Configuration examples
โ”‚ โ””โ”€โ”€ docs/ # Template documentation
โ”œโ”€โ”€ ๐Ÿงช testing/ # Test files
โ”‚ โ”œโ”€โ”€ test-chat-history.html
โ”‚ โ”œโ”€โ”€ test-discussion.html
โ”‚ โ”œโ”€โ”€ browser-test.html
โ”‚ โ””โ”€โ”€ test-markdown-cleanup.html
โ”œโ”€โ”€ ๐Ÿงฉ components/ # Shared components
โ”‚ โ””โ”€โ”€ shared-footer.js
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ assets/ # Static assets
โ”‚ โ”œโ”€โ”€ images/ # Story images
โ”‚ โ””โ”€โ”€ icons/ # UI icons
โ””โ”€โ”€ ๐Ÿ› ๏ธ scripts/ # Utility scripts
โ”œโ”€โ”€ cleanup-old-files.sh
โ””โ”€โ”€ setup-new-project.sh
```

## ๐Ÿš€ Quick Start

### ๐Ÿ“‹ Prerequisites
- Web browser yang modern (Chrome 60+, Safari 12+, Edge 79+, Firefox 65+)
- Local web server (optional, untuk development)
- n8n instance untuk chatbot integration

### ๐ŸŽฏ Running Locally

1. **Clone repository**
```bash
git clone https://github.com/yourusername/interactive-story-project.git
cd interactive-story-project
```

2. **Open in browser**
```bash
# Langsung buka file
open index.html

# Atau gunakan local server (recommended)
python -m http.server 8000
# Then visit http://localhost:8000
```

3. **Configure chatbot** (optional)
```bash
# Buka bot configuration
open chatbot-template/botSetting.html
```

### โš™๏ธ Configuration

#### ๐Ÿค– Bot Setup
1. **Setup n8n workflow**: Import `chatbot-template/examples/n8n-chatbot-workflow.json`
2. **Configure bot settings**: Buka `chatbot-template/botSetting.html`
3. **Set webhook URL**: Update endpoint di konfigurasi bot
4. **Choose persona**: Pilih dari predefined templates
5. **Test connection**: Gunakan diagnostic tools

#### ๐ŸŽจ Customization
```javascript
// Configure story-specific bot
const storyConfig = {
botName: "Story Narrator",
botDescription: "Your guide through this adventure",
botAvatar: "๐Ÿ“š",
webhookUrl: "YOUR_WEBHOOK_URL_HERE", // Jangan commit URL asli!
theme: {
primaryColor: "#3b82f6",
secondaryColor: "#60a5fa"
}
};

window.ConfigManager.saveConfig(storyConfig);
```

## ๐Ÿ› ๏ธ Development

### ๐Ÿ†• Creating New Story Project
```bash
# Gunakan setup script
./scripts/setup-new-project.sh my-new-story

# Atau manual copy template
cp -r chatbot-template/ /path/to/new-project/
```

### ๐Ÿงช Testing
```bash
# Browser compatibility test
open testing/browser-test.html

# Chat history test
open testing/test-chat-history.html

# Webhook connection test
open chatbot-template/tools/test-webhook-connection.html

# n8n diagnostic
open chatbot-template/tools/n8n-diagnostic.html
```

### ๐Ÿ“ฑ Browser Support

| Browser | Version | Status |
|---------|---------|--------|
| **Chrome** | 60+ | ๐ŸŸข Full Support |
| **Safari** | 12+ | ๐ŸŸข Full Support |
| **Edge** | 79+ | ๐ŸŸข Full Support |
| **Firefox** | 65+ | ๐ŸŸข Full Support |

## ๐Ÿ”’ Security

> **โš ๏ธ Important**: Jangan commit webhook URLs atau API keys ke repository!

- Gunakan environment variables untuk sensitive data
- Webhook URLs dan secrets sudah di-exclude dalam `.gitignore`
- Test konfigurasi menggunakan file local yang tidak di-track git

## ๐Ÿ“š Documentation

- **[Chatbot Template Guide](chatbot-template/README.md)**: Dokumentasi lengkap template
- **[Browser Compatibility](BROWSER_COMPATIBILITY.md)**: Cross-browser support guide
- **[Template Usage](TEMPLATE_USAGE.md)**: Cara menggunakan template system

## ๐Ÿค Contributing

1. Fork repository ini
2. Create feature branch (`git checkout -b feature/amazing-feature`)
3. Commit changes (`git commit -m 'Add some amazing feature'`)
4. Push to branch (`git push origin feature/amazing-feature`)
5. Open Pull Request

## ๐Ÿ› Troubleshooting

### Common Issues
- **Webhook 404**: Pastikan n8n workflow sudah aktif
- **Config Not Saving**: Cek localStorage availability di browser
- **Components Not Loading**: Periksa script loading order
- **CORS Errors**: Configure n8n CORS settings

### Debug Tools
- Gunakan `testing/browser-test.html` untuk compatibility testing
- Check `chatbot-template/tools/` untuk debugging utilities
- Buka browser console untuk error messages
- Test webhook connectivity dengan diagnostic tools

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- Built with modern web standards
- Powered by n8n for chatbot integration
- Icons and images generated with AI assistance
- Cross-browser compatibility tested extensively

## ๐ŸŽ‰ Next Steps

1. **๐Ÿ“– Explore Documentation**: Familiarize dengan template system
2. **๐Ÿงช Test Integration**: Gunakan diagnostic tools
3. **๐ŸŽจ Customize**: Apply story theme dan branding
4. **๐Ÿš€ Create New Stories**: Use setup script untuk new projects
5. **๐Ÿค Contribute**: Share improvements back ke community

---

**๐Ÿš€ Happy storytelling! Mari buat interactive stories yang amazing! ๐Ÿš€**