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.
- β 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
- β 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
- β Cross-browser compatibility (Chrome, Safari, Edge, Firefox)
- β Mobile-first responsive design
- β Web Components architecture
- β Modular template system
- β Comprehensive debugging tools
- β Performance optimized
- β PWA ready
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
- Web browser yang modern (Chrome 60+, Safari 12+, Edge 79+, Firefox 65+)
- Local web server (optional, untuk development)
- n8n instance untuk chatbot integration
- Clone repository
git clone https://github.com/yourusername/interactive-story-project.git
cd interactive-story-project
- Open in browser
# Langsung buka file
open index.html
# Atau gunakan local server (recommended)
python -m http.server 8000
# Then visit http://localhost:8000
- Configure chatbot (optional)
# Buka bot configuration
open chatbot-template/botSetting.html
- Setup n8n workflow: Import
chatbot-template/examples/n8n-chatbot-workflow.json
- Configure bot settings: Buka
chatbot-template/botSetting.html
- Set webhook URL: Update endpoint di konfigurasi bot
- Choose persona: Pilih dari predefined templates
- Test connection: Gunakan diagnostic tools
// 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);
# Gunakan setup script
./scripts/setup-new-project.sh my-new-story
# Atau manual copy template
cp -r chatbot-template/ /path/to/new-project/
# 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 | Version | Status |
---|---|---|
Chrome | 60+ | π’ Full Support |
Safari | 12+ | π’ Full Support |
Edge | 79+ | π’ Full Support |
Firefox | 65+ | π’ Full Support |
β οΈ 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
- Chatbot Template Guide: Dokumentasi lengkap template
- Browser Compatibility: Cross-browser support guide
- Template Usage: Cara menggunakan template system
- Fork repository ini
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add some amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
- 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
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with modern web standards
- Powered by n8n for chatbot integration
- Icons and images generated with AI assistance
- Cross-browser compatibility tested extensively
- π Explore Documentation: Familiarize dengan template system
- π§ͺ Test Integration: Gunakan diagnostic tools
- π¨ Customize: Apply story theme dan branding
- π Create New Stories: Use setup script untuk new projects
- π€ Contribute: Share improvements back ke community
π Happy storytelling! Mari buat interactive stories yang amazing! π