Skip to content
Proyek

Tentang

๐Ÿง  Study Dost AI - Your AI study buddy that explains STEM concepts 3 ways, helps you practice, and rewards your curiosity

AI dan pembelajaran mesin

Cara angka ini diukur

Yang dapat Anda lakukan

  • ๐ŸŽค Voice Input - Ask questions using speech recognition
  • ๐Ÿ—ฃ๏ธ Text-to-Speech - Listen to explanations hands-free
  • ๐Ÿ“ LaTeX Math - Beautiful equation rendering with KaTeX
  • ๐Ÿ’ป Code Highlighting - Syntax-highlighted code blocks

Pertumbuhan bintang terukur

dalam 24 jam
0
dalam 7 hari
0
dalam 15 hari
+1
dalam 1 bulan
Mengumpulkan riwayat

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli

๐ŸŽฏ The Problem

"Textbooks explain things one way. But every student's brain learns differently."

๐Ÿ’ก The Solution

Study Dost AI explains any STEM concept in 3 different ways simultaneously โ€” step-by-step, real-world analogy, and visual cue โ€” so the explanation that clicks with YOU is always one click away.



3 Explanation Styles
Step-by-step โ€ข Analogy โ€ข Visual

Gamified Learning
XP โ€ข Levels โ€ข Badges โ€ข Streaks

Country-Aware
Bangladesh โ€ข India โ€ข Global

๐Ÿ“‘ Table of Contents

๐Ÿ—‚ Click to expand

โœจ Features

๐ŸŽ“ Core Learning Engine

๐Ÿ”ข Triple Explanation Engine

Get any concept explained 3 different ways at once:

  • ๐Ÿ“ Step-by-Step โ€” methodical walkthrough
  • ๐ŸŒ Real-World Analogy โ€” relatable comparisons
  • ๐ŸŽจ Visual Cue โ€” sketchable diagrams

๐ŸŽฏ Smart Practice Problems

AI-generated practice with adaptive difficulty:

  • ๐ŸŸข Easy โ€” concept reinforcement
  • ๐ŸŸก Medium โ€” applied thinking
  • ๐Ÿ”ด Hard โ€” JEE/NEET/HSC level

๐Ÿ‘ถ ELI10 Mode

"Explain Like I'm 10" โ€” ultra-simple breakdowns when something just isn't clicking. Perfect for breaking through learning blocks.

๐ŸŒ Country-Aware Curriculum

Tailored to your education system:

  • ๐Ÿ‡ง๐Ÿ‡ฉ NCTB / SSC / HSC / Creative Questions
  • ๐Ÿ‡ฎ๐Ÿ‡ณ NCERT / CBSE / JEE / NEET
  • ๐ŸŒ International standards

๐ŸŽฎ Gamification System

๐Ÿ†
XP & Levels
Level up as you learn
๐Ÿ”ฅ
Daily Streaks
Build consistency
๐ŸŽ–๏ธ
Achievement Badges
Unlock milestones
๐ŸŽ‰
Confetti Rewards
Celebrate wins
๐Ÿพ
Pet Mascot
Animated companion
๐ŸŽจ
5 Themes
Midnight, Cosmic+
๐Ÿ’พ
Favorites
Save explanations
๐Ÿ“
History
Auto-saved sessions

๐Ÿš€ Advanced Features

๐ŸŽค Click to see all power features
Feature Description
๐ŸŽค Voice Input Ask questions using speech recognition
๐Ÿ—ฃ๏ธ Text-to-Speech Listen to explanations hands-free
๐Ÿ“ LaTeX Math Beautiful equation rendering with KaTeX
๐Ÿ’ป Code Highlighting Syntax-highlighted code blocks
๐Ÿ“ฑ Mobile-First Drawer navigation, touch-optimized
โšก Offline-Capable localStorage for instant load
๐Ÿ”„ API Failover Multi-key rotation for 99.9% uptime
๐Ÿ›ก๏ธ CORS Protected Locked to your domain
๐ŸŽฏ Suggestion Chips Quick-start prompts
โ™ฟ Accessible Screen-reader friendly

๐ŸŽฌ Live Demo

๐ŸŒ Try it now โ†’ samiahrafnirob.com/study-dost



Best for full experience

Optimized drawer UI

Easy on the eyes

๐Ÿ— Architecture

graph LR
    A[๐Ÿ‘จโ€๐ŸŽ“ Student] -->|HTTPS| B[๐ŸŒ Frontend<br/>InfinityFree]
    B -->|API Call| C[๐Ÿš€ Cloudflare Tunnel]
    C -->|Proxy| D[๐Ÿ FastAPI Backend<br/>RDP Server]
    D -->|LLM Request| E[๐Ÿค– Featherless.ai<br/>DeepSeek-V3]
    E -->|Response| D
    D -->|JSON| C
    C -->|HTTPS| B
    B -->|Rendered| A
    
    style A fill:#FFD93D,stroke:#333,color:#000
    style B fill:#4ECDC4,stroke:#333,color:#000
    style C fill:#F38BA8,stroke:#333,color:#000
    style D fill:#A8DADC,stroke:#333,color:#000
    style E fill:#C9ADA7,stroke:#333,color:#000

๐Ÿงฑ Why Split Architecture?

Component Where It Lives Why
๐ŸŽจ Frontend
HTML/CSS/JS
InfinityFree, Netlify, GitHub Pages, any static host Fast CDN delivery, zero server cost, no build step
โš™๏ธ Backend
FastAPI + Python
RDP / VPS / Cloud VM Hides API keys, full Python ecosystem, scalable
๐Ÿ”Œ Connection Cloudflare Tunnel (HTTPS) Free HTTPS, no port forwarding, DDoS protected

๐Ÿ“ Project Structure

๐Ÿ“‚ Click to view full directory tree
study-dost-ai/
โ”‚
โ”œโ”€โ”€ ๐ŸŽจ frontend/                    # Static web app (deploy anywhere)
โ”‚   โ”œโ”€โ”€ index.html                  # Main app shell
โ”‚   โ”œโ”€โ”€ styles.css                  # Themes + responsive design
โ”‚   โ”œโ”€โ”€ app.js                      # Application logic
โ”‚   โ”œโ”€โ”€ config.js                   # Backend URL configuration
โ”‚   โ””โ”€โ”€ README.md                   # Frontend docs
โ”‚
โ”œโ”€โ”€ โš™๏ธ  backend/                    # FastAPI service
โ”‚   โ”œโ”€โ”€ main.py                     # API endpoints + CORS
โ”‚   โ”œโ”€โ”€ utils.py                    # LLM client + response parser
โ”‚   โ”œโ”€โ”€ prompts.py                  # Prompt templates
โ”‚   โ”œโ”€โ”€ requirements.txt            # Python dependencies
โ”‚   โ”œโ”€โ”€ install.bat                 # Windows installer
โ”‚   โ”œโ”€โ”€ start.bat                   # Windows launcher
โ”‚   โ”œโ”€โ”€ .env.example                # Config template
โ”‚   โ””โ”€โ”€ README.md                   # Backend docs
โ”‚
โ”œโ”€โ”€ ๐ŸŒ infinityfree/                # InfinityFree-ready bundle
โ”‚   โ””โ”€โ”€ (same as frontend/)
โ”‚
โ”œโ”€โ”€ ๐Ÿ–ฅ๏ธ  rdp/                        # RDP deployment bundle
โ”‚   โ””โ”€โ”€ (same as backend/)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“œ LICENSE                      # MIT License
โ”œโ”€โ”€ ๐Ÿ“– README.md                    # You are here โœจ
โ”œโ”€โ”€ ๐Ÿ“˜ GIT_SETUP_GUIDE.md           # Git + GitHub walkthrough
โ””โ”€โ”€ ๐Ÿšซ .gitignore                   # Protects your secrets

โšก Quick Start

Get running in 5 minutes โฑ๏ธ

๐Ÿ“‹ Prerequisites

๐Ÿ Python 3.10+
๐Ÿ”‘ Featherless.ai API Key (free tier available)
๐ŸŒ Any web browser

๐Ÿš€ Installation

๐Ÿ”ง Step 1: Clone the repository
git clone https://github.com/samiahrafnirob/study-dost-ai.git
cd study-dost-ai
โš™๏ธ Step 2: Set up the backend
cd backend

# Create virtual environment
python -m venv .venv
.\.venv\Scripts\Activate.ps1     # Windows PowerShell
# source .venv/bin/activate       # macOS/Linux

# Install dependencies
pip install -r requirements.txt

# Configure environment
copy .env.example .env
# Edit .env โ†’ paste your FEATHERLESS_API_KEY

# Launch server ๐Ÿš€
python main.py

โœ… Backend running at http://localhost:8000
๐Ÿ“– Swagger docs at http://localhost:8000/docs

๐ŸŽจ Step 3: Launch the frontend
cd ../frontend

# Edit config.js
# window.CC_CONFIG = {
#   API_BASE: "http://localhost:8000",
#   API_KEY: ""
# };

# Serve locally
python -m http.server 5500

โœ… Open http://localhost:5500 in your browser ๐ŸŽ‰


๐Ÿ“ฆ Deployment

Choose your deployment combo:

๐ŸŽจ Frontend Host โš™๏ธ Backend Host ๐Ÿ”— HTTPS Bridge
โœ… InfinityFree
โœ… Netlify
โœ… Vercel
โœ… GitHub Pages
โœ… Cloudflare Pages
โœ… Windows RDP
โœ… Linux VPS
โœ… AWS EC2
โœ… DigitalOcean
โœ… Railway / Render
โœ… Cloudflare Tunnel
โœ… Caddy (auto-HTTPS)
โœ… Nginx + Certbot
โœ… ngrok
โœ… Tailscale Funnel

๐Ÿ–ฅ๏ธ Deploy Backend on Windows RDP

๐Ÿ“ Click for full RDP deployment guide
# 1. Copy the rdp/ folder to your RDP
# 2. Install dependencies
.\install.bat

# 3. Configure .env
notepad .env

# 4. Launch the server
.\start.bat

# 5. Expose with Cloudflare Tunnel (free HTTPS)
Invoke-WebRequest `
  -Uri "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe" `
  -OutFile "$env:USERPROFILE\cloudflared.exe"

& "$env:USERPROFILE\cloudflared.exe" tunnel --url http://localhost:8000
# โ†’ Copy the https://xxxxx.trycloudflare.com URL

Then paste that URL into frontend/config.js as your API_BASE. Done! ๐ŸŽ‰

๐ŸŒ Deploy Frontend on InfinityFree

๐Ÿ“ Click for full InfinityFree deployment guide
  1. Sign up at infinityfree.net
  2. Create site: samiahrafnirob.com/study-dost/
  3. Upload all files from infinityfree/ to htdocs/study-dost/ via FTP
  4. Edit config.js on the server to point to your backend HTTPS URL
  5. Visit your live site โ†’ ๐ŸŽŠ
// infinityfree/config.js
window.CC_CONFIG = {
  API_BASE: "https://your-cloudflare-tunnel-url.trycloudflare.com",
  API_KEY: ""  // optional, must match backend APP_API_KEY
};

โš™๏ธ Configuration

๐Ÿ” Backend .env file
# ๐Ÿ”‘ REQUIRED: Featherless.ai API key
FEATHERLESS_API_KEY=rc_your_api_key_here

# ๐Ÿ”„ OPTIONAL: Backup keys for failover
FEATHERLESS_API_KEY_BACKUP=rc_backup_key_1
FEATHERLESS_API_KEY_BACKUP_2=rc_backup_key_2

# ๐Ÿ›ก๏ธ OPTIONAL: App-level authentication
APP_API_KEY=your_optional_shared_secret

# ๐ŸŒ CORS: Comma-separated allowed origins
ALLOWED_ORIGINS=https://samiahrafnirob.com,http://localhost:5500

# ๐Ÿš€ Server settings
PORT=8000
HOST=0.0.0.0
๐ŸŽจ Frontend config.js file
window.CC_CONFIG = {
  // Your backend's HTTPS URL
  API_BASE: "https://your-backend-url.com",
  
  // Must match backend's APP_API_KEY (if set)
  API_KEY: "",
  
  // Default country: "default" | "bangladesh" | "india"
  DEFAULT_COUNTRY: "default",
  
  // Default theme: "midnight" | "cosmic" | "sunset" | "forest" | "light"
  DEFAULT_THEME: "midnight"
};

๐Ÿงฉ Tech Stack

๐Ÿ› ๏ธ Built With


Python 3.10+

FastAPI

JavaScript

HTML5

CSS3

Uvicorn

Cloudflare

OpenAI SDK

KaTeX

Marked.js
๐Ÿ“Š Full dependency breakdown
Layer Library Purpose
Backend FastAPI Web framework
Backend Uvicorn ASGI server
Backend OpenAI SDK Featherless API client
Backend python-dotenv Env var loading
Backend Pydantic Data validation
Frontend marked.js Markdown rendering
Frontend DOMPurify XSS protection
Frontend KaTeX LaTeX math rendering
Frontend highlight.js Code syntax highlighting
AI DeepSeek-V3-0324 Language model
Hosting Cloudflare Tunnel HTTPS exposure

๐Ÿ›ก Security

๐Ÿ” API keys never reach the browser โ€” they live only in the backend .env
๐ŸŒ CORS locked to your domain via ALLOWED_ORIGINS
๐Ÿ”‘ Optional shared secret (APP_API_KEY) for extra auth layer
๐Ÿ”’ HTTPS enforced via Cloudflare Tunnel / Caddy
๐Ÿงน Input sanitized with DOMPurify before rendering
๐Ÿšซ .env always gitignored โ€” no leaks ever

๐ŸŽฏ Roadmap

Status Feature Target
โœ…Triple explanation enginev1.0
โœ…Country-aware curriculumv1.0
โœ…Gamification (XP, badges)v1.0
โœ…Mobile responsive UIv1.0
โœ…Voice input/outputv1.0
๐ŸšงMulti-language UI (Bengali, Hindi)v1.1
๐Ÿ“‹User accounts + cloud syncv1.2
๐Ÿ“‹PDF export for notesv1.2
๐Ÿ“‹Quiz mode with leaderboardsv1.3
๐Ÿ“‹Collaborative study roomsv2.0
๐Ÿ“‹Native mobile appsv2.0

๐Ÿค Contributing

All contributions are welcome! ๐ŸŽ‰

๐Ÿ”ง How to contribute
  1. Fork the repository
  2. Create your feature branch
    git checkout -b feature/AmazingFeature
    
  3. Commit your changes
    git commit -m "feat: add AmazingFeature"
    
  4. Push to the branch
    git push origin feature/AmazingFeature
    
  5. Open a Pull Request

๐Ÿ“ Commit Convention

We follow Conventional Commits:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Formatting
  • refactor: Code restructure
  • test: Tests
  • chore: Maintenance

๐Ÿ“œ License

This project is licensed under the MIT License โ€” see LICENSE for details.

Copyright (c) 2026 Sami Ahraf Nirob

You are free to use, modify, and distribute this software. ๐ŸŽ‰


๐Ÿ“ฌ Contact

๐Ÿ‘จโ€๐Ÿ’ป Sami Ahraf Nirob




๐ŸŒŸ Show Your Support

If this project helped you, please consider:

โญ Starring this repo
๐Ÿฆ Sharing on social media
๐Ÿ› Reporting bugs
๐Ÿ’ก Suggesting features
๐Ÿค Contributing code


  **Built with passion for students worldwide**  

Footer

Made with โค๏ธ by Sami Ahraf Nirob ยท ยฉ 2026 ยท MIT License


Jelajahi proyek terkait

Memuatโ€ฆ