🌐 Live Demo: https://elimuai.onrender.com
AI-powered e-learning platform for Tanzania with Swahili/English support, gamification, certificates, and M-Pesa integration.
ElimuAI is a comprehensive e-learning platform designed for Tanzanian users, offering personalized AI tutoring in Swahili and English for Math, Business, and Vocational Skills. Built with mobile-first design, PWA support, and modern UI/UX for accessibility across Tanzania.
Try it now: https://elimuai.onrender.com
- Register a new account (with animated onboarding tour!)
- Browse courses in Math, Business, and Vocational Skills
- Take adaptive quizzes with instant feedback
- Chat with the AI tutor in Swahili or English
- Track your learning progress with charts
- Earn points, badges, and certificates
- Compete on the leaderboard
- 🤖 AI Chatbot Tutor - Intelligent NLP-based chatbot providing instant help in Swahili and English
- 📚 Adaptive Quizzes - Interactive quizzes with instant feedback and explanations
- 📊 Progress Tracking - Comprehensive dashboard with visual charts
- 🎯 Personalized Learning - Adaptive content based on user performance
- 🏆 Points & Levels - Earn XP for completing lessons, quizzes, and daily activities
- 🏅 Badges - Unlock achievements for milestones (First Steps, Quiz Master, etc.)
- 🔥 Streaks - Maintain daily learning streaks for bonus points
- 📈 Leaderboard - Compete with other learners (weekly/monthly/all-time)
- 📜 Certificates - Earn shareable certificates upon course completion
- 🌙 Dark/Light Mode - Toggle themes with smooth transitions
- 📱 PWA Support - Install as app, works offline
- 🎨 Modern Design - Glassmorphism, gradients, animations
- ⌨️ Keyboard Shortcuts - Navigate quickly with hotkeys
- 🔊 Sound Effects - Audio feedback for achievements
- 🎓 Onboarding Tour - Guided tour for new users
- 🌍 Bilingual Support - Full Swahili and English support
- 📱 Mobile-Responsive - Optimized for Android devices
- 💳 M-Pesa Integration - Seamless premium payments
- 🔔 Toast Notifications - Beautiful in-app notifications
- 👤 User Profiles - Avatar upload, stats, settings
- Python 3.11+
- Flask - Web framework
- SQLAlchemy - ORM for database management
- Flask-Login - User authentication
- SQLite - Database (easily upgradable to PostgreSQL)
- HTML5/CSS3 - Modern, responsive design
- Vanilla JavaScript - No framework dependencies
- Mobile-First Design - Optimized for Android devices
ElimuAI/
├── backend/ # Flask backend (Python)
├── frontend/ # Static files (HTML/CSS/JS)
├── docs/ # Documentation
├── config/ # Configuration files
├── scripts/ # Helper scripts
├── .gitignore # Git ignore rules
├── Procfile # Heroku deployment
└── README.md # This file
- Python 3.11 or higher
- pip (Python package manager)
- Git
- Clone the repository
git clone https://github.com/kadioko/ElimuAI.git
cd ElimuAI- Run setup script
# Windows
python scripts\setup.py
# macOS/Linux
python3 scripts/setup.py- Install dependencies
pip install -r config/requirements.txt- Set up environment variables
# Copy the example environment file
copy config\.env.example .env
# Edit .env and add your configuration- Run the application
# Windows
scripts\run.bat
# macOS/Linux
python backend/app.pyThe application will be available at http://localhost:5000
See docs/QUICKSTART.md for detailed quick start guide.
Create a .env file in the root directory with the following variables:
SECRET_KEY=your-secret-key-here-change-in-production
DATABASE_URL=sqlite:///elimuai.db
MPESA_CONSUMER_KEY=your-mpesa-consumer-key
MPESA_CONSUMER_SECRET=your-mpesa-consumer-secret
MPESA_SHORTCODE=your-business-shortcode
MPESA_PASSKEY=your-mpesa-passkey
MPESA_CALLBACK_URL=https://your-domain.com/api/mpesa/callback
FLASK_ENV=developmentTo enable M-Pesa payments:
- Register for M-Pesa Daraja API at https://developer.safaricom.co.ke/
- Create an app to get your Consumer Key and Consumer Secret
- Get your Business Shortcode and Passkey
- Update the
.envfile with your credentials - For production, change
MPESA_API_URLinconfig.pyfrom sandbox to production URL
- Heroku account (free tier available)
- Heroku CLI installed
- Login to Heroku
heroku login- Create a new Heroku app
heroku create elimuai-app- Set environment variables
heroku config:set SECRET_KEY=your-secret-key
heroku config:set MPESA_CONSUMER_KEY=your-key
heroku config:set MPESA_CONSUMER_SECRET=your-secret
heroku config:set MPESA_SHORTCODE=your-shortcode
heroku config:set MPESA_PASSKEY=your-passkey
heroku config:set MPESA_CALLBACK_URL=https://your-app.herokuapp.com/api/mpesa/callback- For production, upgrade to PostgreSQL
heroku addons:create heroku-postgresql:miniUpdate config.py to use Heroku's DATABASE_URL:
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'sqlite:///elimuai.db').replace('postgres://', 'postgresql://')- Deploy to Heroku
git add .
git commit -m "Initial deployment"
git push heroku main- Initialize the database
heroku run python
>>> from app import app, db
>>> with app.app_context():
>>> db.create_all()
>>> from seed_data import seed_database
>>> seed_database()
>>> exit()- Open your app
heroku open- Create account at https://render.com
- Create new Web Service
- Connect your GitHub repository
- Set build command:
pip install -r requirements.txt - Set start command:
gunicorn app:app - Add environment variables in dashboard
- Deploy
- Create account at https://www.pythonanywhere.com
- Upload your code via Git or file upload
- Create a new web app (Flask)
- Configure WSGI file to point to your app
- Set environment variables in web app settings
- Reload the web app
- Create account at https://railway.app
- Create new project from GitHub
- Add environment variables
- Deploy automatically
- id, username, email, password_hash
- phone_number, preferred_language
- is_premium, premium_expires
- created_at
- id, title (EN/SW), description (EN/SW)
- category, difficulty_level, is_premium
- created_at
- id, course_id, title (EN/SW)
- content (EN/SW), order
- created_at
- id, course_id, title (EN/SW)
- difficulty_level, created_at
- id, quiz_id, question_text (EN/SW)
- options A-D (EN/SW), correct_answer
- explanation (EN/SW)
- id, user_id, course_id, lesson_id
- completed, last_accessed
- id, user_id, quiz_id
- score, total_questions, answers
- completed_at
- id, user_id, amount, phone_number
- transaction_id, mpesa_receipt
- status, created_at, completed_at
POST /api/register- Register new userPOST /api/login- User loginPOST /api/logout- User logoutGET /api/user/profile- Get user profilePUT /api/user/profile- Update user profile
GET /api/courses- List all coursesGET /api/courses/<id>- Get course details
GET /api/lessons/<id>- Get lesson contentPOST /api/lessons/<id>/complete- Mark lesson complete
GET /api/quizzes/<id>- Get quiz questionsPOST /api/quizzes/<id>/submit- Submit quiz answers
POST /api/chatbot- Send message to AI tutor
GET /api/dashboard- Get user dashboard data
POST /api/mpesa/initiate- Initiate M-Pesa paymentPOST /api/mpesa/callback- M-Pesa callback handlerGET /api/mpesa/status/<id>- Check payment status
GET /api/gamification/stats- Get user points, level, streakGET /api/gamification/leaderboard- Get leaderboard (all/week/month)POST /api/gamification/award- Award points for actions
GET /api/certificates- Get user's certificatesPOST /api/certificates/generate/<course_id>- Generate certificateGET /api/certificates/verify/<cert_id>- Verify certificate
- Password hashing using Werkzeug
- CSRF protection via Flask-Login
- Secure session management
- Environment variable configuration
- SQL injection prevention via SQLAlchemy ORM
- Input validation on all forms
- Database: Easily migrate from SQLite to PostgreSQL for production
- Caching: Add Redis for session storage and caching
- CDN: Serve static files via CDN for better performance
- Load Balancing: Deploy multiple instances behind a load balancer
- Background Jobs: Use Celery for async tasks (email, notifications)
- API Rate Limiting: Implement rate limiting for API endpoints
| Key | Action |
|---|---|
H |
Go to Home |
C |
Go to Courses |
D |
Go to Dashboard |
T |
Open AI Tutor |
R |
View Rewards |
P |
Open Profile |
L |
Toggle Language |
M |
Toggle Dark Mode |
? |
Show Shortcuts |
Esc |
Close Modal |
- User authentication (register/login)
- Bilingual support (Swahili/English)
- AI chatbot tutor
- Adaptive quizzes with feedback
- Progress tracking dashboard
- M-Pesa payment integration
- Mobile-responsive design
- Deployed to production
- Gamification system (points, badges, leaderboards)
- Daily streaks and rewards
- Certificate generation
- PWA with offline support
- Dark/Light mode
- Sound effects
- Animated onboarding tour
- Keyboard shortcuts
- User profiles with avatars
- Progress charts
- Video lessons support
- Advanced AI with GPT/Claude integration
- Instructor dashboard
- Advanced analytics
- Push notifications
- Social learning features
- Mobile app (React Native/Flutter)
- Multi-tenant for schools
- Corporate training modules
- API for third-party integration
- Regional expansion (Kenya, Uganda, Rwanda)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.
For support, email support@elimuai.com or create an issue in the repository.
- Safaricom M-Pesa Daraja API
- Flask and Python community
- Tanzanian education sector
Built with ❤️ for Tanzanian learners