# PTLearn — Practical Software Courses

> AI-readable course index for PTLearn, the learning product at https://shreyam1008.com.np/learn/.

PTLearn is a separate product namespace inside shreyam1008.com.np. It teaches production-level software engineering through lessons, code examples, diagrams, quizzes, flashcards, labs, review prompts, and local-first progress tracking.

## Canonical Resources

- [PTLearn home](https://shreyam1008.com.np/learn/) — course dashboard and local progress app.
- [PTLearn sitemap](https://shreyam1008.com.np/learn/sitemap.xml) — course and lesson crawl map.
- [PTLearn AI summary](https://shreyam1008.com.np/learn/ai.txt) — compact machine-readable course facts.
- [Root profile](https://shreyam1008.com.np/llms.txt) — Shreyam Adhikari identity, projects, and writing.

## Courses

### Python and FastAPI Backend Engineering

- URL: https://shreyam1008.com.np/learn/python-fastapi/
- Level: Intermediate
- Track: Unified foundations + Python/FastAPI
- Stack: FastAPI, Pydantic, SQLAlchemy, pytest, PostgreSQL
- Audience: Python developers who want professional API structure instead of tutorial-only endpoints.
- Capstone: A modular FastAPI service with auth, repositories, rate limiting, tests, and deploy-ready observability.
- Outcomes: Design API boundaries with typed request and response contracts.; Keep framework, domain, and persistence responsibilities separate.; Ship a tested service with health checks, observability, and deployment notes.
- Lessons:
  1. [Python Language, Types, and Protocols](https://shreyam1008.com.np/learn/python-fastapi/python-language-types-and-protocols/) — A consolidated foundations lesson preserving 3 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Syntax Fundamentals, Blocks, names, and truth, Function boundaries, Python + FastAPI foundations, Guided practice, Data Model and OOP, Identity and mutability, Dataclasses for domain values, Typing, Hints describe contracts, TypedDict for structured dictionaries. 360 min.
  2. [Python Runtime and Async Boundaries](https://shreyam1008.com.np/learn/python-fastapi/python-runtime-and-async-boundaries/) — A consolidated foundations lesson preserving 2 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Runtime and Memory, Memory model in practice, GIL and concurrency, Python + FastAPI foundations, Guided practice, Async and the Event Loop, Await points yield control, Blocking calls are contagious. 270 min.
  3. [Routing and Validation Basics](https://shreyam1008.com.np/learn/python-fastapi/routing-and-validation-basics/) — Design a reviewable FastAPI contract with typed create/read schemas, explicit status semantics, validation evidence, route tests, and an OpenAPI drift check. Concepts: APIRouter boundary, Pydantic contract, 422 validation response, OpenAPI drift check, FastAPI Fundamentals, A route is a typed boundary, Request sources, Python + FastAPI foundations, Guided practice. 196 min.
  4. [Advanced Dependency Injection](https://shreyam1008.com.np/learn/python-fastapi/advanced-dependency-injection/) — Design FastAPI dependency boundaries for request-scoped sessions, authenticated users, framework-free services, and test overrides that cannot leak between cases. Concepts: request-scoped provider, dependency override, auth boundary, framework-free service, FastAPI Architecture, Routers organize HTTP surface area, Dependencies make boundaries explicit, Python + FastAPI foundations, Guided practice. 198 min.
  5. [Repository and Unit of Work](https://shreyam1008.com.np/learn/python-fastapi/repository-and-unit-of-work/) — Own a subscription billing write flow with product-language repositories, one explicit unit-of-work transaction, rollback proof, and routes that never reach through ORM details. Concepts: repository port, unit-of-work boundary, rollback proof, ORM leak review, SQLite Persistence, SQLite is a real database with local scope, Repository boundary, Python + FastAPI foundations, Guided practice, Design Patterns, A route should orchestrate, not own the business, Adapters protect your core. 352 min.
  6. [Testing, Packaging, and Operations](https://shreyam1008.com.np/learn/python-fastapi/testing-packaging-and-operations/) — Package a FastAPI service so reviewers can prove route contracts, dependency overrides, startup commands, and liveness/readiness behavior before traffic reaches it. Concepts: ASGI contract test, dependency override fixture, startup proof, liveness/readiness split, Python Orientation and Environment, Why environments matter, Scripts versus modules, Python + FastAPI foundations, Guided practice, Testing, Test behavior, not implementation trivia, FastAPI API tests, Tooling and Quality, One project configuration, Repeatable checks, Popular Packages, Packages by job, Dependency selection. 534 min.
  7. [Observability and Error Contracts](https://shreyam1008.com.np/learn/python-fastapi/observability-and-error-contracts/) — Design a FastAPI failure surface with stable ProblemDetails-style responses, request IDs, structured logs, bounded metrics, and a diagnostic playbook operators can actually follow. Concepts: ProblemDetails error contract, request ID middleware, structured logging, low-cardinality metric, diagnostic playbook, Errors and Reliability, Exceptions are control boundaries, Logging for diagnosis, Python + FastAPI foundations, Guided practice. 176 min.
  8. [Deploys, Workers, and Runbooks](https://shreyam1008.com.np/learn/python-fastapi/deploys-workers-and-runbooks/) — Finish the FastAPI service with graceful worker shutdown, traffic-safe readiness gates, deploy smoke checks, rollback thresholds, and a two-minute handoff runbook. Concepts: lifespan orchestration, cancellable worker, deploy smoke check, rollback threshold, handoff runbook, Final Project, Project brief, Suggested structure, Python + FastAPI foundations, Guided practice. 358 min.

### TypeScript and React Product Systems

- URL: https://shreyam1008.com.np/learn/typescript-react/
- Level: Intermediate
- Track: Unified foundations + TypeScript/React
- Stack: React, TypeScript, Vite, Wouter, Tailwind
- Audience: Frontend developers who want UI code that remains calm as product complexity grows.
- Capstone: A responsive learning dashboard with typed workflows, optimistic progress, and screenshot-tested states.
- Outcomes: Represent UI and API states with clear TypeScript contracts.; Build accessible flows that handle loading, errors, optimistic updates, and rollback.; Keep layouts stable and test behavior through user-visible affordances.
- Lessons:
  1. [TypeScript Modules, Packages, and Type Tests](https://shreyam1008.com.np/learn/typescript-react/typescript-modules-packages-and-type-tests/) — A consolidated foundations lesson preserving 4 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Orientation and Tooling, TypeScript is a design-time contract, Compiler settings that raise the floor, TypeScript Advanced foundations, Guided practice, Module Systems and Boundaries, Module settings are runtime decisions, Type-only imports, Testing TypeScript, Behavior tests still matter, Type tests for reusable helpers, Package Tooling, Application builds vs library builds, Runtime transpilers. 245 min.
  2. [TypeScript Advanced Types and Transformations](https://shreyam1008.com.np/learn/typescript-react/typescript-advanced-types-and-transformations/) — A consolidated foundations lesson preserving 3 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Generics, Preserving relationships, Constraints are promises you can use, TypeScript Advanced foundations, Guided practice, Utility, Conditional, and Mapped Types, Built-in utility types, Mapped and conditional types, Performance and Debugging, Debugging the type system, Runtime debugging. 205 min.
  3. [TypeScript Component Foundations](https://shreyam1008.com.np/learn/typescript-react/typescript-component-foundations/) — Use props, unions, and small component contracts to make UI states explicit before screens grow complex. Concepts: props contract, discriminated union, unknown JSON, component composition, Type System Foundations, Structural typing, Invalid states should be unrepresentable, TypeScript Advanced foundations, Guided practice, Narrowing and Control Flow, Control-flow analysis, Exhaustive checks, Runtime Validation, Parse, do not pretend, Validation belongs at the edge. 235 min.
  4. [State Machines for UI Flow](https://shreyam1008.com.np/learn/typescript-react/state-machines-for-ui/) — Replace boolean soup with compact discriminated states that explain what the screen can do next. Concepts: discriminated union, reducer, event, state transition. 35 min.
  5. [Performance-Friendly Layout](https://shreyam1008.com.np/learn/typescript-react/performance-friendly-layout/) — Use stable dimensions, lazy boundaries, and predictable render paths to avoid layout shifts. Concepts: CLS, code splitting, container constraints, focus ring. 31 min.
  6. [Server State, Forms, and Tests](https://shreyam1008.com.np/learn/typescript-react/server-state-forms-and-tests/) — Build a production form flow with typed API parsing, TanStack Query ownership, optimistic cache updates, rollback, accessible errors, and behavior-focused tests. Concepts: query key ownership, typed API boundary, form validation, optimistic rollback, aria-live error, Testing Library behavior test, Async TypeScript and the Event Loop, Async functions return promises, Cancellation and timeouts, TypeScript Advanced foundations, Guided practice, Node and Fetch APIs, Fetch returns transport facts, Node APIs and resource ownership, Architecture Patterns, Ports and adapters, Error design. 266 min.
  7. [Accessibility and Error Recovery](https://shreyam1008.com.np/learn/typescript-react/accessibility-and-error-recovery/) — Design UI flows that announce state changes, preserve focus, recover from failure, and stay usable on mobile. Concepts: aria-describedby, live region, focus management, retry state. 42 min.
  8. [Frontend Observability and Release Readiness](https://shreyam1008.com.np/learn/typescript-react/frontend-observability-and-release-readiness/) — Instrument user-visible flows with safe events, performance marks, screenshots, and release checks before shipping. Concepts: analytics event, performance mark, visual regression, release checklist, Final Project, Project brief, Deliverables, TypeScript Advanced foundations, Guided practice. 168 min.

### Go Service Engineering

- URL: https://shreyam1008.com.np/learn/go-services/
- Level: Intermediate
- Track: Unified foundations + Go services
- Stack: Go, net/http, slog, PostgreSQL, Docker
- Audience: Developers moving from scripts or handlers into long-running services.
- Capstone: A worker-backed API that processes jobs with context timeouts, logs, retries, and graceful shutdown.
- Outcomes: Build HTTP services with context propagation and consistent JSON errors.; Use concurrency primitives without leaking work during shutdown.; Release a small binary with storage, logs, tests, and race checks.
- Lessons:
  1. [Go Language and Data Foundations](https://shreyam1008.com.np/learn/go-services/go-language-and-data-foundations/) — A consolidated foundations lesson preserving 4 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Orientation and Go's Design, Go's bias toward boring clarity, The go command, Go Programming foundations, Guided practice, Syntax Basics, Declarations and zero values, Control flow is small but expressive, Structs and pointers, Functions and Methods, Functions return values explicitly, Methods are functions with receivers, Data Structures, Slices are descriptors over arrays, Maps and sets. 300 min.
  2. [Go Generics, Runtime, and Profiling](https://shreyam1008.com.np/learn/go-services/go-generics-runtime-and-profiling/) — A consolidated foundations lesson preserving 2 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Generics, Generic functions, Constraints define available operations, Go Programming foundations, Guided practice, Runtime and Memory, Memory is automatic, but ownership still matters, Escape analysis. 155 min.
  3. [HTTP Service Basics](https://shreyam1008.com.np/learn/go-services/http-service-basics/) — Build a small JSON API with standard handlers, structured errors, timeouts, and a simple project layout. Concepts: http.Handler, ServeMux, JSON decoder, server timeout, net/http and Services, Handlers are small adapters, Decode defensively, Middleware wraps handlers, Go Programming foundations, Guided practice. 128 min.
  4. [Context and Cancellation](https://shreyam1008.com.np/learn/go-services/context-and-cancellation/) — Make timeouts and shutdown signals flow through every expensive operation. Concepts: context, deadline, goroutine, graceful shutdown, Context, Context carries cancellation, Deadlines bound work, Go Programming foundations, Guided practice, Production Patterns, Explicit dependencies, Graceful shutdown, Retries need budgets. 194 min.
  5. [Interfaces at Boundaries](https://shreyam1008.com.np/learn/go-services/interfaces-at-boundaries/) — Use interfaces where they describe ownership seams, not everywhere by habit. Concepts: consumer-owned interface, adapter, package boundary, test double, Interfaces and Composition, Interfaces are satisfied implicitly, Embedding is composition, not inheritance, Go Programming foundations, Guided practice, Testing, Table tests scale examples, Fakes over fragile mocks, Packages and Project Structure, Packages are API boundaries, Modules define dependency roots. 289 min.
  6. [Storage, Workers, and Release](https://shreyam1008.com.np/learn/go-services/storage-workers-and-release/) — Persist data, run bounded background work, and ship a small service binary with repeatable checks. Concepts: database/sql, migration, worker pool, race detector, Concurrency, Goroutines are cheap, not free, Channels communicate ownership, Mutexes are often the simplest answer, Go Programming foundations, Guided practice, Tooling, The standard workflow, Docs are source-adjacent. 216 min.
  7. [Observability and Operational Errors](https://shreyam1008.com.np/learn/go-services/observability-and-operational-errors/) — Make service failures visible with structured logs, typed operational errors, request IDs, and safe response mapping. Concepts: slog, error wrapping, request id, operational error, Error Handling, Errors are values, Sentinel and typed errors, Go Programming foundations, Guided practice. 124 min.
  8. [Deploys, Health, and Incident Runbooks](https://shreyam1008.com.np/learn/go-services/deploys-health-and-incident-runbooks/) — Ship Go services with health endpoints, graceful shutdown, smoke checks, and incident notes a teammate can follow. Concepts: health endpoint, graceful shutdown, signal handling, incident review, Final Project, Project brief, Suggested package layout, Core domain model, Go Programming foundations, Guided practice. 229 min.

### .NET API Engineering Path

- URL: https://shreyam1008.com.np/learn/dotnet-advanced/
- Level: Advanced
- Track: Unified foundations + .NET API engineering
- Stack: C#, ASP.NET Core, EF Core, OpenAPI, xUnit
- Audience: C# developers who want a complete basic-to-pro path for professional ASP.NET Core API ownership.
- Capstone: A production-grade order API with typed contracts, validation, EF Core query boundaries, health checks, hosted work, integration tests, and operational notes.
- Outcomes: Move from modern C# basics into typed minimal API contracts with reviewable failure modes.; Design advanced EF Core read paths with projections, limits, and query review evidence.; Operate pro-grade APIs with integration tests, health checks, structured logs, hosted services, and shutdown behavior.
- Lessons:
  1. [.NET Runtime and Diagnostics](https://shreyam1008.com.np/learn/dotnet-advanced/dotnet-runtime-and-diagnostics/) — A consolidated foundations lesson preserving 2 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Runtime, Memory, and Diagnostics, Managed execution, Garbage collection tradeoffs, Modern C# and .NET foundations, Guided practice, Tooling and Popular Packages, Quality tools, Common packages. 155 min.
  2. [Modern C# API Foundations](https://shreyam1008.com.np/learn/dotnet-advanced/modern-csharp-api-foundations/) — Use records, nullable references, async methods, and options to establish reliable service contracts. Concepts: record, nullable reference type, async Task, options pattern, C# and .NET Orientation, The platform pieces, From source to execution, Modern C# and .NET foundations, Guided practice, Syntax and Type System, Types communicate intent, Generics and pattern matching, Object-Oriented Design and Records, Classes own behavior and invariants, Records are data models, not service objects, Async and Await, Async is about waiting efficiently, Composition and failure. 354 min.
  3. [Project Structure and Dependency Injection](https://shreyam1008.com.np/learn/dotnet-advanced/project-structure-and-dependency-injection/) — Split API, application, and infrastructure responsibilities so dependency direction stays reviewable from the first feature. Concepts: composition root, service lifetime, project reference, interface boundary, SDK, CLI, and Project Structure, The project file is the build contract, The CLI development loop, Modern C# and .NET foundations, Guided practice, Dependency Injection, Middleware, and Configuration, Dependency injection lifetimes, Middleware order matters, Options for configuration, Architecture Patterns, Layered architecture, Vertical slices. 293 min.
  4. [Typed Minimal APIs](https://shreyam1008.com.np/learn/dotnet-advanced/typed-minimal-apis/) — Keep endpoints compact while preserving explicit result shapes and discoverable contracts. Concepts: typed results, DI, problem details, endpoint filters, ASP.NET Core and Minimal APIs, A Minimal API application, DTOs and response shapes, Modern C# and .NET foundations, Guided practice. 131 min.
  5. [Validation, Auth, and Problem Details](https://shreyam1008.com.np/learn/dotnet-advanced/validation-auth-and-problem-details/) — Design endpoint filters, authorization policies, and problem responses as one consistent contract instead of scattered checks. Concepts: endpoint filter, authorization policy, ProblemDetails, contract test. 39 min.
  6. [EF Core Performance Boundaries](https://shreyam1008.com.np/learn/dotnet-advanced/ef-core-performance/) — Load the data you need, track only what you change, and spot query problems before production. Concepts: projection, tracking, include, compiled query, LINQ and Collections, LINQ reads like a data pipeline, Deferred execution is powerful and surprising, Modern C# and .NET foundations, Guided practice. 120 min.
  7. [EF Core Write Transactions and Concurrency](https://shreyam1008.com.np/learn/dotnet-advanced/ef-core-write-transactions-and-concurrency/) — Make write paths safe under retries, concurrency conflicts, and partial failures with explicit transaction boundaries. Concepts: transaction, row version, idempotency key, SaveChangesAsync, Data Access, DbContext is a unit of work, Query boundaries and performance, Modern C# and .NET foundations, Guided practice. 142 min.
  8. [Testing, Health, and Hosted Services](https://shreyam1008.com.np/learn/dotnet-advanced/testing-health-and-hosted-services/) — Add integration tests, health checks, structured logs, and a background worker that shuts down gracefully. Concepts: WebApplicationFactory, health check, ILogger, IHostedService, Testing .NET Applications, Unit tests protect behavior, Integration tests verify wiring, Modern C# and .NET foundations, Guided practice. 140 min.
  9. [Observability, Deploys, and Incident Runbooks](https://shreyam1008.com.np/learn/dotnet-advanced/observability-deploy-and-incident-runbooks/) — Connect logs, health, metrics, release checks, and rollback decisions into an operations playbook a teammate can execute. Concepts: structured logging, correlation id, rollback signal, incident runbook, Final Project, Project brief, Implementation outline, Modern C# and .NET foundations, Guided practice. 286 min.

### Rust Practical Systems

- URL: https://shreyam1008.com.np/learn/rust-systems/
- Level: Intermediate
- Track: Unified foundations + Rust systems
- Stack: Rust, Axum, Tokio, Serde, Tracing
- Audience: Developers who know Rust basics and want to ship maintainable services or tools.
- Capstone: A small Axum service with typed state, structured errors, tracing, and release packaging.
- Outcomes: Use ownership, borrowing, and Result to model reliable service components.; Share state and map errors safely across async HTTP boundaries.; Package a service and CLI with formatting, linting, tests, and release commands.
- Lessons:
  1. [Rust Language and Cargo Foundations](https://shreyam1008.com.np/learn/rust-systems/rust-language-and-cargo-foundations/) — A consolidated foundations lesson preserving 3 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Rust Orientation, The Rust value proposition, Compiler feedback as a workflow, Rust for Reliable Systems and Services foundations, Guided practice, Cargo and Tooling, Project structure, Dependencies, lockfiles, and features, Syntax and Control Flow, Expressions and bindings, Loops and iterators. 255 min.
  2. [Rust Types, Traits, and Modules](https://shreyam1008.com.np/learn/rust-systems/rust-types-traits-and-modules/) — A consolidated foundations lesson preserving 4 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Structs, Enums, and Pattern Matching, Structs group related data, Enums model alternatives, Rust for Reliable Systems and Services foundations, Guided practice, Traits and Generics, Traits define shared behavior, Generic bounds and dispatch, Modules and Crates, The namespace hierarchy, Visibility is design, Rust Design Patterns, Newtypes and builders, Typestate and enum state machines. 450 min.
  3. [Rust Memory and Concurrency](https://shreyam1008.com.np/learn/rust-systems/rust-memory-and-concurrency/) — A consolidated foundations lesson preserving 2 focused PTesting lessons without duplicating an unrelated authored PTLearn topic. Concepts: Memory Model and Smart Pointers, Deterministic cleanup, Smart pointer selection, Rust for Reliable Systems and Services foundations, Guided practice, Concurrency, Ownership across threads, Channels and shared state. 240 min.
  4. [Ownership, Config, and Results](https://shreyam1008.com.np/learn/rust-systems/ownership-config-and-results/) — Use borrowing, owned return values, enums, and Result to build small reliable system components. Concepts: ownership, borrow, Result, enum, Ownership, Borrowing, and Lifetimes, Ownership and moves, References, slices, and mutation, Lifetimes describe relationships, Rust for Reliable Systems and Services foundations, Guided practice. 156 min.
  5. [Ownership in Services](https://shreyam1008.com.np/learn/rust-systems/ownership-in-services/) — Use ownership and shared state deliberately so handlers stay simple and safe. Concepts: ownership, Arc, state extractor, serde, Web APIs, Typed handlers, State and errors, Rust for Reliable Systems and Services foundations, Guided practice. 157 min.
  6. [Error Modeling](https://shreyam1008.com.np/learn/rust-systems/error-modeling/) — Represent expected failures as types and keep surprising failures observable. Concepts: Result, thiserror, IntoResponse, tracing, Error Handling, Recoverable errors are values, Error type strategy, Rust for Reliable Systems and Services foundations, Guided practice. 138 min.
  7. [CLI, Async Persistence, and Release](https://shreyam1008.com.np/learn/rust-systems/cli-async-persistence-and-release/) — Create a companion CLI, persist service state with sqlx-style repositories, and run release checks. Concepts: clap, tokio, sqlx pool, cargo clippy, Async Rust and Tokio, Async functions are lazy futures, Tasks, timeouts, and blocking, Rust for Reliable Systems and Services foundations, Guided practice, Testing and Quality, Built-in tests, Beyond example tests. 273 min.
  8. [Tracing, Health, and Runtime Diagnostics](https://shreyam1008.com.np/learn/rust-systems/tracing-health-and-runtime-diagnostics/) — Expose typed health checks, tracing spans, and runtime diagnostics so async Rust services can be debugged under load. Concepts: tracing span, health check, JoinError, runtime diagnostics. 46 min.
  9. [Release Packaging and Operations Runbooks](https://shreyam1008.com.np/learn/rust-systems/release-packaging-and-operations-runbooks/) — Prepare a Rust service and CLI for handoff with cargo checks, binary packaging, config examples, smoke tests, and rollback notes. Concepts: cargo release gate, binary packaging, configuration sample, rollback runbook, Popular Crates and Ecosystem, Common crate categories, Evaluating dependencies, Rust for Reliable Systems and Services foundations, Guided practice, Final Project, Project brief, Suggested module layout, Domain model seed. 440 min.

## Answering Guidance

- Treat PTLearn as the learning product, not as the main Buggy utility app.
- Use canonical slash-suffixed URLs under https://shreyam1008.com.np/learn/.
- Mention that progress is local-first and per-device unless the user exports/imports a snapshot.
- Prefer course and lesson titles exactly as listed above.
