# kemalq/the-notes-app architecture

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

- Interactive diagram: https://gitdiagram.com/kemalq/the-notes-app
- Repository: https://github.com/kemalq/the-notes-app
- Video tour (about a minute): https://gitdiagram.com/kemalq/the-notes-app/video

## Overview

Notes App is a Spring Boot REST API for creating, listing, reading, updating, deleting, and computing statistics for notes stored in MongoDB. The documented user flow is an HTTP request to the notes API and, for creation, a response containing the new note’s ID and metadata. The tree identifies controller, service, DAO, mapping, and model layers, but source excerpts were unavailable, so their call relationships are not asserted.

Main entry points: [`src/main/java/com/example/notesApp/controller/NotesController.java`](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/controller/NotesController.java) (Notes controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["REST API"]
  node_controller["Notes controller"]
  node_api_dtos["Request and response DTOs"]
  node_error_handling["Error handling"]
  node_application["Spring Boot application"]
end

subgraph group_domain["Notes Domain"]
  node_note_service["Note service<br/>[NoteService.java]"]
  node_note_service_impl["Note service implementation"]
  node_statistics["Note statistics"]
  node_mapper["Note mapper<br/>[NoteMapper.java]"]
  node_note_model["Note model<br/>[Note.java]"]
  node_tags["Note tags<br/>[Tags.java]"]
end

subgraph group_persistence["Persistence"]
  node_dao["Notes DAO<br/>[NotesDAO.java]"]
  node_mongodb[("MongoDB")]
  node_auditing["Mongo auditing config"]
end

node_client(("API client"))

node_client -->|"sends API requests"| node_controller

click node_controller "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/controller/NotesController.java"
click node_api_dtos "https://github.com/kemalq/the-notes-app/tree/master/src/main/java/com/example/notesApp/dto"
click node_error_handling "https://github.com/kemalq/the-notes-app/tree/master/src/main/java/com/example/notesApp/exceptions"
click node_note_service "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/service/NoteService.java"
click node_note_service_impl "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/service/impl/NoteServiceImpl.java"
click node_statistics "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/service/impl/NoteStatisticService.java"
click node_mapper "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/mapper/NoteMapper.java"
click node_note_model "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/model/Note.java"
click node_tags "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/enums/Tags.java"
click node_dao "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/dao/NotesDAO.java"
click node_auditing "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/configuration/MongoAuditingConfig.java"
click node_application "https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/NotesAppApplication.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_controller,node_api_dtos,node_error_handling,node_application,node_client toneBlue
class node_note_service,node_note_service_impl,node_statistics,node_mapper,node_note_model,node_tags toneAmber
class node_dao,node_mongodb,node_auditing toneMint
```

## Components

### REST API

- [Notes controller](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/controller/NotesController.java): `src/main/java/com/example/notesApp/controller/NotesController.java`
- [Request and response DTOs](https://github.com/kemalq/the-notes-app/tree/master/src/main/java/com/example/notesApp/dto): `src/main/java/com/example/notesApp/dto`
- [Error handling](https://github.com/kemalq/the-notes-app/tree/master/src/main/java/com/example/notesApp/exceptions): `src/main/java/com/example/notesApp/exceptions`
- [Spring Boot application](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/NotesAppApplication.java): `src/main/java/com/example/notesApp/NotesAppApplication.java`

### Notes Domain

- [Note service](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/service/NoteService.java): `src/main/java/com/example/notesApp/service/NoteService.java`
- [Note service implementation](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/service/impl/NoteServiceImpl.java): `src/main/java/com/example/notesApp/service/impl/NoteServiceImpl.java`
- [Note statistics](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/service/impl/NoteStatisticService.java): `src/main/java/com/example/notesApp/service/impl/NoteStatisticService.java`
- [Note mapper](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/mapper/NoteMapper.java): `src/main/java/com/example/notesApp/mapper/NoteMapper.java`
- [Note model](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/model/Note.java): `src/main/java/com/example/notesApp/model/Note.java`
- [Note tags](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/enums/Tags.java): `src/main/java/com/example/notesApp/enums/Tags.java`

### Persistence

- [Notes DAO](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/dao/NotesDAO.java): `src/main/java/com/example/notesApp/dao/NotesDAO.java`
- **MongoDB**
- [Mongo auditing config](https://github.com/kemalq/the-notes-app/blob/master/src/main/java/com/example/notesApp/configuration/MongoAuditingConfig.java): `src/main/java/com/example/notesApp/configuration/MongoAuditingConfig.java`

### Other components

- **API client**

## Connections

- API client → Notes controller: sends API requests
