π M.Phil in Computer Science (Gold Medalist)
Former PHP & WordPress developer rebuilding from scratch with Python.
One project a day. Everything documented publicly.
#60DaysOfPython β Started from zero, building one real project every single day.
Currently on Day 27 β Login page live, JWT stored, role-based redirect to teacher/student dashboards.
π Live API (Day 19): day19-deployment-production.up.railway.app/docs β deployed FastAPI + Postgres, tested end-to-end against a real production database.
π Capstone in progress: AI-Powered Educational Platform β FastAPI + PostgreSQL + JWT auth + Groq-generated lesson summaries + React frontend, deploying to usachunian.com. Full Day 20β33 roadmap in the repo README.
| Phase | Days | What I Learned |
|---|---|---|
| Python Core | 1β6 | Basics, CLI, file handling, OOP, JSON/CSV, logging, modular architecture |
| OOP Deep Dive | 7β9 | Encapsulation, @property, inheritance, polymorphism |
| Database | 10 | SQLite, CRUD, multi-file structure |
| FastAPI | 11β13 | REST API, Pydantic, SQLAlchemy ORM, Depends(), search & filters |
| Relationships | 14 | One-to-Many, cascade delete, joinedload, nested Pydantic schemas |
| Auth | 15β17 | JWT (python-jose), bcrypt hashing, OAuth2PasswordBearer, protected routes, RBAC, reusable dependency factories, multi-role routes, dependency composition |
| Testing | 18 | pytest, TestClient, custom exception classes, isolated test DB with autouse fixtures, role-based test coverage, permission-before-fetch pattern |
| Deployment | 19 | Production deployment β managed Postgres (Supabase), env-based secrets, Railway hosting, dynamic port binding, end-to-end verification against a live database |
| AI Integration | 24 | Groq API (llama-3.3-70b-versatile), lesson summarizer endpoint, prompt engineering |
| Testing | 25 | pytest suite (28 tests), TestClient, role-based test coverage, ownership 403s, duplicate 400s |
| React Frontend | 26β27 | Vite + React setup, Register page, axios client, Login page, JWT storage, role-based redirect |
| Capstone (in progress) | 20β33 | AI-Powered Educational Platform β FastAPI + PostgreSQL + JWT auth, Groq lesson summaries, React frontend (Register + Login done), deploying to usachunian.com. Full roadmap β |
π Day-by-day breakdown
| Day | Project | What I Learned |
|---|---|---|
| 1β6 | Student Grade Analyzer (v1βv7) | Python basics, CLI, file handling, OOP, JSON/CSV, logging, validation, modular architecture |
| 7β9 | Bank System & Library Management System | Encapsulation, @property, deposit/withdraw, inheritance, polymorphism, base class design |
| 10 | Student Management System | SQLite, CRUD, multi-file structure |
| 11β13 | FastAPI APIs (Notes & SQLite) | REST routes, Pydantic models, full CRUD, SQLAlchemy ORM, Depends(), response_model, keyword search & filters |
| 14 | User Course API | One-to-Many relationships, cascade delete, joinedload, nested schemas |
| 15 | JWT Authentication API | JWT (python-jose), bcrypt password hashing, OAuth2PasswordBearer, protected routes via Depends() |
| 16 | Role-Based API | Role field on the User model, role-gated routes via dependency factories (require_role, require_any_role), reusable pagination_params dependency, deliberate 401-vs-403 design, SECRET_KEY moved to environment variable |
| 17 | Reusable Auth & Role Dependencies | Refactored Day 16's inline role checks into a single reusable require_any_role dependency factory; get_current_user fully isolated as a standalone dependency; added a "any logged-in user" route (/me) and a multi-role route (/dashboard); combined get_db + role dependency in the same route |
| 18 | FastAPI Testing + Cleanup | pytest suite with TestClient, conftest fixtures with autouse reset_db (clean DB per test), isolated test database, custom exception classes (ForbiddenException, NotFoundException), consistent permission-before-fetch pattern across endpoints, role-based test coverage (401 / 403 / 200 scenarios) |
| 19 | Production Deployment | Swapped SQLite for managed Supabase Postgres; moved SECRET_KEY and DATABASE_URL fully into platform env vars; fixed Uvicorn start command for dynamic $PORT + 0.0.0.0 binding; deployed to Railway; verified full request lifecycle (register β login β protected routes) against the live database, not just that the server started |
| 20 | Capstone Kickoff β AI-Powered Educational Platform | Designed 4-table schema (User, Course, Lesson, Enrollment) with a proper many-to-many Enrollment bridge model, UniqueConstraint to prevent duplicate enrollments, NOT NULL foreign keys; Pydantic schemas with nested List[LessonOut]; resolved a production-grade Supabase IPv6/DNS issue by switching to the session pooler connection string; verified all tables live in Supabase and pushed to a dedicated capstone repo |
| 21 | Capstone β Auth Routes (JWT) | Split routes into a routers/ package using APIRouter; POST /auth/register with duplicate-email check and bcrypt hashing; POST /auth/login via OAuth2PasswordRequestForm (so Swagger's Authorize flow works end-to-end) issuing a JWT with sub as the user id; GET /users/me; GET /users admin-only via a require_any_role dependency guard; full register β login β /me β 403/401 smoke testing in /docs |
| 22 | Capstone β Course CRUD | Full CRUD on Course (POST/GET/PUT/DELETE /courses); teacher-only creation; ownership validation on update/delete via owner_id so teachers can only modify their own courses; authenticated read access for all roles; consistent status codes (201/200/204/403/404) across every route |
| 24 | Capstone β AI Lesson Summarizer | Integrated Groq API (llama-3.3-70b-versatile); POST /lessons/{id}/summarize fetches lesson content, sends it to Groq with a structured prompt, and returns a clean summary; .env-based API key management; role-gated to authenticated users |
| 25 | Capstone β pytest Test Suite | 28 automated tests across 4 files (auth, courses, lessons, enrollments); conftest.py with client, teacher_token, student_token, teacher2_token fixtures; tests cover happy paths, duplicate 400s, ownership 403s, role 403s, and unauthenticated 401s; 0 failures |
| 26 | Capstone β React Register Page | Vite + React project scaffolded; axiosClient.js with base URL config; Navbar.jsx with React Router links; Register.jsx form with Full Name, Email, Password, Role (student/teacher); POST /auth/register connected; success state with green banner; role-based redirect groundwork in place |
| 27 | Capstone β Login Page + JWT Auth Flow | Login.jsx form wired to POST /auth/login; JWT token stored in localStorage; decoded role from token payload; role-based redirect β teachers β Teacher Dashboard, students β Student Dashboard; error state for invalid credentials; axiosClient.js auth header picks up stored token automatically |
π Days 20β33 of the capstone follow a detailed phase-by-phase roadmap (auth β CRUD β AI features β React frontend β deployment) β see the capstone repo README for the full breakdown.
- Language: Python 3
- Backend: FastAPI, Uvicorn
- Database: PostgreSQL (Supabase, production), SQLite (local dev), SQLAlchemy ORM
- Auth: JWT, bcrypt, python-jose, passlib
- Testing: pytest, httpx, TestClient
- Deployment: Railway, Supabase, environment-based secrets management
- AI: Groq API (
llama-3.3-70b-versatile), prompt engineering - Frontend: React, Vite, Axios, React Router
- π AI-Powered Educational Platform β 60-day capstone, in progress. FastAPI + PostgreSQL + JWT auth, Groq lesson summaries, React frontend, deploying to usachunian.com
- π Production Deployment β FastAPI live on Railway, Supabase Postgres, env-based secrets, full request lifecycle verified end-to-end
- π§ͺ FastAPI Testing + Cleanup β pytest suite, TestClient, isolated test DB, custom exception classes, role-based test coverage
- π Reusable Auth & Role Dependencies β JWT auth and RBAC fully moved into reusable dependency functions, multi-role routes, dependency composition
- π Role-Based API β RBAC with
require_role/require_any_roledependency factories, reusable pagination dependency, 401 vs 403 design - π JWT Authentication API β JWT auth, bcrypt password hashing, protected routes with OAuth2
- π User Course API β One-to-Many relationships, cascade delete, nested Pydantic schemas
- ποΈ FastAPI SQLite API β SQLAlchemy ORM, keyword search, filters, response_model
- ποΈ FastAPI Notes API β Full CRUD REST API with Pydantic models
- π Student Management System β SQLite + Python CLI with full CRUD
- π Library Management System β OOP with inheritance and polymorphism
- π¦ Bank System β OOP with
@propertyand transaction history
- π’ Former PHP Developer & WordPress Developer
- π REST API experience from Elance/Odesk freelancing
- π― Goal: Return to professional software development within 90 days
- π Based in Lahore, Pakistan
"One project a day. No shortcuts. No breaks." π