# programminghero1/b13-a7-keen-keeper architecture

> Architecture diagram of the GitHub repository programminghero1/b13-a7-keen-keeper, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/programminghero1/b13-a7-keen-keeper
- Repository: https://github.com/programminghero1/b13-a7-keen-keeper

## Overview

This repository is mostly a **project specification + design source repo**, not an application codebase yet. The architecture is implied by the README requirements and the included UI design files rather than by implemented source code.

1. **Top-level repository shape**
   - `README.md` is the primary source of truth for behavior, pages, and grading requirements.
   - `ui/` contains the design assets: `KinKeeper.fig` and `KinKeeper.penpot`.
   - `assets/` is present for static media, but no implementation files are shown in the tree.

2. **Primary product boundary**
   - The intended product is a friendship-tracking app called **KeenKeeper**.
   - The app is centered around one core domain: **friends** and their **interaction history**.
   - There is no evidence of a backend service in this repo; the design implies a mostly front-end application with local/static data and client-managed state.

3. **Design source of truth**
   - The Figma/Penpot files in `ui/` define the visual structure for the app.
   - These are likely the authoritative layout references for the navbar, banner, friend cards, detail page, timeline, stats page, and footer.
   - For an architecture diagram, treat `ui/` as the design input feeding the implementation layer.

4. **Content/data layer implied by the README**
   - The app expects a `friends.json` data source containing 6–10 friend profiles.
   - Each friend record includes identity, contact metadata, status, tags, bio, contact goal, and next due date.
   - This static dataset is the foundation for the Home page and Friend Detail page.

5. **Core page structure**
   - The app is organized around five functional views:
     - **Home**: banner, summary cards, friends grid
     - **Friend Detail**: profile info, stats, goal, check-in actions
     - **Timeline**: interaction history
     - **Stats**: analytics with a pie chart
     - **404**: invalid route fallback
   - These are the main navigation nodes in the UI architecture.

6. **Home page data flow**
   - The Home page fetches or loads friend data, shows a loading state, then renders cards in a responsive grid.
   - Each friend card is a navigation entry point into the detail view.
   - The banner and summary cards are page-level UI elements; the friend cards are the primary data-driven repeating component.

7. **Friend detail interaction flow**
   - The detail page is a two-column layout:
     - Left: identity/profile card and action buttons
     - Right: stats cards, contact goal, and quick check-in controls
   - The quick check-in buttons (**Call**, **Text**, **Video**) are the key write actions in the app.
   - Clicking one of these actions creates a new timeline entry and shows a toast notification.

8. **Timeline as shared interaction log**
   - Timeline entries are the central mutable data output of the app.
   - Each entry records date, interaction type, and title, and is rendered on the Timeline page.
   - The README also requires filtering by interaction type, and optionally sorting/searching, which makes timeline a view over an interaction log rather than a simple static list.

9. **Stats/analytics boundary**
   - The Stats page summarizes interaction types using a **Recharts pie chart**.
   - This page depends on the same timeline data used by the Timeline page, but presents it as aggregated analytics.
   - In architecture terms, it is a read-only consumer of interaction history.

10. **Navigation and routing**
    - The app is expected to use client-side routing, either with React Router DOM or a Next.js router.
    - The route map must support direct navigation and page refresh without errors, which means route handling is a significant architectural concern.
    - A dedicated 404 page is required for unknown routes.

11. **State boundaries**
    - The app likely has two main state domains:
      - **Friend data state**: loaded from JSON and used for list/detail views
      - **Timeline state**: updated when check-in buttons are clicked and consumed by Timeline/Stats
    - Toast notifications are a transient UI state layered on top of interaction handling.

12. **Responsiveness and layout**
    - The README emphasizes mobile, tablet, and desktop support.
    - That means the implementation must be component-driven and layout-adaptive across all major pages.
    - The grid on Home and the two-column detail view are the most important responsive layout boundaries.

13. **Technology layer implied by the requirements**
    - The target stack is a React-based front end, possibly Next.js.
    - Tailwind CSS and a component library are expected for responsive UI construction.
    - Recharts is specifically required for analytics visualization.
    - A toast library is implied by the notification requirement.

14. **Practical architecture takeaway**
    - If you are drawing the architecture from this repo, the safest interpretation is:
      - **Design assets** in `ui/`
      - **Static/data inputs** in `friends.json` and related assets
      - **Client-side app shell** with navigation
      - **Friend domain views** for list/detail/timeline/stats
      - **Shared interaction state** feeding timeline and analytics
    - There is no sign of a backend, authentication layer, or external API integration in the repository contents provided.

Main entry points: [`README.md`](https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/README.md) (README), [`ui/KinKeeper.fig`](https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/ui/KinKeeper.fig) (Figma file), [`ui/KinKeeper.penpot`](https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/ui/KinKeeper.penpot) (Penpot file)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_spec["Spec & docs"]
  node_readme["README<br/>spec<br/>[README.md]"]
end

subgraph group_design["Design assets"]
  node_figma["Figma file<br/>design<br/>[KinKeeper.fig]"]
  node_penpot["Penpot file<br/>design<br/>[KinKeeper.penpot]"]
end

subgraph group_app["Client app"]
  node_shell["App shell<br/>router"]
  node_home["Home<br/>page"]
  node_detail["Friend detail<br/>page"]
  node_timeline["Timeline<br/>page"]
  node_stats["Stats<br/>page"]
  node_notfound(("404<br/>route"))
  node_layout{{"Responsive layout<br/>ui-system"}}
  node_friendsgrid["Friend cards<br/>list"]
  node_profilepanel["Profile panel<br/>detail-section"]
  node_actions["Check-ins<br/>actions"]
  node_toast(("Toasts<br/>ui-feedback"))
  node_chart(("Pie chart"))
end

subgraph group_data["Data & state"]
  node_frienddata[("Friends data<br/>dataset")]
  node_log[("Interaction log<br/>state")]
end

node_readme -->|"defines"| node_shell
node_readme -->|"specifies"| node_frienddata
node_readme -->|"requires"| node_timeline
node_readme -->|"requires"| node_stats
node_figma -->|"informs"| node_shell
node_penpot -->|"informs"| node_shell
node_shell -->|"routes to"| node_home
node_shell -->|"routes to"| node_detail
node_shell -->|"routes to"| node_timeline
node_shell -->|"routes to"| node_stats
node_shell -->|"falls back to"| node_notfound
node_home -->|"uses"| node_layout
node_detail -->|"uses"| node_layout
node_frienddata -->|"feeds"| node_home
node_frienddata -->|"feeds"| node_detail
node_home -->|"renders"| node_friendsgrid
node_friendsgrid -->|"navigates to"| node_detail
node_detail -->|"contains"| node_profilepanel
node_detail -->|"contains"| node_actions
node_actions -->|"writes"| node_log
node_actions -->|"triggers"| node_toast
node_log -->|"feeds"| node_timeline
node_log -->|"feeds"| node_stats
node_stats -->|"visualizes"| node_chart

click node_readme "https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/README.md"
click node_figma "https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/ui/KinKeeper.fig"
click node_penpot "https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/ui/KinKeeper.penpot"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readme toneBlue
class node_figma,node_penpot toneAmber
class node_shell,node_home,node_detail,node_timeline,node_stats,node_notfound,node_layout,node_friendsgrid,node_profilepanel,node_actions,node_toast,node_chart toneMint
class node_frienddata,node_log toneRose
```

## Components

### Spec & docs

Repository requirements and source-of-truth documentation

- [README](https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/README.md): spec · Primary requirements, grading rules, and feature contract · `README.md`

### Design assets

UI design files that define the intended interface

- [Figma file](https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/ui/KinKeeper.fig): design · Visual source for the intended product UI · `ui/KinKeeper.fig`
- [Penpot file](https://github.com/programminghero1/b13-a7-keen-keeper/blob/main/ui/KinKeeper.penpot): design · Alternative design source for the same UI system · `ui/KinKeeper.penpot`

### Client app

Intended front-end experience and navigation

- **App shell**: router · Client-side navigation and route handling
- **Home**: page · Banner, summary cards, and friends grid
- **Friend detail**: page · Profile, stats, goal, and quick check-ins
- **Timeline**: page · Interaction history view with filtering
- **Stats**: page · Analytics view built from interaction data
- **404**: route · Fallback for unknown routes
- **Responsive layout**: ui-system · Mobile, tablet, and desktop layout behavior
- **Friend cards**: list · Repeating cards that link into detail views
- **Profile panel**: detail-section · Identity and contact metadata for a friend
- **Check-ins**: actions · Call, text, and video interaction triggers
- **Toasts**: ui-feedback · Transient confirmation after check-in actions
- **Pie chart**: chart · Aggregated interaction breakdown for stats

### Data & state

Static friend data and mutable interaction history

- **Friends data**: dataset · Static friend profiles loaded from JSON
- **Interaction log**: state · Mutable timeline entries shared across views

## Connections

- README → App shell: defines · Requirements establish routing, pages, and behavior
- README → Friends data: specifies · The friend dataset structure and fields are required
- README → Timeline: requires · Timeline filtering and interaction history behavior
- README → Stats: requires · Analytics and charting expectations
- Figma file → App shell: informs · Design system and page structure guide implementation
- Penpot file → App shell: informs · Alternative design source for the same UI
- App shell → Home: routes to · Default landing page
- App shell → Friend detail: routes to · Friend-specific detail page
- App shell → Timeline: routes to · Interaction history page
- App shell → Stats: routes to · Analytics page
- App shell → 404: falls back to · Unknown-route handling
- Home → Responsive layout: uses · Responsive banner, cards, and grid layout
- Friend detail → Responsive layout: uses · Two-column responsive detail layout
- Friends data → Home: feeds · Cards are built from friend profiles
- Friends data → Friend detail: feeds · Selected friend data populates the profile view
- Home → Friend cards: renders · Primary repeating UI on the home page
- Friend cards → Friend detail: navigates to · Each card is an entry point into details
- Friend detail → Profile panel: contains · Identity and contact metadata section
- Friend detail → Check-ins: contains · Quick interaction controls
- Check-ins → Interaction log: writes · New interaction entries are appended
- Check-ins → Toasts: triggers · User feedback after a successful check-in
- Interaction log → Timeline: feeds · Timeline page reads the shared interaction history
- Interaction log → Stats: feeds · Stats aggregates the same history
- Stats → Pie chart: visualizes · Pie chart summarizes interaction types
