# jlhv070123/app_planificacion architecture

> Architecture diagram of the GitHub repository jlhv070123/app_planificacion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jlhv070123/app_planificacion
- Repository: https://github.com/jlhv070123/app_planificacion

## Overview

1. This is a client-side single-page app built with Vite, React, and TypeScript. The repo contains no server process or backend code; the browser bundle is the whole application.

2. The boot path is standard: `index.html` loads `src/main.tsx`, which mounts the root `App.tsx`. From there, `App` acts as the orchestration layer for the UI and shared state.

3. The UI is split into three main feature components under `src/components`:
   - `TaskForm.tsx` for creating or editing task data
   - `TaskList.tsx` for displaying the task collection
   - `Dashboard.tsx` for summary/analytics-style visualization of task state

4. The domain model lives in `src/types.ts`. That file likely defines the core task shape and any related enums or shared interfaces used across form, list, dashboard, and utility code.

5. `src/constants.ts` centralizes shared configuration and UI/domain constants. This is a small but important boundary because it keeps labels, limits, or default values consistent across the app.

6. The main data flow is likely: user input enters through `TaskForm`, updates app state in `App`, then that state is propagated down to `TaskList` and `Dashboard`. Those child components are presentational and depend on props rather than owning the source of truth.

7. There are three utility modules that represent the app’s non-visual logic:
   - `utils/distribution.ts` for task allocation or balancing logic
   - `utils/csv.ts` for CSV import/export or serialization
   - `utils/sync.ts` for persistence or external synchronization
   These modules are the main boundary between UI and data-processing logic.

8. `distribution.ts` is likely the core business-logic layer, since it suggests computed task assignment or workload balancing rather than simple rendering. `Dashboard` would consume its output to show derived metrics or grouped results.

9. `csv.ts` introduces an interoperability boundary: task data can move in and out of the app as files/text rather than only through the UI. That means the architecture supports both interactive use and batch-style data exchange.

10. `sync.ts` suggests the app can persist or synchronize state outside the local component tree. The repo does not show a backend service, so any sync is likely client-side against an external API or browser storage mechanism.

11. The README requires a `GEMINI_API_KEY`, which indicates there is an external Gemini integration in the runtime environment, even though the exact call site is not visible in the file tree. For an architecture diagram, this should be shown as an external AI service dependency connected from the client app, not as an in-repo service.

12. Styling is handled through `src/index.css`, with `src/main.tsx` and `src/App.tsx` forming the composition root. Build and dev tooling are the standard Vite/npm stack (`vite.config.ts`, `package-lock.json`, `package.json`), and deployment is likely static hosting of the built frontend.

13. In diagram terms, the key boundaries are: browser UI components, shared app state in `App`, pure utility logic for distribution/CSV/sync, and the external Gemini API. There is no evidence of separate backend tiers, databases, or message queues in this repository.

Main entry points: [`src/App.tsx`](https://github.com/jlhv070123/app_planificacion/blob/main/src/App.tsx) (App), [`src/main.tsx`](https://github.com/jlhv070123/app_planificacion/blob/main/src/main.tsx) (main.tsx), [`src/components/TaskForm.tsx`](https://github.com/jlhv070123/app_planificacion/blob/main/src/components/TaskForm.tsx) (TaskForm), [`src/components/TaskList.tsx`](https://github.com/jlhv070123/app_planificacion/blob/main/src/components/TaskList.tsx) (TaskList)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g1["Runtime/UI"]
  node_n2(("main.tsx<br/>bootstrap<br/>[main.tsx]"))
  node_n3["App<br/>orchestrator<br/>[App.tsx]"]
end

subgraph group_g2["Features"]
  node_n4["TaskForm<br/>form component<br/>[TaskForm.tsx]"]
  node_n5["TaskList<br/>list component<br/>[TaskList.tsx]"]
  node_n6["Dashboard<br/>analytics component<br/>[Dashboard.tsx]"]
end

subgraph group_g3["Domain Logic"]
  node_n7["types.ts<br/>task model<br/>[types.ts]"]
  node_n8["constants.ts<br/>config constants<br/>[constants.ts]"]
  node_n9{{"distribution.ts<br/>task logic<br/>[distribution.ts]"}}
end

subgraph group_g4["Integrations"]
  node_n10{{"csv.ts<br/>csv codec<br/>[csv.ts]"}}
  node_n11{{"sync.ts<br/>sync adapter<br/>[sync.ts]"}}
  node_n12[("Gemini API<br/>external ai service")]
end

subgraph group_g5["Tooling"]
  node_n1["index.html<br/>html shell<br/>[index.html]"]
  node_n13["index.css<br/>global styles<br/>[index.css]"]
  node_n14["vite.config.ts<br/>build config<br/>[vite.config.ts]"]
  node_n15["package.json<br/>project manifest<br/>[package.json]"]
end

node_n1 -->|"loads"| node_n2
node_n2 -->|"mounts"| node_n3
node_n3 -->|"renders"| node_n4
node_n3 -->|"renders"| node_n5
node_n3 -->|"renders"| node_n6
node_n4 -->|"updates"| node_n3
node_n3 -->|"uses"| node_n7
node_n4 -->|"uses"| node_n8
node_n5 -->|"computes"| node_n9
node_n6 -->|"summarizes"| node_n9
node_n3 -->|"imports/exports"| node_n10
node_n3 -->|"persists"| node_n11
node_n3 -->|"calls"| node_n12
node_n2 -->|"loads"| node_n13
node_n14 -.->|"builds"| node_n2
node_n15 -.->|"defines"| node_n14

click node_n1 "https://github.com/jlhv070123/app_planificacion/blob/main/index.html"
click node_n2 "https://github.com/jlhv070123/app_planificacion/blob/main/src/main.tsx"
click node_n3 "https://github.com/jlhv070123/app_planificacion/blob/main/src/App.tsx"
click node_n4 "https://github.com/jlhv070123/app_planificacion/blob/main/src/components/TaskForm.tsx"
click node_n5 "https://github.com/jlhv070123/app_planificacion/blob/main/src/components/TaskList.tsx"
click node_n6 "https://github.com/jlhv070123/app_planificacion/blob/main/src/components/Dashboard.tsx"
click node_n7 "https://github.com/jlhv070123/app_planificacion/blob/main/src/types.ts"
click node_n8 "https://github.com/jlhv070123/app_planificacion/blob/main/src/constants.ts"
click node_n9 "https://github.com/jlhv070123/app_planificacion/blob/main/src/utils/distribution.ts"
click node_n10 "https://github.com/jlhv070123/app_planificacion/blob/main/src/utils/csv.ts"
click node_n11 "https://github.com/jlhv070123/app_planificacion/blob/main/src/utils/sync.ts"
click node_n13 "https://github.com/jlhv070123/app_planificacion/blob/main/src/index.css"
click node_n14 "https://github.com/jlhv070123/app_planificacion/blob/main/vite.config.ts"
click node_n15 "https://github.com/jlhv070123/app_planificacion/blob/main/package.json"

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_n2,node_n3 toneBlue
class node_n4,node_n5,node_n6 toneAmber
class node_n7,node_n8,node_n9 toneMint
class node_n10,node_n11,node_n12 toneRose
class node_n1,node_n13,node_n14,node_n15 toneIndigo
```

## Components

### Runtime/UI

Browser app entry and shared composition layer

- [main.tsx](https://github.com/jlhv070123/app_planificacion/blob/main/src/main.tsx): bootstrap · Mounts the React app into the page · `src/main.tsx`
- [App](https://github.com/jlhv070123/app_planificacion/blob/main/src/App.tsx): orchestrator · Top-level UI state and composition root · `src/App.tsx`

### Features

Primary task management screens

- [TaskForm](https://github.com/jlhv070123/app_planificacion/blob/main/src/components/TaskForm.tsx): form component · Creates and edits task input · `src/components/TaskForm.tsx`
- [TaskList](https://github.com/jlhv070123/app_planificacion/blob/main/src/components/TaskList.tsx): list component · Displays the task collection · `src/components/TaskList.tsx`
- [Dashboard](https://github.com/jlhv070123/app_planificacion/blob/main/src/components/Dashboard.tsx): analytics component · Shows task summary and derived views · `src/components/Dashboard.tsx`

### Domain Logic

Shared task model and business rules

- [types.ts](https://github.com/jlhv070123/app_planificacion/blob/main/src/types.ts): task model · Shared task types and interfaces · `src/types.ts`
- [constants.ts](https://github.com/jlhv070123/app_planificacion/blob/main/src/constants.ts): config constants · Shared labels, defaults, and limits · `src/constants.ts`
- [distribution.ts](https://github.com/jlhv070123/app_planificacion/blob/main/src/utils/distribution.ts): task logic · Task allocation and balancing rules · `src/utils/distribution.ts`

### Integrations

Import/export, persistence, and external AI dependency

- [csv.ts](https://github.com/jlhv070123/app_planificacion/blob/main/src/utils/csv.ts): csv codec · CSV import/export and serialization · `src/utils/csv.ts`
- [sync.ts](https://github.com/jlhv070123/app_planificacion/blob/main/src/utils/sync.ts): sync adapter · Persistence or external synchronization · `src/utils/sync.ts`
- **Gemini API**: external ai service · External AI dependency used by the client runtime

### Tooling

Build and styling entrypoints

- [index.html](https://github.com/jlhv070123/app_planificacion/blob/main/index.html): html shell · Vite entry document that loads the app · `index.html`
- [index.css](https://github.com/jlhv070123/app_planificacion/blob/main/src/index.css): global styles · Application-wide styling · `src/index.css`
- [vite.config.ts](https://github.com/jlhv070123/app_planificacion/blob/main/vite.config.ts): build config · Vite build and dev setup · `vite.config.ts`
- [package.json](https://github.com/jlhv070123/app_planificacion/blob/main/package.json): project manifest · Dependencies and scripts · `package.json`

## Connections

- index.html → main.tsx: loads · HTML entry loads the TypeScript bootstrap
- main.tsx → App: mounts · Bootstraps the root React component
- App → TaskForm: renders · Passes state and handlers to the form
- App → TaskList: renders · Shares task state with the list view
- App → Dashboard: renders · Shares task state with the dashboard
- TaskForm → App: updates · User edits flow back into app state
- App → types.ts: uses · App and features share the task model
- TaskForm → constants.ts: uses · Form behavior is driven by shared constants
- TaskList → distribution.ts: computes · List or derived views use distribution logic
- Dashboard → distribution.ts: summarizes · Dashboard consumes computed allocation results
- App → csv.ts: imports/exports · App-level file exchange for task data
- App → sync.ts: persists · State is synchronized outside the component tree
- App → Gemini API: calls · Client runtime connects to external Gemini service
- main.tsx → index.css: loads · Global styles are applied at bootstrap
- vite.config.ts → main.tsx: builds · Vite config supports the app bootstrap
- package.json → vite.config.ts: defines · Project manifest provides build tooling dependencies
