How amoscardino/inky-desk works
A client component designed to run on a Raspberry Pi with an attached InkyWHAT screen.
2. A server component, written in C# (.NET), that can run either locally on the Raspberry Pi or remotely, provided it is accessible via HTTP.
There’s also a “stand” folder containing design files (.scad, .stl) for a physical stand, which suggests that the project covers both software and hardware (mechanical design) aspects for a complete solution.
• Client (Raspberry Pi with InkyWHAT Screen)
• This as a separate module.
• Components: InkyDesk client scripts (inkydesk.py and inkydesk.sh) and any local configuration mentioned in its README.
• That this script will be responsible for retrieving image/calendar data via HTTP calls and outputting it to the e-ink display.
• Server (Backend API)
▪ Configuration: Use of JSON files (calendars.json) and appsettings.json (with a development alternative) to control behavior.
▪ Models: Representing the data structures (CalendarModel, EventModel, ReplacementModel).
▪ Services: Business logic for calendars, events, images, replacements, and weather (CalendarService, EventService, ImageService, ReplacementsService, WeatherService).
▪ Utilities: Helper classes (e.g., RandomUtilities.cs) used across the server logic.
• Dockerfile, which indicates the server can be containerized for deployment.
• External Interactions:
• You may also mention any external APIs (for example, the WeatherService might fetch data from an external weather source) even if details aren’t fully specified.
• Stand Hardware (Optional Component)
• A block representing the design files for the physical stand. This shows the integration of the hardware dimension and how the software (the InkyDesk display) will be physically mounted.
B. Indicate Relationships and Data Flow:
• From the Client module to the Server module, indicating that the Raspberry Pi communicates with the server over HTTP (data requests, responses with rendered content).
• Separation of concerns:
• The client is solely responsible for interfacing with the e-ink display and sending/receiving HTTP requests.
• The server handles business logic and data management, reflecting an MVC-like structure (even if it’s not literally an MVC framework, the separation between Models and Services strongly implies layered architecture).
C. Identify Architectural Patterns and Technologies:
• Technology Stack:
• Client: Python scripts and shell scripts running on Raspberry Pi, specialized to interact with an InkyWHAT e-ink screen.
• Server: .NET (as indicated by InkyDesk.Server.csproj and C# files), containerized via Docker, with clear delineation between models, services, and utilities.
• Patterns:
• Service-oriented decomposition: especially within the server where each service (for calendar, events, images, etc.) encapsulates specific functionality.
• Configuration via JSON files, suggesting a dynamic and environment-oriented setup (different settings for development vs. production).
• Within the Client section:
• Files or functions (for example, inkydesk.py for the core logic, inkydesk.sh for deployment/launch).
• Within the Server section:
• Create subcomponents:
▪ Configuration: Represent appsettings.json and calendars.json.
▪ Utility Components: RandomUtilities and similar helper components.
• A note or a sidebar that mentions the Dockerfile for container deployment.
• For the External Interactions:
• Optionally, if the WeatherService interacts with an external weather API, denote with an additional module “External Weather API” and show the interaction.
• For the Stand hardware:
E. Design Elements and Legends:
• Rectangles for software components.
F. Tailoring Based on Project Type:
Since this is a full-stack application with both embedded (client) and server components:
• Separation between the client running on the Raspberry Pi (interfacing directly with hardware) and the server’s backend operations.
• HTTP API layer that decouples client and server, allowing the server to be hosted independently of the client’s physical deployment.
• To document any integration points, such as the potential external APIs for weather data, to give a complete picture of the system.