How yzuagile/2025-team-b works
Project type and purpose
• Purpose: manage notes (create, find, get, update) via controllers (RecentlyEditedController, ShowTitle) backed by a file-system utility.
Top-level components
a. Renderer (React UI) – src/renderer
b. Preload script (IPC bridge) – src/preload/preload.ts
c. Main process (Node backend) – src/main/index.ts
d. Business logic (“backend”) – src/backend
• Controllers (controller/…)
• Models (model/…)
• Interfaces (interfaces/Note.d.ts)
• Utilities (utils/FileManager.ts)
e. Data store – local file system via FileManager
f. Test harness – __test__, Jest config
Key interactions & dataflow
1. User interacts with the UI (React components in App.tsx).
2. UI invokes exposed APIs on window (set up in preload.ts).
3. Preload forwards calls over IPC to the Main process.
4. Main process receives IPC, delegates to controller in src/backend/controller.
5. Controller uses model functions in src/backend/model (create/find/get/update).
6. Model calls into FileManager to read/write JSON or other files.
7. Responses bubble back through controller → main → preload → renderer, updating the UI.
Architectural patterns & principles
• Electron’s multi-process architecture: Renderer vs. Main
• MVC-style separation in the backend: Controllers → Models → Data Utils
• IPC boundary clearly enforced by the preload script
• File-based persistence via a utility layer (FileManager) instead of a separate DB
Technologies & frameworks
• Electron (main, preload, renderer)
• React + Vite (vite.config.ts) in the renderer
• TypeScript throughout
• Jest for unit tests, 100% coverage enforced
• Node.js file‐system APIs in FileManager