How lowdefy/lowdefy-example-business-card works
Project’s Main Components
• Lowdefy Application Core: The main Lowdefy configuration (via the lowdefy.yaml in the “app” folder) orchestrates the pages and overall routing.
• User Interface Pages: Organized under “app/pages”, these include pages for login, sign-up, home, profile (and subcomponents for profile display), dashboard (with components like graph chart and total users), connections, and error handling (e.g., the 404 page).
• Shared Components and Requests: Located in “app/shared”, shared functionalities like the profile form and common API requests are centralized here.
• Plugins: Specifically, the “plugins/plugin-business-cards” directory includes a custom plugin that provides a block for QR code generation, among other business card related logic.
• External Services:
• LinkedIn Authentication: Integrated via Auth.js (using the LinkedIn provider).
• MongoDB: For data storage and retrieval, as configured in the environment variables.
Relationships Between Components
• The Lowdefy configuration in “app/lowdefy.yaml” sets up the overall layout and routing for the pages.
• Each page (such as “home”, “profile”, “dashboard”, etc.) is its own Lowdefy page defined by YAML files. They include components (differences handled via subdirectories) and requests that interface with the backend or external services.
• Shared components and requests encapsulate common logic and UI elements, which are referenced across multiple pages.
• The custom plugin (located under “plugins/plugin-business-cards”) integrates into the app to provide QR code generation blocks. This plugin might be injected as a Lowdefy plugin, enhancing the digital business card functionality.
• The authentication flow is backed by Auth.js with LinkedIn; once authenticated, user details are stored and managed via MongoDB.
Important Architectural Patterns and Technologies
• Component-Based Design: The clear separation between pages, shared components, and plugins promotes reusability.
• Separation of Concerns: The design distinguishes between application UI (pages/components), data requests, and business logic (plugins).
• Use of Plugins and Extensibility: The custom business card plugin indicates an extensible architecture where additional plugins could be added to extend functionality.
Detailed Representation
• Component labels: “Login Page”, “Home Page”, “Profile Page”, “Dashboard Page”, “404 Page” etc.
• Request groups: “Profile Requests”, “Dashboard Requests”, “Connection Requests”, etc.
• Plugin components: “QR Code Block (Business Cards Plugin)”.
• External systems clearly depicted: “LinkedIn Auth (Auth.js)” and “MongoDB”.