# bariskisir/notes architecture

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

- Interactive diagram: https://gitdiagram.com/bariskisir/notes
- Repository: https://github.com/bariskisir/notes

## Overview

Notes is a React single-page client backed by an ASP.NET Core API, with application services and a repository-based persistence layer. The main workflow is authenticated users creating, viewing, searching, updating, and deleting their notes; a separate account workflow supports registration, login, token refresh, and account deletion. The README also documents pagination and JWT/refresh-token security. Some UI, registration, and runtime wiring is inferred from the tree and README; only the supplied excerpts were inspected, so uncertain implementation links are omitted.

Main entry points: [`src/Notes.Application/Services/UserService.cs`](https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Services/UserService.cs) (User service), [`src/Notes.Infrastructure/Data/ApplicationDbContext.cs`](https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Data/ApplicationDbContext.cs) (EF context), [`src/Notes.FE/src/App.jsx`](https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/App.jsx) (App), [`src/Notes.FE/src/api.js`](https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/api.js) (API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["App<br/>[App.jsx]"]
  node_authui["Auth UI<br/>[AuthPage.jsx]"]
  node_notesui["Notes UI<br/>[NotesPage.jsx]"]
  node_apiclient["API client<br/>[api.js]"]
end

subgraph group_api["API layer"]
  node_authcontroller["Auth controller<br/>[AuthController.cs]"]
  node_notescontroller["Notes controller<br/>[NotesController.cs]"]
  node_host["API host<br/>[Program.cs]"]
end

subgraph group_application["Application logic"]
  node_userservice["User service<br/>[UserService.cs]"]
  node_notesservice["Note service<br/>[NoteService.cs]"]
  node_password["Password service<br/>[IUserService.cs]"]
  node_userrepoport["User repository port<br/>[IUserRepository.cs]"]
  node_noterepoport["Note repository port<br/>[INoteRepository.cs]"]
  node_tokenrepoport["Token repository port"]
  node_uowport["Unit of work port<br/>[IUnitOfWork.cs]"]
end

subgraph group_persistence["Persistence"]
  node_userrepo["User repository<br/>[UserRepository.cs]"]
  node_noterepo["Note repository<br/>[NoteRepository.cs]"]
  node_tokenrepo["Token repository"]
  node_uow["Unit of work<br/>[UnitOfWork.cs]"]
  node_dbcontext["EF context"]
end

node_user(("User"))
node_database[("SQLite database")]

node_user -->|"uses"| node_app
node_app -->|"checks session"| node_apiclient
node_app -->|"shows unauthenticated"| node_authui
node_app -->|"shows authenticated"| node_notesui
node_authui -->|"sends auth requests"| node_apiclient
node_notesui -->|"requests notes"| node_apiclient
node_apiclient -->|"HTTP requests"| node_host
node_host -->|"routes auth"| node_authcontroller
node_host -->|"routes notes"| node_notescontroller
node_authcontroller -->|"calls"| node_userservice
node_notescontroller -->|"calls"| node_notesservice
node_userservice -->|"reads and changes users"| node_userrepoport
node_userservice -->|"reads and changes tokens"| node_tokenrepoport
node_userservice -->|"commits changes"| node_uowport
node_userservice -->|"hashes and verifies"| node_password
node_notesservice -->|"queries and changes notes"| node_noterepoport
node_notesservice -->|"commits changes"| node_uowport
node_userrepo -->|"queries and updates"| node_dbcontext
node_noterepo -->|"queries and updates"| node_dbcontext
node_tokenrepo -->|"queries and updates"| node_dbcontext
node_uow -->|"saves changes"| node_dbcontext
node_dbcontext -->|"reads and writes"| node_database

click node_app "https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/App.jsx"
click node_authui "https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/components/AuthPage.jsx"
click node_notesui "https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/components/NotesPage.jsx"
click node_apiclient "https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/api.js"
click node_authcontroller "https://github.com/bariskisir/notes/blob/master/src/Notes.API/Controllers/AuthController.cs"
click node_notescontroller "https://github.com/bariskisir/notes/blob/master/src/Notes.API/Controllers/NotesController.cs"
click node_host "https://github.com/bariskisir/notes/blob/master/src/Notes.API/Program.cs"
click node_userservice "https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Services/UserService.cs"
click node_notesservice "https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Services/NoteService.cs"
click node_password "https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Interfaces/IUserService.cs"
click node_userrepoport "https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/IUserRepository.cs"
click node_noterepoport "https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/INoteRepository.cs"
click node_tokenrepoport "https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/IRefreshTokenRepository.cs"
click node_uowport "https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/IUnitOfWork.cs"
click node_userrepo "https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/UserRepository.cs"
click node_noterepo "https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/NoteRepository.cs"
click node_tokenrepo "https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/RefreshTokenRepository.cs"
click node_uow "https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/UnitOfWork.cs"
click node_dbcontext "https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Data/ApplicationDbContext.cs"

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_app,node_authui,node_notesui,node_apiclient,node_user toneBlue
class node_authcontroller,node_notescontroller,node_host,node_database toneAmber
class node_userservice,node_notesservice,node_password,node_userrepoport,node_noterepoport,node_tokenrepoport,node_uowport toneMint
class node_userrepo,node_noterepo,node_tokenrepo,node_uow,node_dbcontext toneRose
```

## Components

### React client

- [App](https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/App.jsx): `src/Notes.FE/src/App.jsx`
- [Auth UI](https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/components/AuthPage.jsx): `src/Notes.FE/src/components/AuthPage.jsx`
- [Notes UI](https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/components/NotesPage.jsx): `src/Notes.FE/src/components/NotesPage.jsx`
- [API client](https://github.com/bariskisir/notes/blob/master/src/Notes.FE/src/api.js): `src/Notes.FE/src/api.js`

### API layer

- [Auth controller](https://github.com/bariskisir/notes/blob/master/src/Notes.API/Controllers/AuthController.cs): `src/Notes.API/Controllers/AuthController.cs`
- [Notes controller](https://github.com/bariskisir/notes/blob/master/src/Notes.API/Controllers/NotesController.cs): `src/Notes.API/Controllers/NotesController.cs`
- [API host](https://github.com/bariskisir/notes/blob/master/src/Notes.API/Program.cs): `src/Notes.API/Program.cs`

### Application logic

- [User service](https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Services/UserService.cs): `src/Notes.Application/Services/UserService.cs`
- [Note service](https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Services/NoteService.cs): `src/Notes.Application/Services/NoteService.cs`
- [Password service](https://github.com/bariskisir/notes/blob/master/src/Notes.Application/Interfaces/IUserService.cs): `src/Notes.Application/Interfaces/IUserService.cs`
- [User repository port](https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/IUserRepository.cs): `src/Notes.Domain/Interfaces/IUserRepository.cs`
- [Note repository port](https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/INoteRepository.cs): `src/Notes.Domain/Interfaces/INoteRepository.cs`
- [Token repository port](https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/IRefreshTokenRepository.cs): `src/Notes.Domain/Interfaces/IRefreshTokenRepository.cs`
- [Unit of work port](https://github.com/bariskisir/notes/blob/master/src/Notes.Domain/Interfaces/IUnitOfWork.cs): `src/Notes.Domain/Interfaces/IUnitOfWork.cs`

### Persistence

- [User repository](https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/UserRepository.cs): `src/Notes.Infrastructure/Repositories/UserRepository.cs`
- [Note repository](https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/NoteRepository.cs): `src/Notes.Infrastructure/Repositories/NoteRepository.cs`
- [Token repository](https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/RefreshTokenRepository.cs): `src/Notes.Infrastructure/Repositories/RefreshTokenRepository.cs`
- [Unit of work](https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Repositories/UnitOfWork.cs): `src/Notes.Infrastructure/Repositories/UnitOfWork.cs`
- [EF context](https://github.com/bariskisir/notes/blob/master/src/Notes.Infrastructure/Data/ApplicationDbContext.cs): `src/Notes.Infrastructure/Data/ApplicationDbContext.cs`

### Other components

- **User**
- **SQLite database**

## Connections

- User → App: uses
- App → API client: checks session
- App → Auth UI: shows unauthenticated
- App → Notes UI: shows authenticated
- Auth UI → API client: sends auth requests
- Notes UI → API client: requests notes
- API client → API host: HTTP requests
- API host → Auth controller: routes auth
- API host → Notes controller: routes notes
- Auth controller → User service: calls
- Notes controller → Note service: calls
- User service → User repository port: reads and changes users
- User service → Token repository port: reads and changes tokens
- User service → Unit of work port: commits changes
- User service → Password service: hashes and verifies
- Note service → Note repository port: queries and changes notes
- Note service → Unit of work port: commits changes
- User repository → EF context: queries and updates
- Note repository → EF context: queries and updates
- Token repository → EF context: queries and updates
- Unit of work → EF context: saves changes
- EF context → SQLite database: reads and writes
