git clone https://github.com/your-username/smartedu_backend.git pip install -r requirements.txt
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.
- 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
- Backend: FastAPI
- Database: PostgreSQL (SQLAlchemy ORM, Alembic migrations)
- AI Integration: Google Gemini API
- Authentication: JWT
- Cache: Redis
- Config: Python-dotenv
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
- Clone the repository
git clone https://github.com/your-username/smartedu_backend.git cd smartedu_backend - Create a virtual environment
python -m venv venv # On Mac/Linux source venv/bin/activate # On Windows venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Configure environment variables
- Copy
.env.exampleto.envand 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
- Copy
- Run database migrations (if using Alembic)
alembic upgrade head
- Start the server
uvicorn app.main:app --reload
- Swagger UI: http://127.0.0.1:8000/docs
- Auth
POST /auth/signup— Register a new studentPOST /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
- Uses Google Gemini API for generating personalized study guidance
- If Gemini API fails, falls back to a default suggestion
- Teacher dashboard
- Multi-language AI feedback
- Adaptive quiz generation
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.
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.
⸻