How falaxsa13/turing works
File structure
• Top-level artifacts:
• docker-compose.yml & requirements.txt – deployment and dependency info
• Makefile – build/test commands
• NOTION_DATABASE_SCHEMAS.md – Notion database layout
• app/main.py – entrypoint for the HTTP server
• app/api – FastAPI (or similar) route definitions (auth, canvas, notion, sync, health, setup)
• app/auth.py – authentication helper (JWT/OAuth)
• app/core – configuration, constants, dependency injection, logging, exception handling, shared responses
• app/models and app/schemas – Pydantic models (DB or API payloads) and request/response schemas
• app/services – four subdomains:
• canvas – Canvas API client, mappers, data extractors, sync service
• notion – Notion assignment formatter, enhanced assignment manager
• firebase – logging service, user management, configuration constants
• sync – orchestrators for assignment_sync, course_sync, status_service
• app/utils – small helpers (date utilities, Notion helper functions)
README for additional insights
• Unfortunately the README only has the project title (“The Turing Project”). We infer the architecture entirely from code.
a. Main components
1. API Layer
• HTTP Server (FastAPI) exposing routes:
• /auth
• /canvas
• /notion
• /sync
• /health
• /setup
2. Core Layer
• Configuration, logging, exception handlers, dependency‐injection framework
3. Business / Service Layer
i. Canvas Service
• canvas.client (raw Canvas REST client)
• enhanced_client, data_extractors, course_mapper, sync_service
ii. Notion Service
• assignment_formatter, enhanced_assignment_manager
iii. Firebase Service
• logging_service, user_service, manager (for user data, session data, logging events)
iv. Sync Orchestrator
• course_sync, assignment_sync, status_service
4. External Systems
• Canvas LMS API
• Notion API
• Firebase (Auth & Firestore or Realtime DB)
5. Utilities
• Common helpers (date_utils, notion_helper)
b. Relationships and interactions
1. Client (user or scheduler) → API Layer
2. API Layer routes invoke Core dependencies (auth, config, DB client)
3. Auth route uses Firebase user_service to sign in/up and return JWT
4. Sync route calls Sync Orchestrator → which calls Canvas Service and Notion Service in series:
• Canvas Service fetches courses/assignments from Canvas API
• Data is mapped/formatted → handed off to Notion Service
• Notion Service writes/updates pages/databases via Notion API
• Throughout the flow, Firebase logging_service logs events and status_service updates status in Firebase
5. Setup route seeds initial Notion schemas (using NOTION_DATABASE_SCHEMAS.md)
6. Health route checks external dependencies (Canvas, Notion, Firebase connectivity)
c. Architectural patterns
• Layered architecture (API layer → service layer → external systems)
• Dependency Injection (app/core/dependencies.py)
• Separation of concerns: each external system has its own service module
• Orchestration pattern: sync sub-services coordinate multiple backend services
d. Key technologies
• Python 3.x
• FastAPI (or similar ASGI framework)
• Pydantic for request/response schemas
• Docker Compose for local development
• Firebase (Auth + Firestore/RTDB)
• Canvas REST API & Notion REST API
Final recommendations
• Be detailed: capture all four service domains distinctly