Skip to content

ashifsekh/smartedu_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git clone https://github.com/your-username/smartedu_backend.git pip install -r requirements.txt

🎓 SmartEdu Backend

An intelligent, AI-powered e-learning backend system built with FastAPI. SmartEdu helps students identify weak areas, receive personalized feedback, and track their learning progress over time.


🚀 Features

  • Authentication: Secure JWT-based login
  • Quiz Engine: Attempt quizzes, submit answers, get instant scores
  • AI-Driven Feedback: Personalized study advice powered by Google Gemini
  • Progress Tracking: Monitors attempts, average scores, topic accuracy, and weakest areas
  • REST API + Swagger UI: Interactive API docs for easy testing

🛠️ Tech Stack

  • Backend: FastAPI
  • Database: PostgreSQL (SQLAlchemy ORM, Alembic migrations)
  • AI Integration: Google Gemini API
  • Authentication: JWT
  • Cache: Redis
  • Config: Python-dotenv

📂 Project Structure

smartedu_backend/
│── app/
│   ├── core/          # Config & DB setup
│   ├── models/        # SQLAlchemy models
│   ├── schemas/       # Pydantic schemas
│   ├── services/      # Business logic (quiz, feedback, progress)
│   ├── routers/       # API routes
│   ├── main.py        # FastAPI entry point
│── alembic/           # DB migrations
│── requirements.txt   # Dependencies
│── .env.example       # Example environment variables
│── README.md          # Project documentation

⚙️ Installation & Setup

  1. Clone the repository
    git clone https://github.com/your-username/smartedu_backend.git
    cd smartedu_backend
  2. Create a virtual environment
    python -m venv venv
    # On Mac/Linux
    source venv/bin/activate
    # On Windows
    venv\Scripts\activate
  3. Install dependencies
    pip install -r requirements.txt
  4. Configure environment variables
    • Copy .env.example to .env and fill in your credentials:
      DATABASE_URL=postgresql+psycopg2://user:password@localhost/smartedu
      JWT_SECRET=your_jwt_secret
      JWT_ALG=HS256
      GOOGLE_API_KEY=your_gemini_api_key
      REDIS_URL=redis://localhost:6379/0
  5. Run database migrations (if using Alembic)
    alembic upgrade head
  6. Start the server
    uvicorn app.main:app --reload

📊 API Highlights

  • Auth
    • POST /auth/signup — Register a new student
    • POST /auth/signin — Login & get JWT
  • Quiz
    • POST /quiz/attempt — Submit answers & get score
  • Feedback
    • GET /feedback/{user_id} — AI-powered personalized advice
  • Progress
    • GET /progress/{user_id} — Track student progress

🤖 AI-Powered Feedback

  • Uses Google Gemini API for generating personalized study guidance
  • If Gemini API fails, falls back to a default suggestion

🎯 Future Enhancements

  • Teacher dashboard
  • Multi-language AI feedback
  • Adaptive quiz generation

👨‍💻 Author

Ashif Sekh
Passionate about AI, EdTech, and building impactful solutions.


SmartEdu Backend is designed to make learning more personalized, engaging, and data-driven.

Do you want me to also create a .env.example file template so others can easily run your project without exposing your real credentials?Perfect 👍 having a strong README.md makes your project presentation-ready and portfolio-worthy. Here’s a polished one tailored for your SmartEdu Backend:

🎓 SmartEdu Backend

An intelligent e-learning backend system built with FastAPI, enabling: ✅ Quiz attempts & scoring ✅ AI-powered personalized feedback (Google Gemini) ✅ Student progress tracking with analytics

This project helps students identify weak areas, improve with tailored suggestions, and track growth over time.

🚀 Features • Authentication: Secure login with JWT • Quiz Engine: Attempt quizzes, submit answers, get instant score • AI-Driven Feedback: Personalized study advice powered by Google Gemini • Progress Tracking: Monitors attempts, average scores, topic accuracy & weakest areas • REST API + Swagger UI: Easy-to-use API documentation for testing

🛠️ Tech Stack • Backend Framework: FastAPI • Database: PostgreSQL (with SQLAlchemy ORM + Alembic migrations) • AI Integration: Google Gemini API (generative feedback system) • Authentication: JWT-based secure login • Deployment Ready: Configurable with .env

📂 Project Structure

smartedu_backend/ │── app/ │ ├── core/ # Config & DB setup │ ├── models/ # SQLAlchemy models │ ├── schemas/ # Pydantic schemas │ ├── services/ # Business logic (quiz, feedback, progress) │ ├── routers/ # API routes │ ├── main.py # FastAPI entry point │── alembic/ # DB migrations │── requirements.txt # Dependencies │── .env.example # Example environment variables │── README.md # Project documentation

⚙️ Installation & Setup

1️⃣ Clone Repo

git clone https://github.com/your-username/smartedu_backend.git cd smartedu_backend

2️⃣ Create Virtual Environment

python -m venv venv source venv/bin/activate # Mac/Linux venv\Scripts\activate # Windows

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Setup Environment Variables

Create .env file (based on .env.example) and add:

DATABASE_URL=postgresql+psycopg2://user:password@localhost/smartedu SECRET_KEY=your_jwt_secret ALGORITHM=HS256 GOOGLE_API_KEY=your_gemini_api_key

5️⃣ Run Server

uvicorn app.main:app --reload

Swagger Docs → http://127.0.0.1:8000/docs

📊 API Highlights

Auth • POST /auth/signup → Register a new student • POST /auth/signin → Login & get JWT

Quiz • POST /quiz/attempt → Submit answers & get score

Feedback • GET /feedback/{user_id} → AI-powered personalized advice

Progress • GET /progress/{user_id} → Track student progress

🤖 AI-Powered Feedback • Uses Google Gemini API for generating personalized study guidance. • If Gemini API fails → system falls back to a default suggestion.

🎯 Future Enhancements • Add teacher dashboard • Multi-language AI feedback • Adaptive quiz generation

👨‍💻 Author

Ashif Sekh Passionate about AI, EdTech, and building impactful solutions.

📌 GitHub: your-username 📌 LinkedIn: your-linkedin-profile

✨ SmartEdu Backend is designed to make learning more personalized, engaging, and data-driven.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages