StoryTeller - Interactive Storytelling with Feature Flags
Overview
StoryTeller is an interactive choice-based storytelling application that demonstrates the power of feature flags for dynamic content delivery. Users can explore different narrative paths while administrators can control the user experience through feature toggles. The application now includes an innovative AI-powered storytelling feature,
AIStoryTeller, which generates custom stories on-demand using the Grok API and enhances the experience with text-to-speech narration.Features
Interactive Stories: Navigate through branching narratives with multiple choice paths
Feature Flag Integration: Real-time feature toggling using Flagsmith
Admin Dashboard: Control feature availability through an admin interface
Dynamic Theming: Theme changes based on story context (when enabled)
Responsive Design: Works on desktop and mobile devices
AIStoryTeller: Generate unique, on-demand stories using the Grok API with a floating chatbot interface, featuring theme-based styling (medieval, futuristic, horror) and text-to-speech narration
Tech Stack
React with TypeScript
Vite for fast development and building
React Router for navigation
Tailwind CSS for styling
Shadcn UI for component library
Flagsmith for feature flag management
Grok API for AI-generated storytelling
Getting Started
Prerequisites
Node.js (v16 or higher)
npm or yarn
Installation
Clone the repository
Install dependencies
Set up environment variables Create a
.env file in the root directory with the following variables:Start the development server
Feature Flags
The application uses Flagsmith for feature flag management. The following flags are used:
Flag Name Description
enable_dynamic_themes Enable theme changes based on story context use_first_person_narrative Use first person instead of second person narrative enable_detective_story Enable the detective story in the catalog show_continue_reading Show the continue reading section on the home page enable_story_sharing Allow users to share stories with others is_admin Enable access to admin dashboardApplication Flow
Loading
Setting Up Flagsmith
Create a free account at flagsmith.com
Create a new project and environment
Create feature flags with the names listed above
Copy your environment ID and add it to your
.env fileProject Structure
Available Scripts
npm run dev - Start the development servernpm run build - Build the application for productionnpm run preview - Preview the production build locallyLicense
This project is licensed under the MIT License - see the LICENSE file for details.
0 likes · 12 views · Mar 20, 2025
StoryTeller is a choice-based app using feature flags for dynamic content. AIStoryTeller powers custom stories via Grok API with text-to-speech narration.
Timeline
Mar 13, 2025 - Mar 18, 2025