How ethandengs/eremois works
Main Components
• Applications:
– Desktop App (built with Tauri in apps/desktop)
– Mobile App (React Native in apps/mobile)
– Web App (Next.js in apps/web)
– API Backend (located in apps/api, responsible for handling API requests, authentication, and possibly acting as a server for self-hosted setups)
• Core Packages:
– AI Package (packages/ai): Implements privacy-preserving, edge-based AI (using TensorFlow.js or ONNX Runtime) for local learning and prediction
– Core (packages/core): Contains business logic, authentication context, and other shared data models that drive app behavior
– UI Package (packages/ui): Offers shared components like forms, visualizations, and themed UI elements across platforms
• Supporting Elements:
– Documentation (docs folder) detailing architecture, deployment, and contribution guidelines
– Configuration/Build Tools: Turbo configuration, TypeScript configurations, and scripts in tools/ for setup and maintenance
Relationships and Interactions
• Frontend-to-Backend:
– The mobile, web, and desktop apps interface with the backend API (apps/api) for tasks such as authentication and data synchronization (for instance, for self-hosted or multi-device sync scenarios).
– Each frontend might also integrate closely with the local edge AI component (via packages/ai) to perform real-time, privacy-preserving learning on the device.
• Package Dependencies:
– The core business logic (packages/core) is used across various applications to manage scheduling, tasks, and natural rhythm predictions.
– The UI package (packages/ui) is imported by each application for a consistent look, such as the CircularTimeline and interactive components.
• Data Flow:
– User interactions in the app layer trigger calls to both the local AI (for predictions and learning) and, where required, remote API calls.
– The AI component processes user data locally and offers suggestions along with explanations (as per the interface outlined in the README).
– For self-hosted and enterprise deployments, a more centralized API server ensures data synchronization between devices.
Architectural Patterns and Design Principles
• Multi-platform Architecture: Separation of concerns is clear, with dedicated directories for desktop, mobile, and web frontends.
• Modularization: The use of packages (ai, core, ui) shows a clear modular approach allowing reusability and independent evolution of key functionalities.
• Edge AI and Privacy by Design: Emphasize that AI learning happens locally (edge processing) and that there is an optional API backend for synchronization while preserving privacy.
• Clear Separation of Development and Deployment: Local development tools, CI workflows (.github/workflows), and clear documentation (docs/architecture and docs/deployment) reinforce a well-managed build and deployment process.
• Each component should have clear labels with its technology reference (e.g., “Mobile (React Native)”, “Backend API (Node.js/TypeScript)”, “AI Module (TensorFlow.js)”).
• Interfaces and data flow paths, such as the “local learning” and “predictive suggestion” flows defined in the README’s Edge AI Architecture.
• Environmental context:
– For a personal installation, emphasize on-device data processing and minimal API communication.
– For self-hosting and enterprise, illustrate the flow from multiple devices to the central API and backup systems.