graph LR
Microdot_Application_Core["Microdot Application Core"]
Server_Adapters["Server Adapters"]
Request_Processing_Routing["Request Processing & Routing"]
Middleware_Extensions["Middleware & Extensions"]
Session_Authentication["Session & Authentication"]
Template_Rendering["Template Rendering"]
Real_time_Communication["Real-time Communication"]
Server_Adapters -- "forwards requests to" --> Microdot_Application_Core
Microdot_Application_Core -- "returns responses to" --> Server_Adapters
Microdot_Application_Core -- "delegates request handling to" --> Request_Processing_Routing
Request_Processing_Routing -- "returns routing results to" --> Microdot_Application_Core
Microdot_Application_Core -- "passes request/response through" --> Middleware_Extensions
Middleware_Extensions -- "returns modified request/response to" --> Microdot_Application_Core
Microdot_Application_Core -- "requests authentication/authorization from" --> Session_Authentication
Session_Authentication -- "manages session data for" --> Microdot_Application_Core
Microdot_Application_Core -- "requests dynamic content rendering from" --> Template_Rendering
Template_Rendering -- "returns rendered HTML content to" --> Microdot_Application_Core
Microdot_Application_Core -- "establishes WebSocket connections with" --> Real_time_Communication
Microdot_Application_Core -- "provides data for Server-Sent Events to" --> Real_time_Communication
click Microdot_Application_Core href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/microdot/Microdot_Application_Core.md" "Details"
click Server_Adapters href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/microdot/Server_Adapters.md" "Details"
click Request_Processing_Routing href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/microdot/Request_Processing_Routing.md" "Details"
click Session_Authentication href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/microdot/Session_Authentication.md" "Details"
The Microdot framework's architecture is built around a central Microdot Application Core that orchestrates the entire request-response lifecycle. It receives incoming requests from various Server Adapters (e.g., ASGI, WSGI), ensuring compatibility across different server environments. The core then delegates to Request Processing & Routing to determine the appropriate handler for the request. Along the processing pipeline, Middleware & Extensions can modify requests or responses, providing a flexible mechanism for cross-cutting concerns. For managing user state and access, Session & Authentication components are integrated. When dynamic content is required, the core interacts with Template Rendering to generate HTML. Furthermore, the framework supports modern web interactions through Real-time Communication components for WebSockets and Server-Sent Events. This modular and extensible design allows Microdot to efficiently handle web requests and provide a robust foundation for web applications.
Microdot Application Core [Expand]
The central orchestrator of the Microdot framework, managing the application lifecycle, coordinating request handling, applying middleware, and dispatching requests to appropriate handlers.
Related Classes/Methods:
Server Adapters [Expand]
Provides the interface for Microdot to run on various web server specifications (ASGI, WSGI), translating server-specific protocols into Microdot's internal request/response format.
Related Classes/Methods:
Request Processing & Routing [Expand]
Handles parsing incoming HTTP requests, mapping URLs to specific handler functions, and dispatching requests to the appropriate code.
Related Classes/Methods:
src.microdot.microdot.dispatch_request:1404-1525src.microdot.microdot.route:952-987src.microdot.multipart.FormDataIter:7-131
A flexible layer for injecting processing logic into the request/response pipeline, including functionalities like Cross-Origin Resource Sharing (CORS).
Related Classes/Methods:
Session & Authentication [Expand]
Manages user session data to maintain state across requests and provides mechanisms for user identity verification and access control to protected resources.
Related Classes/Methods:
Integrates with template engines (uTemplate for MicroPython, Jinja for standard Python) to render dynamic content, allowing for separation of presentation from application logic.
Related Classes/Methods:
Manages the full lifecycle of WebSocket connections for bidirectional communication and facilitates Server-Sent Events (SSE) for one-way server-to-client updates.
Related Classes/Methods: