# cymjackie/pimsystem architecture

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

- Interactive diagram: https://gitdiagram.com/cymjackie/pimsystem
- Repository: https://github.com/cymjackie/pimsystem

## Overview

This is a personal information manager for creating, modifying, deleting, loading, saving, printing, and searching text notes, tasks, events, and contacts. The main workflow runs from the user-facing views through PIMController, which coordinates commands and the in-memory PIRManager. Search has a distinct query-parsing, evaluation, and result-presentation path. The README is empty, so capabilities are inferred from the source index; unsampled command implementations are represented only where indexed references support their connections.

Main entry points: [`src/model/command/Search.java`](https://github.com/cymjackie/pimsystem/blob/master/src/model/command/Search.java) (Search command), [`src/controller/PIMController.java`](https://github.com/cymjackie/pimsystem/blob/master/src/controller/PIMController.java) (PIM controller), [`src/model/PIRManager.java`](https://github.com/cymjackie/pimsystem/blob/master/src/model/PIRManager.java) (Record manager), [`src/view/PIMView.java`](https://github.com/cymjackie/pimsystem/blob/master/src/view/PIMView.java) (PIM view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User interface"]
  node_views["Command views"]
  node_mainview["PIM view<br/>[PIMView.java]"]
end

subgraph group_control["Application control"]
  node_main["Application entry<br/>[Main.java]"]
  node_controller["PIM controller<br/>[PIMController.java]"]
  node_commands["Record commands"]
end

subgraph group_data["Records and storage"]
  node_manager[("Record manager<br/>[PIRManager.java]")]
  node_record["Base record<br/>[Record.java]"]
  node_recordtypes["Record types"]
end

subgraph group_search["Search"]
  node_searchcommand["Search command<br/>[Search.java]"]
  node_parser["Query parser<br/>[SearchParser.java]"]
  node_expressions["Query expressions"]
  node_criteria["Search criteria<br/>[Criterion.java]"]
  node_fields["Search fields<br/>[Field.java]"]
  node_profiles["Type profiles<br/>[TypeProfile.java]"]
  node_results["Search results<br/>[SearchResult.java]"]
  node_diagnostics["Query diagnostics"]
  node_tokens["Query tokens<br/>[Token.java]"]
  node_highlighter["Query highlighter"]
end

node_user(("User"))

node_user -->|"uses"| node_mainview
node_main -->|"starts"| node_controller
node_main -->|"creates"| node_manager
node_main -->|"creates"| node_mainview
node_mainview -->|"dispatches"| node_controller
node_controller -->|"opens"| node_views
node_controller -->|"invokes"| node_commands
node_controller -->|"coordinates"| node_manager
node_mainview -->|"routes"| node_commands
node_commands -.->|"updates records"| node_manager
node_manager -->|"stores"| node_record
node_recordtypes -->|"extend"| node_record
node_controller -->|"invokes"| node_searchcommand
node_searchcommand -->|"reads records"| node_manager
node_searchcommand -->|"parses tokens"| node_parser
node_parser -->|"builds"| node_expressions
node_expressions -->|"evaluates"| node_criteria
node_criteria -->|"reads fields"| node_fields
node_criteria -->|"profiles types"| node_profiles
node_searchcommand -->|"collects matches"| node_results
node_searchcommand -->|"checks logic"| node_diagnostics
node_searchcommand -->|"highlights warning"| node_highlighter
node_searchcommand -->|"renders query"| node_tokens
node_views -->|"presents search"| node_searchcommand

click node_main "https://github.com/cymjackie/pimsystem/blob/master/src/Main.java"
click node_controller "https://github.com/cymjackie/pimsystem/blob/master/src/controller/PIMController.java"
click node_views "https://github.com/cymjackie/pimsystem/tree/master/src/view/command"
click node_mainview "https://github.com/cymjackie/pimsystem/blob/master/src/view/PIMView.java"
click node_commands "https://github.com/cymjackie/pimsystem/tree/master/src/model/command"
click node_manager "https://github.com/cymjackie/pimsystem/blob/master/src/model/PIRManager.java"
click node_record "https://github.com/cymjackie/pimsystem/blob/master/src/model/Record.java"
click node_recordtypes "https://github.com/cymjackie/pimsystem/tree/master/src/model/record"
click node_searchcommand "https://github.com/cymjackie/pimsystem/blob/master/src/model/command/Search.java"
click node_parser "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchParser.java"
click node_expressions "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchExpression.java"
click node_criteria "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/Criterion.java"
click node_fields "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/Field.java"
click node_profiles "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/TypeProfile.java"
click node_results "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchResult.java"
click node_diagnostics "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchValidator.java"
click node_tokens "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/Token.java"
click node_highlighter "https://github.com/cymjackie/pimsystem/blob/master/src/model/search/QueryHighlighter.java"

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_views,node_mainview,node_user toneBlue
class node_main,node_controller,node_commands toneAmber
class node_manager,node_record,node_recordtypes toneMint
class node_searchcommand,node_parser,node_expressions,node_criteria,node_fields,node_profiles,node_results,node_diagnostics,node_tokens,node_highlighter toneRose
```

## Components

### User interface

- [Command views](https://github.com/cymjackie/pimsystem/tree/master/src/view/command): `src/view/command`
- [PIM view](https://github.com/cymjackie/pimsystem/blob/master/src/view/PIMView.java): `src/view/PIMView.java`

### Application control

- [Application entry](https://github.com/cymjackie/pimsystem/blob/master/src/Main.java): `src/Main.java`
- [PIM controller](https://github.com/cymjackie/pimsystem/blob/master/src/controller/PIMController.java): `src/controller/PIMController.java`
- [Record commands](https://github.com/cymjackie/pimsystem/tree/master/src/model/command): `src/model/command`

### Records and storage

- [Record manager](https://github.com/cymjackie/pimsystem/blob/master/src/model/PIRManager.java): `src/model/PIRManager.java`
- [Base record](https://github.com/cymjackie/pimsystem/blob/master/src/model/Record.java): `src/model/Record.java`
- [Record types](https://github.com/cymjackie/pimsystem/tree/master/src/model/record): `src/model/record`

### Search

- [Search command](https://github.com/cymjackie/pimsystem/blob/master/src/model/command/Search.java): `src/model/command/Search.java`
- [Query parser](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchParser.java): `src/model/search/SearchParser.java`
- [Query expressions](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchExpression.java): `src/model/search/SearchExpression.java`
- [Search criteria](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/Criterion.java): `src/model/search/Criterion.java`
- [Search fields](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/Field.java): `src/model/search/Field.java`
- [Type profiles](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/TypeProfile.java): `src/model/search/TypeProfile.java`
- [Search results](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchResult.java): `src/model/search/SearchResult.java`
- [Query diagnostics](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/SearchValidator.java): `src/model/search/SearchValidator.java`
- [Query tokens](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/Token.java): `src/model/search/Token.java`
- [Query highlighter](https://github.com/cymjackie/pimsystem/blob/master/src/model/search/QueryHighlighter.java): `src/model/search/QueryHighlighter.java`

### Other components

- **User**

## Connections

- User → PIM view: uses
- Application entry → PIM controller: starts (evidence: `src/Main.java`)
- Application entry → Record manager: creates (evidence: `src/Main.java`)
- Application entry → PIM view: creates (evidence: `src/Main.java`)
- PIM view → PIM controller: dispatches (evidence: `src/controller/PIMController.java`)
- PIM controller → Command views: opens (evidence: `src/controller/PIMController.java`)
- PIM controller → Record commands: invokes (evidence: `src/controller/PIMController.java`)
- PIM controller → Record manager: coordinates (evidence: `src/controller/PIMController.java`)
- PIM view → Record commands: routes (evidence: `src/view/PIMView.java`)
- Record commands → Record manager: updates records (evidence: `src/model/command/Search.java`)
- Record manager → Base record: stores (evidence: `src/model/PIRManager.java`)
- Record types → Base record: extend (evidence: `src/model/record/Contact.java`)
- PIM controller → Search command: invokes (evidence: `src/controller/PIMController.java`)
- Search command → Record manager: reads records (evidence: `src/model/command/Search.java`)
- Search command → Query parser: parses tokens (evidence: `src/model/command/Search.java`)
- Query parser → Query expressions: builds (evidence: `src/model/search/SearchParser.java`)
- Query expressions → Search criteria: evaluates (evidence: `src/model/search/LeafExpression.java`)
- Search criteria → Search fields: reads fields (evidence: `src/model/search/Criterion.java`)
- Search criteria → Type profiles: profiles types (evidence: `src/model/search/Criterion.java`)
- Search command → Search results: collects matches (evidence: `src/model/command/Search.java`)
- Search command → Query diagnostics: checks logic (evidence: `src/model/command/Search.java`)
- Search command → Query highlighter: highlights warning (evidence: `src/model/command/Search.java`)
- Search command → Query tokens: renders query (evidence: `src/model/command/Search.java`)
- Command views → Search command: presents search (evidence: `src/view/command/SearchView.java`)
