StudyAI is a full‑featured AI‑powered learning platform. It provides:
- AI chat assistant (powered by Gemini / OpenRouter)
- YouTube video search & transcript analysis
- News, images, and visual search
- Knowledge mapping & summarization
- Premium subscription plans (Stripe / Razorpay)
- User authentication (email + Google OAuth)
- AI Chat Assistant – Ask any study question, get step‑by‑step solutions.
- YouTube Integration – Search videos, fetch transcripts, and get summaries.
- News & Image Search – Stay updated with GNews and Unsplash.
- Visual Learning – Diagram generation, visual search, and image analysis.
- Knowledge Mapping – Create concept maps from your notes.
- Payments – Support for Stripe, Razorpay, and UPI.
- User Dashboard – Track your history, settings, and subscription.
git clone https://github.com/yourusername/StudyAI.git
cd StudyAI
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
venv\Scripts\activate # Windows
pip install -r requirements.txt
Copy the example file and fill in your real API keys:
cp .env.example .env
nano .env # or use any text editor
⚠️ Important: Never commit your.envfile. Add it to.gitignore.
The app will create studyai.db automatically on first run.
If you use migrations (Alembic), run:
flask db upgrade
python app.py
The app will be available at http://localhost:5000.
For production, use a WSGI server like Gunicorn:
gunicorn -w 4 app:app
All sensitive data is loaded from environment variables (.env). The main configuration file is config.py – it reads os.getenv() for every key.
| Variable | Description |
|---|---|
OPENROUTER_API_KEY |
OpenRouter API key (for LLM access) |
GEMINI_API_KEY |
Google Gemini API key (or comma‑separated list in GEMINI_API_KEYS for rotation) |
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET |
OAuth credentials for Google login |
SECRET_KEY |
Flask secret – use a long random string |
MAIL_USERNAME / MAIL_PASSWORD |
SMTP credentials for sending emails |
STRIPE_SECRET_KEY / RAZORPAY_KEY_SECRET |
Payment gateway secrets |
RECAPTCHA_SITE_KEY / RECAPTCHA_SECRET_KEY |
Google reCAPTCHA keys |
YOUTUBE_API_KEY |
YouTube Data API v3 key |
For the full list, see .env.example.
The default plans (free, basic, pro, enterprise) are defined in config.py. You can override prices, limits, and feature names via environment variables (see .env.example for overrides).
Run unit tests (if available):
pytest tests/
If a Dockerfile exists:
docker build -t studyai .
docker run -p 5000:5000 --env-file .env studyai
For services that need a public URL (e.g., webhooks), you can store your tunnel URL in tunnel.txt – the app reads it via the link() function in config.py.
Contributions are welcome! Please open an issue or pull request.
- Fork the repository.
- Create a feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This project is licensed under the MIT License – see the LICENSE file for details.
- Admin Email:
admin@example.com(set viaADMIN_EMAILenv) - Project Link: https://github.com/anshumanhq/StudyAI
- Google Gemini / OpenRouter for AI capabilities
- Stripe & Razorpay for payment processing
- Unsplash, GNews, YouTube Data API for content
- Flask and all open‑source libraries used
Happy Learning! 🎓