How johnfrancis13/fam_mgmt works
Project type and purpose
• app.R at the root of src/ suggests a monolithic Shiny app that pulls together a set of feature modules (calendar, chores, meal planning, etc.) and a small data layer (SQLite DB + CSV).
File structure
• Top level:
• family_management_app.Rproj – RStudio project file.
• src/app.R – the single entry point that defines UI and server.
• src/modules/… – each feature has its own module script (calendar, chores, finances, fitness, home, meal planning, message board, shopping list).
• src/data/ – persistence: family_management.db (SQLite) and meal_lookup_table_editable.csv.
• src/utils.R – shared helper functions (e.g., DB connectors, common UI helpers).
Readme insights
• README.md only contains “# fam_mgmt,” no explicit architecture guidance.
• The structure implicitly uses Shiny modules as the architectural pattern for separation of concerns.
a. Main components
• Browser / Client: your end users (family members) interacting via web UI.
• Shiny Server Process (or local R session) hosting:
• UI Layer (defined in app.R)
• Server Logic Layer (app.R orchestrates modules + utils)
• Modules (8 distinct feature modules, each with UI and server functions)
• Data Layer:
• SQLite database (family_management.db)
• CSV file (meal_lookup_table_editable.csv)
b. Relationships & interactions
• Browser → HTTP/WebSocket → Shiny Server UI
• UI triggers module inputs → module server functions
• Module server functions call utils.R and/or DBI/RSQLite to read/write family_management.db or load CSV.
• utils.R provides shared logic (e.g., open DB connection, parameter validation).
• Data changes in DB persist across sessions and are reflected back through reactive endpoints to the UI.
c. Architectural patterns/design principles
• Shiny module pattern (UI + server pairs per feature) ensures separation of concerns and easier maintainability.
• Single‐page application model: all modules loaded within one Shiny app.
• Explicit data‐access layer (utils.R + RSQLite) decoupled from module logic.
d. Key technologies & libraries
• R, Shiny (UI/server framework)
• Shiny modules (modularization)
• DBI + RSQLite (SQLite access)
• Base R for CSV I/O (readr or utils::read.csv)
Essential architectural elements
• Don’t over‐split; the critical separation is UI vs. modules vs. data store.
• Shared utils.R as a common service layer.
• Clearly how data flows from the user interface down to the database and back.