# tevai987/site-cv architecture

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

- Interactive diagram: https://gitdiagram.com/tevai987/site-cv
- Repository: https://github.com/tevai987/site-cv

## Overview

site-cv is a small article-management web app with user registration and login. The principal workflow is a visitor registering or logging in through the React client; authentication requests reach the Express API, which checks or saves users in MongoDB. The API also exposes article create/read/update/delete operations backed by an article model. The client routes users to registration, login, and home views, and keeps user data in Redux. The README gives no further capability detail; home/logs behavior and article authorization wiring are not established by the excerpts.

Main entry points: [`client/src/routes/route.js`](https://github.com/tevai987/site-cv/blob/main/client/src/routes/route.js) (Page routes), [`backend/routes/authRoute.js`](https://github.com/tevai987/site-cv/blob/main/backend/routes/authRoute.js) (Auth routes), [`client/src/components/form/register.js`](https://github.com/tevai987/site-cv/blob/main/client/src/components/form/register.js) (Registration form), [`client/src/components/form/logIn.js`](https://github.com/tevai987/site-cv/blob/main/client/src/components/form/logIn.js) (Login form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["App shell<br/>[App.js]"]
  node_navigation["Page routes<br/>[route.js]"]
  node_register["Registration form<br/>[register.js]"]
  node_login["Login form<br/>[logIn.js]"]
  node_home["Home view<br/>[home.js]"]
  node_logs["Logs view<br/>[logs.js]"]
end

subgraph group_identity["User identity"]
  node_auth_routes["Auth routes<br/>[authRoute.js]"]
  node_auth_controller["Auth operations<br/>[authController.js]"]
  node_auth_middleware["Token checks<br/>[auth.js]"]
  node_user_model[("User records<br/>[userSchema.js]")]
end

subgraph group_articles["Article API"]
  node_article_routes["Article routes<br/>[articlesRoute.js]"]
  node_article_controller["Article CRUD"]
  node_article_model[("Article records<br/>[articleSchema.js]")]
  node_backend_entry["API server<br/>[index.js]"]
end

subgraph group_state["Client state"]
  node_login_slice["Login state<br/>[logInSlices.js]"]
  node_user_slice["User state<br/>[usersSlices.js]"]
  node_root_reducer["Root reducer<br/>[reducer.js]"]
  node_store["Redux store<br/>[store.js]"]
  node_monitor["Reducer monitor<br/>[monitorReducers.js]"]
  node_logger["Action logger<br/>[logger.js]"]
end

node_visitor(("Visitor"))

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_navigation
node_navigation -->|"routes to"| node_register
node_navigation -->|"routes to"| node_login
node_navigation -->|"routes to"| node_home
node_register -->|"posts registration"| node_auth_routes
node_login -->|"posts login"| node_auth_routes
node_register -->|"dispatches"| node_user_slice
node_login -->|"dispatches"| node_login_slice
node_auth_routes -->|"routes requests"| node_auth_controller
node_auth_controller -->|"reads and writes"| node_user_model
node_backend_entry -->|"mounts"| node_auth_routes
node_backend_entry -->|"mounts"| node_article_routes
node_article_routes -->|"routes requests"| node_article_controller
node_article_controller -->|"reads and writes"| node_article_model
node_auth_middleware -->|"checks admin"| node_user_model
node_user_slice -->|"registered in"| node_root_reducer
node_root_reducer -->|"configures"| node_store
node_store -->|"adds enhancer"| node_monitor
node_store -->|"adds middleware"| node_logger

click node_app "https://github.com/tevai987/site-cv/blob/main/client/src/App.js"
click node_navigation "https://github.com/tevai987/site-cv/blob/main/client/src/routes/route.js"
click node_register "https://github.com/tevai987/site-cv/blob/main/client/src/components/form/register.js"
click node_login "https://github.com/tevai987/site-cv/blob/main/client/src/components/form/logIn.js"
click node_home "https://github.com/tevai987/site-cv/blob/main/client/src/components/home/home.js"
click node_logs "https://github.com/tevai987/site-cv/blob/main/client/src/Page/logs/logs.js"
click node_auth_routes "https://github.com/tevai987/site-cv/blob/main/backend/routes/authRoute.js"
click node_auth_controller "https://github.com/tevai987/site-cv/blob/main/backend/controllers/authController.js"
click node_auth_middleware "https://github.com/tevai987/site-cv/blob/main/backend/middleware/auth.js"
click node_user_model "https://github.com/tevai987/site-cv/blob/main/backend/models/userSchema.js"
click node_article_routes "https://github.com/tevai987/site-cv/blob/main/backend/routes/articlesRoute.js"
click node_article_controller "https://github.com/tevai987/site-cv/blob/main/backend/controllers/articlesController.js"
click node_article_model "https://github.com/tevai987/site-cv/blob/main/backend/models/articleSchema.js"
click node_backend_entry "https://github.com/tevai987/site-cv/blob/main/backend/index.js"
click node_login_slice "https://github.com/tevai987/site-cv/blob/main/client/src/store/slices/users/logInSlices.js"
click node_user_slice "https://github.com/tevai987/site-cv/blob/main/client/src/store/slices/users/usersSlices.js"
click node_root_reducer "https://github.com/tevai987/site-cv/blob/main/client/src/store/reducer.js"
click node_store "https://github.com/tevai987/site-cv/blob/main/client/src/store/store.js"
click node_monitor "https://github.com/tevai987/site-cv/blob/main/client/src/store/config/enhancers/monitorReducers.js"
click node_logger "https://github.com/tevai987/site-cv/blob/main/client/src/store/config/middleWare/logger.js"

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_navigation,node_register,node_login,node_home,node_logs toneBlue
class node_auth_routes,node_auth_controller,node_auth_middleware,node_user_model toneAmber
class node_article_routes,node_article_controller,node_article_model,node_backend_entry toneMint
class node_login_slice,node_user_slice,node_root_reducer,node_store,node_monitor,node_logger toneRose
class node_visitor toneIndigo
```

## Components

### React client

- [App shell](https://github.com/tevai987/site-cv/blob/main/client/src/App.js): `client/src/App.js`
- [Page routes](https://github.com/tevai987/site-cv/blob/main/client/src/routes/route.js): `client/src/routes/route.js`
- [Registration form](https://github.com/tevai987/site-cv/blob/main/client/src/components/form/register.js): `client/src/components/form/register.js`
- [Login form](https://github.com/tevai987/site-cv/blob/main/client/src/components/form/logIn.js): `client/src/components/form/logIn.js`
- [Home view](https://github.com/tevai987/site-cv/blob/main/client/src/components/home/home.js): `client/src/components/home/home.js`
- [Logs view](https://github.com/tevai987/site-cv/blob/main/client/src/Page/logs/logs.js): `client/src/Page/logs/logs.js`

### User identity

- [Auth routes](https://github.com/tevai987/site-cv/blob/main/backend/routes/authRoute.js): `backend/routes/authRoute.js`
- [Auth operations](https://github.com/tevai987/site-cv/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Token checks](https://github.com/tevai987/site-cv/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [User records](https://github.com/tevai987/site-cv/blob/main/backend/models/userSchema.js): `backend/models/userSchema.js`

### Article API

- [Article routes](https://github.com/tevai987/site-cv/blob/main/backend/routes/articlesRoute.js): `backend/routes/articlesRoute.js`
- [Article CRUD](https://github.com/tevai987/site-cv/blob/main/backend/controllers/articlesController.js): `backend/controllers/articlesController.js`
- [Article records](https://github.com/tevai987/site-cv/blob/main/backend/models/articleSchema.js): `backend/models/articleSchema.js`
- [API server](https://github.com/tevai987/site-cv/blob/main/backend/index.js): `backend/index.js`

### Client state

- [Login state](https://github.com/tevai987/site-cv/blob/main/client/src/store/slices/users/logInSlices.js): `client/src/store/slices/users/logInSlices.js`
- [User state](https://github.com/tevai987/site-cv/blob/main/client/src/store/slices/users/usersSlices.js): `client/src/store/slices/users/usersSlices.js`
- [Root reducer](https://github.com/tevai987/site-cv/blob/main/client/src/store/reducer.js): `client/src/store/reducer.js`
- [Redux store](https://github.com/tevai987/site-cv/blob/main/client/src/store/store.js): `client/src/store/store.js`
- [Reducer monitor](https://github.com/tevai987/site-cv/blob/main/client/src/store/config/enhancers/monitorReducers.js): `client/src/store/config/enhancers/monitorReducers.js`
- [Action logger](https://github.com/tevai987/site-cv/blob/main/client/src/store/config/middleWare/logger.js): `client/src/store/config/middleWare/logger.js`

### Other components

- **Visitor**

## Connections

- Visitor → App shell: opens (evidence: `client/src/App.js`)
- App shell → Page routes: renders (evidence: `client/src/App.js`)
- Page routes → Registration form: routes to (evidence: `client/src/routes/route.js`)
- Page routes → Login form: routes to (evidence: `client/src/routes/route.js`)
- Page routes → Home view: routes to (evidence: `client/src/routes/route.js`)
- Registration form → Auth routes: posts registration (evidence: `client/src/components/form/register.js`)
- Login form → Auth routes: posts login (evidence: `client/src/components/form/logIn.js`)
- Registration form → User state: dispatches (evidence: `client/src/components/form/register.js`)
- Login form → Login state: dispatches (evidence: `client/src/components/form/logIn.js`)
- Auth routes → Auth operations: routes requests (evidence: `backend/routes/authRoute.js`)
- Auth operations → User records: reads and writes (evidence: `backend/controllers/authController.js`)
- API server → Auth routes: mounts (evidence: `backend/index.js`)
- API server → Article routes: mounts (evidence: `backend/index.js`)
- Article routes → Article CRUD: routes requests (evidence: `backend/routes/articlesRoute.js`)
- Article CRUD → Article records: reads and writes (evidence: `backend/controllers/articlesController.js`)
- Token checks → User records: checks admin (evidence: `backend/middleware/auth.js`)
- User state → Root reducer: registered in (evidence: `client/src/store/reducer.js`)
- Root reducer → Redux store: configures (evidence: `client/src/store/store.js`)
- Redux store → Reducer monitor: adds enhancer (evidence: `client/src/store/store.js`)
- Redux store → Action logger: adds middleware (evidence: `client/src/store/store.js`)
