How kireitolemon/inkyame works
Main Components
• Frontend / Client Application:
• Built with Vue3 (see files like src/App.vue, src/main.js, and associated Vue components).
• Serves as the user interface once installed as a PWA, with the index.html as the entry point.
• Includes assets (e.g., images, CSS) and interactive components (such as HelloWorld.vue).
• Face Detection and Recognition Module:
• Utilizes face-api.js and p5.js libraries for real-time face tracking.
• Loads multiple neural network models (weights stored in both public/weights and src/models) to perform detection (face detection, face landmarks, expressions, etc.).
• Service Worker / PWA Engine:
• Supports full-screen, native-app like behavior for the PWA.
• Build/Deployment Environment:
• Docker and docker-compose enable containerized builds and local development.
• The Makefile handles initialization (make init) and starting the local server (make start).
• Hosting & Deployment:
• Cloudflare Pages is mentioned as the hosting service.
Relationships and Interactions
• User interacts with the Vue3-powered frontend (PWA) by installing it or loading it in a browser.
• Once started, the application boots up (via index.html and main.js), and triggers background processes that request camera access.
• Camera input is processed by the integrated face-api.js (and possibly p5.js) modules, which load the necessary model weights (retrieved from the public or src/models directories) for face detection and analysis.
• Docker is used during development and potentially for deployment, encapsulating the environment.
• Makefile commands streamline common development tasks.
Architectural Patterns and Design Principles
• Separation of Concerns:
• UI components are separated from model and asset directories.
• The code structure clearly isolates front-end logic from machine learning model assets.
• Component-Based Design:
• Vue components (in src/components) allow reusability and modular updates.
• PWA Best Practices:
• Leveraging a manifest (public/manifest.webmanifest) and service workers creates a native-like experience.
• Containerization:
• Dockerfile and docker-compose.yml indicate containerized builds for consistency across environments.