An AI-powered bedtime story generator designed specifically for preschool children (ages 3-5) that creates personalized, educational stories while supporting early childhood development.
Try it now: https://velvety-entremet-8ac832.netlify.app/
- 🎨 Personalized Stories - AI-generated tales customized for each child
- 🔊 Audio Narration - Read-along feature with text highlighting
- 👨👩👧👦 Parental Controls - Content filtering and safety settings
- 📚 Story Library - Save and revisit favorite stories
- 🎯 Age-Appropriate - Content specifically designed for preschoolers
- 📱 Child-Friendly UI - Simple, colorful interface for young users
- Frontend: React, Vite
- Backend: Node.js, Express.js
- Database: MongoDB
- AI Integration: OpenAI GPT API
- Authentication: JWT, Google OAuth
- Hosting: Netlify (Frontend), Heroku (Backend)
- Docker
- Docker Compose
- OpenAI API key
- Clone the repository
git clone https://github.com/BUMETCS673/CS673OLSum25Team2.git
cd code
- Set up environment variables
# code/frontend/.env
VITE_GOOGLE_CLIENT_ID=your_google_client_id_here
# code/backend/.env
PORT=5500
NODE_ENV=development
MONGO_URI=your_mongodb_atlas_connection_string
SECRET=your_jwt_secret_here
OPENAI_API_KEY=your_openai_api_key_here
FIREBASE_API_KEY=your_firebase_api_key
FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
FIREBASE_PROJECT_ID=your_firebase_project_id
FIREBASE_STORAGE_BUCKET=your_project_id.firebasestorage.app
FIREBASE_MESSAGING_SENDER_ID=your_sender_id
FIREBASE_APP_ID=your_firebase_app_id
- Start the application with Docker
# Build and run all services
docker-compose up --build
# Run in detached mode
docker-compose up -d
- Access the application
- Production: https://velvety-entremet-8ac832.netlify.app/
- Local Frontend: http://localhost:5173
- Local Backend API: http://localhost:5500
- MongoDB: localhost:27017
# Stop all services
docker-compose down
# View logs
docker-compose logs
# View logs for specific service
docker-compose logs frontend
docker-compose logs backend
# Rebuild specific service
docker-compose build frontend
docker-compose build backend
# Clean up containers and images
docker-compose down --rmi all --volumes --remove-orphans
code/
├── frontend/
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── context/ # React context providers
│ │ ├── pages/ # Main application pages
│ │ └── assets/ # Images, icons, and static files
│ ├── public/ # Public assets
│ ├── .env # Frontend environment variables
│ └── Dockerfile # Frontend container config
├── backend/
│ ├── controllers/ # Request handlers
│ ├── models/ # Database schemas
│ ├── routes/ # API route definitions
│ ├── config/ # Configuration files
│ ├── .env # Backend environment variables
│ └── Dockerfile # Backend container config
├── docker-compose.yml # Multi-container setup
└── README.md # Project documentation
POST /api/auth/login
- User loginPOST /api/auth/signup
- User registrationPOST /api/auth/logout
- User logout
GET /api/stories
- Get user storiesPOST /api/stories/generate/story
- Generate new storyPOST /api/stories/generate/image
- Generate story imagePOST /api/stories/generate/audio
- Generate story audioPOST /api/stories/generate/audio_sample
- Generate audio sampleGET /api/stories/:id
- Get specific storyPUT /api/stories/:id/save
- Save story to favoritesDELETE /api/stories/:id
- Delete story
GET /api/settings
- Get user settingsGET /api/settings/enums
- Get settings enums/optionsPUT /api/settings/update
- Update user settings
Note: All story and settings endpoints require authentication.
This application is designed for:
- Primary Users: Children ages 3-5
- Secondary Users: Parents and caregivers
- Use Case: Bedtime routine enhancement and early literacy development