KidChat — Safe, Character-Switching Chat for Kids
Personal Project · Full-Stack Developer
KidChat: Safe, Character-Switching Chat for Children
KidChat is a playful chat application where children aged 6-10 can switch between three unique personas (Astra the Space Cat, RoboBuddy 3000, Captain Giggles) while the system enforces strict safety measures. Built with FastAPI and React, it demonstrates production-ready architecture with comprehensive safety protocols.
The FastAPI backend handles sessions, instant character switching, a deterministic intent engine for jokes, riddles, simple math, games, and educational content, plus a tiny permissible memory layer that remembers nicknames and harmless preferences. Safety filters block adult, violent, and PII content with friendly, in-character refusals.
Technical Architecture
- Backend (FastAPI): Modular architecture with safety.py, engine.py, personas.py, memory.py, and store.py for clean separation of concerns.
- Frontend (React + Vite + Tailwind): Character selection screen, fade transitions, avatar chips for quick switching, and responsive design from mobile to desktop.
- Safety System: Multi-layered content filtering with character-specific responses, PII protection, and violence detection.
- Memory Management: Lightweight vector-based preference storage with comprehensive information extraction and safety filtering.
Key Features
- Character Switching: Instant persona changes with context preservation and character-specific responses.
- Intent Recognition: 50+ interaction types including jokes, riddles, math, spelling, color mixing, and fun facts.
- Safety First: Comprehensive content blocking with positive redirection to appropriate topics.
- Educational Content: Age-appropriate learning activities delivered with character personality.
- Memory System: Smart extraction of preferences while maintaining strict safety standards.
Technical Highlights
The system is intentionally deterministic and LLM/RAG-ready, allowing for future AI integration without changing the API or UX. Performance is optimized with <20ms response times, and the architecture supports concurrent sessions with complete isolation. The rule-based approach provides predictable, safe interactions suitable for children while maintaining clear upgrade paths to more sophisticated AI systems.
Joshua Fields — full portfolio