How dmoyadev/genoma works
Main Components
• Frontend UI: The heart of the application built with Vue components. Organize this into logical modules:
• Auth Module: Contains authentication-related UI (e.g., LoginPage.vue), background images, and composable functions (useAuth.ts) to handle user sessions.
• App Module: Encompasses the main dashboard areas such as the header, error handling, configuration, and home pages. Look at components like TheHeader.vue and pages in src/modules/app/pages.
• People Module: Manages the family tree. It includes models (e.g., Person.ts), views (PersonPage.vue, InfiniteWorkspace.vue), and composables (usePeopleService.ts, useTreeService.ts) that encapsulate business logic.
• Onboarding Module: Provides user onboarding flows and pages.
• Module: Demonstrates UI components and acts as a sandbox for components.
• Router: The src/router.ts defines the navigation routes connecting these modules.
• Utility & Config: Contains helper functions, the Firebase utility (src/utils/firebase.ts), and configuration files (environment variables, firebase.json, .env.example).
External and Integration Layers
• Firebase Services: The existence of firebase.json, useDB.ts, and useStorage.ts suggests integration with Firebase for:
• Database storage (family tree and user data).
• Cloud storage (perhaps for images or documents).
• Authentication services.
• GitHub Workflows: The .github/workflows files (firebase-hosting-merge.yml, firebase-hosting-pull-request.yml) indicate automated deployment and hosting processes on Firebase.
• UI Components from each module interact with their respective composables (for instance, useAuth in the Auth module or usePeopleService in the People module) to fetch and manipulate data.
• The Router (in src/router.ts) connects various pages and links the UI layers together.
• The frontend communicates with Firebase services through specific utilities and composable layers to persist data, authenticate users, and store files.
• Configuration files such as environment settings and Vite configuration (vite.config.ts) tie the build and runtime environment together.
Architectural Patterns & Design Principles
• Component-Based Design: The application is built using reusable Vue components (e.g., BaseButton, BaseIcon) which promotes modularity.
• Domain-Based Module Separation: Each domain such as authentication, people (family tree), and onboarding is clearly separated into its own module with dedicated components, pages, and utilities.
• Service Abstraction: Use of composables (like useDB, useAuth, usePeopleService) abstracts the interaction with external services.
• Clear Separation of Concerns: There’s a distinction between presentation (layouts, pages), business logic (composables, services), and utility/configuration layers.