Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yuting1214/Fullstack-FastAPI
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: yuting1214/Fullstack-FastAPI
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: optimized-version
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 6 commits
  • 70 files changed
  • 2 contributors

Commits on Apr 5, 2025

  1. Configuration menu
    Copy the full SHA
    3a9cc72 View commit details
    Browse the repository at this point in the history
  2. [EHN] 1. orjson for parse 2. lifespan with increased thread pools 3. …

    …refactor middleware and add gzip compression 4.
    yuting1214 committed Apr 5, 2025
    Configuration menu
    Copy the full SHA
    6c1f6fa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7e5aa79 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf667bc View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2026

  1. [REFACTOR] Restructure project, migrate to uv, apply FastAPI best pra…

    …ctices
    
    Project structure:
    - Reorganize from backend/fastapi/ to src/backend/, frontend/ to src/frontend/
    - Move tests to root tests/ directory with shared conftest.py
    - Remove dead files (constants.py, authorization.py, rate_limiter.py)
    
    Package management:
    - Replace requirements.txt with pyproject.toml + uv
    - Pin Python 3.12 via .python-version
    - Drop unused deps (trio, databases), add uvloop
    
    Environment & security:
    - Replace tracked .env with .env.example template
    - Add .env, .cursor/, .claude/ to .gitignore
    - Fix hardcoded SECRET_KEY in SessionMiddleware
    - Auth reads from pydantic-settings instead of os.getenv()
    
    FastAPI best practices (from Kludex/fastapi-tips):
    - Convert all endpoints and CRUD to async (Tips #2, #9)
    - Pure ASGI DocProtectMiddleware replacing BaseHTTPMiddleware (Tip #8)
    - Typed lifespan state yielding session factory (Tip #6)
    - Async DB init and proper engine disposal on shutdown
    - SQLAlchemy 2.0: select(), DeclarativeBase, Mapped, async_sessionmaker
    - Portable UUID column (String(36)) for SQLite + PostgreSQL compat
    
    Testing:
    - All-async test suite with httpx.AsyncClient + pytest-anyio (Tips #5, #10)
    - conftest.py handles DB lifecycle since ASGITransport skips lifespan
    - Consolidated test_api_sync.py + test_api_async.py into test_api.py
    
    Deployment:
    - Dockerfile updated for Python 3.12 + uv
    - Docker build and test run verified in container (7/7 pass)
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    yuting1214 and claude committed Feb 20, 2026
    Configuration menu
    Copy the full SHA
    7af624c View commit details
    Browse the repository at this point in the history
  2. [FIX] Use SQLAlchemy Uuid type for PostgreSQL + SQLite compatibility

    Replace String(36) with SQLAlchemy 2.0 native Uuid type which maps to
    PostgreSQL UUID and SQLite CHAR(32) automatically. Fixes startup crash
    when deploying against an existing PostgreSQL database that has UUID
    columns from the previous schema.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    yuting1214 and claude committed Feb 20, 2026
    Configuration menu
    Copy the full SHA
    b08dc26 View commit details
    Browse the repository at this point in the history
Loading