An AI-powered interactive storytelling app for children where narrative adventures seamless blend with educational content.
Go anywhere and learn anything - your imagination is the limit!
- Real-time WebSocket communication
- Structured logging system
- AI/LLM integration (Multi-provider support: OpenAI, Google Gemini)
- Modern web interface with dynamic loading
- Middleware stack for request tracking and logging
- Backend: FastAPI, Python 3.x
- Frontend: HTML, CSS, WebSocket
- Database: SQLAlchemy with SQLite
- AI Integration:
- OpenAI GPT-4o
- Google Gemini
- Logging: Structured logging with JSON format
- Clone the repository
- Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # Linux/Mac # or .\venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file with required environment variables:# Choose one of these API keys based on your preferred provider OPENAI_API_KEY=your_openai_key GOOGLE_API_KEY=your_google_key
- Run the application:
uvicorn app.main:app --reload
app/
├── main.py # Application entry point
├── routers/ # API routes and WebSocket handlers
├── services/ # Business logic and LLM services
├── middleware/ # Custom middleware components
├── templates/ # HTML templates
├── static/ # Static assets (CSS, JS)
└── utils/ # Utility functions
- Run tests:
pytest
- View logs: Check
logs/app.log
- Development server runs on
http://localhost:8000