How bipin-a/aidi-1100 works
Project Type and Purpose
• This repository is primarily a course‐ware monorepo (AIDI1100) that bundles lecture materials, assignments, and a minimal Python web application sample (“app” folder).
• The “app” is a small FastAPI service (main.py/main2.py), with standard Python packaging (pyproject.toml), dependencies (requirements.txt), and a run script (run.sh).
• The README focuses on local development setup (Python env, uv tool, VS Code, FastAPI).
File Structure
• Top-level directories:
• Assignments/lecture_material: static Markdown and Jupyter notebooks for course content.
• app/: the only runnable service.
• Config files:
• pyproject.toml (global and under app/) – defines dependencies and packaging.
• requirements.txt – pinned dependencies for the FastAPI app.
• run.sh – entrypoint to launch the service.
• Makefile – possible high-level dev commands.
• No database or external service configs are present—this is a standalone example microservice.
Insights from README
• Emphasizes isolated Python environments via “uv” (virtual environment manager).
• Guides on installing VS Code and Python extension.
• Mentions FastAPI integration but no production/deployment details.
• a. Main Components
1. Developer Machine
• Tools: Git, Python, uv (virtual env), VS Code.
2. Code Repository
• Branches, commits, .gitignore, pyproject.toml, Makefile.
3. FastAPI Service (“app”)
• Python modules (main.py, main2.py).
• Dependency layer (requirements.txt / pyproject.toml).
• Runtime: Uvicorn server invoked by run.sh.
4. Client (e.g., browser or API consumer)
• Sends HTTP requests to the FastAPI endpoints.
• b. Relationships & Data Flow
• Developer clones repo → runs uv sync → installs dependencies → launches run.sh → starts Uvicorn + FastAPI.
• Client → HTTP requests → Uvicorn → FastAPI route handlers → returns JSON responses.
• c. Architectural Patterns & Principles
• Separation of concerns:
– Environment management (uv)
– Dependency specification (pyproject.toml, requirements.txt)
– Application code (app/).
• Web microservice pattern: lightweight HTTP server with clear entrypoint.
• d. Relevant Technologies
• Python 3.x, FastAPI, Uvicorn
• uv (environment / dependency tool)
• VS Code for editing/debugging
• Makefile for auxiliary tasks
Diagramming Conventions
• From Developer → Repo (pull/push).
• From Developer → uv tool → dependency installation.
• From Client → HTTP → FastAPI endpoints.
• Blue for developer tools & processes.
• Green for application code & runtime.
• Orange for clients or external systems.
Putting It All Together
• Next, a “Code Repository” block showing folder structure at high level (assignments, lecture_material, app).
• Within “app” block, illustrate:
• Dependency layer (pyproject.toml, requirements.txt)
• Runtime script (run.sh) → Uvicorn
• FastAPI application (main.py, main2.py)
• On the right, show “Client” block (e.g., Postman / Browser).