Skip to content
View studyhaxer's full-sized avatar
🏠
Working from home
🏠
Working from home

Block or report studyhaxer

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
studyhaxer/README.md

Hi, I'm Hafiz Atta Ur Rahman πŸ‘‹

πŸŽ“ M.Phil in Computer Science (Gold Medalist)
Former PHP & WordPress developer rebuilding from scratch with Python.
One project a day. Everything documented publicly.


πŸš€ The Challenge

#60DaysOfPython β€” Started from zero, building one real project every single day.
Currently on Day 19 and going strong.

πŸ”— Live API (Day 19): day19-deployment-production.up.railway.app/docs β€” deployed FastAPI + Postgres, tested end-to-end against a real production database.


πŸ›£οΈ Journey So Far

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
Capstone 20–60 AI-Powered Educational Platform
πŸ“‹ 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

🧰 Tech Stack

  • 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
  • Concepts: OOP, REST API, CRUD, Pydantic v2, DB Relationships, Role-Based Access Control, Reusable Dependencies, Testing, Production Deployment, File Handling, Logging

πŸ“Œ Featured Projects

  • πŸš€ 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_role dependency 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 @property and transaction history

πŸ“ˆ Background

  • 🏒 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

πŸ”— Connect

LinkedIn Twitter GitHub


"One project a day. No shortcuts. No breaks." 🐍

Pinned Loading

  1. day14-user-course-api day14-user-course-api Public

    FastAPI + SQLAlchemy One-to-Many API | User-Course Management with nested schemas, cascade delete & eager loading

    Python

  2. day15-jwt-auth-api day15-jwt-auth-api Public

    FastAPI backend with JWT authentication β€” user registration, login, and protected routes secured with bcrypt password hashing and python-jose tokens.

    Python

  3. day16-role-based-api day16-role-based-api Public

    Role-based access control on top of a JWT auth API β€” FastAPI dependency factories for role gating, reusable pagination, and proper 401 vs 403 semantics. Day 16 of #60DaysOfPython.

    Python

  4. day17-reusable-auth-dependencies day17-reusable-auth-dependencies Public

    Day 17 of a FastAPI + SQLAlchemy challenge β€” reusable JWT auth and role-based access control via dependency injection.

    Python

  5. day18-testing-cleanup day18-testing-cleanup Public

    FastAPI User-Course API with full pytest test suite β€” TestClient, isolated test DB, custom exceptions, role-based coverage

    Python

  6. day19-deployment day19-deployment Public

    FastAPI User-Course API deployed to production β€” Railway hosting + Supabase Postgres, swapped from local SQLite, env-based secrets, full pytest suite carried over from Day 18

    Python