# ppp16bit/via.me architecture

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

- Interactive diagram: https://gitdiagram.com/ppp16bit/via.me
- Repository: https://github.com/ppp16bit/via.me

## Overview

This is a task-management application with account registration and login, task tracking, notifications, and a Clara chat interface. The user-facing flow runs from the React app through page-level services to the Elysia backend, where routes, controllers, and domain services handle requests. Task operations can create notifications, while authentication uses JWTs checked against Redis and application data is accessed through Prisma. The README is empty; backend and frontend HTTP wiring is only partly evidenced, so that boundary is marked unverified.

Main entry points: [`src/backend/middleware/auth.ts`](https://github.com/ppp16bit/via.me/blob/master/src/backend/middleware/auth.ts) (Auth middleware), [`src/frontend/src/App.jsx`](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/App.jsx) (React app routes), [`src/backend/main.ts`](https://github.com/ppp16bit/via.me/blob/master/src/backend/main.ts) (HTTP server), [`src/frontend/src/pages/HomePage.jsx`](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/HomePage.jsx) (Task home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["React app routes<br/>[App.jsx]"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
  node_login["Login page<br/>[Login.jsx]"]
  node_signup["Registration page<br/>[Cadastro.jsx]"]
  node_home["Task home<br/>[HomePage.jsx]"]
  node_taskui["Task cards<br/>[CardTarefas.jsx]"]
  node_chatui["Clara chat<br/>[ChatClara.jsx]"]
  node_header["Header and alerts<br/>[Header.jsx]"]
  node_menu["Side menu<br/>[MenuLateral.jsx]"]
  node_authweb["Auth client<br/>[authService.js]"]
  node_taskweb["Task client<br/>[taskService.js]"]
end

subgraph group_api["Backend API"]
  node_api["HTTP server<br/>[main.ts]"]
  node_authroutes["Auth routes<br/>[authRoutes.ts]"]
  node_taskroutes["Task routes<br/>[taskRoutes.ts]"]
  node_chatroutes["Chat routes<br/>[chatRoutes.ts]"]
  node_notroutes["Notification routes"]
  node_userroutes["User routes<br/>[userRoutes.ts]"]
  node_auth["Auth controller<br/>[authController.ts]"]
  node_tasks["Task controller<br/>[taskController.ts]"]
  node_chat["Chat controller<br/>[chatController.ts]"]
  node_notifications["Notification controller"]
  node_users["User controller<br/>[userController.ts]"]
end

subgraph group_domain["Domain services"]
  node_authsvc["Authentication<br/>[authService.ts]"]
  node_tasksvc["Task management<br/>[taskService.ts]"]
  node_chatsvc["Chat service<br/>[chatService.ts]"]
  node_notsvc["Notification service"]
  node_usersvc["User service<br/>[userService.ts]"]
  node_authmw["Auth middleware<br/>[auth.ts]"]
  node_jwt["JWT utilities<br/>[jwt.ts]"]
end

subgraph group_state["Persistence and auth state"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_redis["Redis client<br/>[redis.ts]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_signup
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_chatui
node_login -->|"calls"| node_authweb
node_signup -.->|"uses"| node_authweb
node_home -->|"renders"| node_taskui
node_home -->|"renders"| node_header
node_home -->|"renders"| node_menu
node_taskui -->|"calls"| node_taskweb
node_chatui -->|"renders"| node_header
node_chatui -->|"renders"| node_menu
node_chatui -.->|"requests"| node_chatroutes
node_header -->|"displays"| node_notifications
node_authweb -.->|"requests"| node_authroutes
node_taskweb -.->|"requests"| node_taskroutes
node_api -->|"registers"| node_authroutes
node_api -->|"registers"| node_taskroutes
node_api -->|"registers"| node_userroutes
node_api -->|"registers"| node_chatroutes
node_api -->|"registers"| node_notroutes
node_authroutes -->|"dispatches"| node_auth
node_taskroutes -->|"dispatches"| node_tasks
node_chatroutes -->|"dispatches"| node_chat
node_notroutes -->|"dispatches"| node_notifications
node_userroutes -->|"dispatches"| node_users
node_auth -->|"calls"| node_authsvc
node_tasks -->|"calls"| node_tasksvc
node_chat -->|"calls"| node_chatsvc
node_notifications -->|"calls"| node_notsvc
node_users -->|"calls"| node_usersvc
node_authroutes -->|"uses"| node_authmw
node_taskroutes -->|"uses"| node_authmw
node_chatroutes -->|"uses"| node_authmw
node_notroutes -->|"uses"| node_authmw
node_userroutes -->|"uses"| node_authmw
node_authsvc -->|"reads/writes"| node_prisma
node_authsvc -->|"generates"| node_jwt
node_authsvc -->|"stores tokens"| node_redis
node_authmw -->|"checks tokens"| node_redis
node_authmw -->|"verifies"| node_jwt
node_tasksvc -->|"reads/writes"| node_prisma
node_tasksvc -->|"creates alerts"| node_notsvc
node_chatsvc -->|"reads/writes"| node_prisma
node_chatsvc -->|"uses"| node_tasksvc
node_notsvc -->|"reads/writes"| node_prisma

click node_app "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/App.jsx"
click node_landing "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/LandingPage.jsx"
click node_login "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/Login.jsx"
click node_signup "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/Cadastro.jsx"
click node_home "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/HomePage.jsx"
click node_taskui "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/components/molecules/CardTarefas.jsx"
click node_chatui "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/ChatClara.jsx"
click node_header "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/components/molecules/Header.jsx"
click node_menu "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/components/molecules/MenuLateral.jsx"
click node_authweb "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/services/authService.js"
click node_taskweb "https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/services/taskService.js"
click node_api "https://github.com/ppp16bit/via.me/blob/master/src/backend/main.ts"
click node_authroutes "https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/authRoutes.ts"
click node_taskroutes "https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/taskRoutes.ts"
click node_chatroutes "https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/chatRoutes.ts"
click node_notroutes "https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/notificationRoutes.ts"
click node_userroutes "https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/userRoutes.ts"
click node_auth "https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/authController.ts"
click node_tasks "https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/taskController.ts"
click node_chat "https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/chatController.ts"
click node_notifications "https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/notificationController.ts"
click node_users "https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/userController.ts"
click node_authsvc "https://github.com/ppp16bit/via.me/blob/master/src/backend/services/authService.ts"
click node_tasksvc "https://github.com/ppp16bit/via.me/blob/master/src/backend/services/taskService.ts"
click node_chatsvc "https://github.com/ppp16bit/via.me/blob/master/src/backend/services/chatService.ts"
click node_notsvc "https://github.com/ppp16bit/via.me/blob/master/src/backend/services/notificationService.ts"
click node_usersvc "https://github.com/ppp16bit/via.me/blob/master/src/backend/services/userService.ts"
click node_authmw "https://github.com/ppp16bit/via.me/blob/master/src/backend/middleware/auth.ts"
click node_jwt "https://github.com/ppp16bit/via.me/blob/master/src/backend/utils/jwt.ts"
click node_prisma "https://github.com/ppp16bit/via.me/blob/master/src/backend/lib/prisma.ts"
click node_redis "https://github.com/ppp16bit/via.me/blob/master/src/backend/lib/redis.ts"

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_landing,node_login,node_signup,node_home,node_taskui,node_chatui,node_header,node_menu,node_authweb,node_taskweb,node_user toneBlue
class node_api,node_authroutes,node_taskroutes,node_chatroutes,node_notroutes,node_userroutes,node_auth,node_tasks,node_chat,node_notifications,node_users toneAmber
class node_authsvc,node_tasksvc,node_chatsvc,node_notsvc,node_usersvc,node_authmw,node_jwt toneMint
class node_prisma,node_redis toneRose
```

## Components

### Web application

- [React app routes](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/App.jsx): `src/frontend/src/App.jsx`
- [Landing page](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/LandingPage.jsx): `src/frontend/src/pages/LandingPage.jsx`
- [Login page](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/Login.jsx): `src/frontend/src/pages/Login.jsx`
- [Registration page](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/Cadastro.jsx): `src/frontend/src/pages/Cadastro.jsx`
- [Task home](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/HomePage.jsx): `src/frontend/src/pages/HomePage.jsx`
- [Task cards](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/components/molecules/CardTarefas.jsx): `src/frontend/src/components/molecules/CardTarefas.jsx`
- [Clara chat](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/pages/ChatClara.jsx): `src/frontend/src/pages/ChatClara.jsx`
- [Header and alerts](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/components/molecules/Header.jsx): `src/frontend/src/components/molecules/Header.jsx`
- [Side menu](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/components/molecules/MenuLateral.jsx): `src/frontend/src/components/molecules/MenuLateral.jsx`
- [Auth client](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/services/authService.js): `src/frontend/src/services/authService.js`
- [Task client](https://github.com/ppp16bit/via.me/blob/master/src/frontend/src/services/taskService.js): `src/frontend/src/services/taskService.js`

### Backend API

- [HTTP server](https://github.com/ppp16bit/via.me/blob/master/src/backend/main.ts): `src/backend/main.ts`
- [Auth routes](https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/authRoutes.ts): `src/backend/routes/authRoutes.ts`
- [Task routes](https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/taskRoutes.ts): `src/backend/routes/taskRoutes.ts`
- [Chat routes](https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/chatRoutes.ts): `src/backend/routes/chatRoutes.ts`
- [Notification routes](https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/notificationRoutes.ts): `src/backend/routes/notificationRoutes.ts`
- [User routes](https://github.com/ppp16bit/via.me/blob/master/src/backend/routes/userRoutes.ts): `src/backend/routes/userRoutes.ts`
- [Auth controller](https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/authController.ts): `src/backend/controllers/authController.ts`
- [Task controller](https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/taskController.ts): `src/backend/controllers/taskController.ts`
- [Chat controller](https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/chatController.ts): `src/backend/controllers/chatController.ts`
- [Notification controller](https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/notificationController.ts): `src/backend/controllers/notificationController.ts`
- [User controller](https://github.com/ppp16bit/via.me/blob/master/src/backend/controllers/userController.ts): `src/backend/controllers/userController.ts`

### Domain services

- [Authentication](https://github.com/ppp16bit/via.me/blob/master/src/backend/services/authService.ts): `src/backend/services/authService.ts`
- [Task management](https://github.com/ppp16bit/via.me/blob/master/src/backend/services/taskService.ts): `src/backend/services/taskService.ts`
- [Chat service](https://github.com/ppp16bit/via.me/blob/master/src/backend/services/chatService.ts): `src/backend/services/chatService.ts`
- [Notification service](https://github.com/ppp16bit/via.me/blob/master/src/backend/services/notificationService.ts): `src/backend/services/notificationService.ts`
- [User service](https://github.com/ppp16bit/via.me/blob/master/src/backend/services/userService.ts): `src/backend/services/userService.ts`
- [Auth middleware](https://github.com/ppp16bit/via.me/blob/master/src/backend/middleware/auth.ts): `src/backend/middleware/auth.ts`
- [JWT utilities](https://github.com/ppp16bit/via.me/blob/master/src/backend/utils/jwt.ts): `src/backend/utils/jwt.ts`

### Persistence and auth state

- [Prisma client](https://github.com/ppp16bit/via.me/blob/master/src/backend/lib/prisma.ts): `src/backend/lib/prisma.ts`
- [Redis client](https://github.com/ppp16bit/via.me/blob/master/src/backend/lib/redis.ts): `src/backend/lib/redis.ts`

### Other components

- **User**

## Connections

- User → React app routes: uses (evidence: `src/frontend/src/App.jsx`)
- React app routes → Landing page: routes to (evidence: `src/frontend/src/App.jsx`)
- React app routes → Login page: routes to (evidence: `src/frontend/src/App.jsx`)
- React app routes → Registration page: routes to (evidence: `src/frontend/src/App.jsx`)
- React app routes → Task home: routes to (evidence: `src/frontend/src/App.jsx`)
- React app routes → Clara chat: routes to (evidence: `src/frontend/src/App.jsx`)
- Login page → Auth client: calls (evidence: `src/frontend/src/pages/Login.jsx`)
- Registration page → Auth client: uses
- Task home → Task cards: renders (evidence: `src/frontend/src/pages/HomePage.jsx`)
- Task home → Header and alerts: renders (evidence: `src/frontend/src/pages/HomePage.jsx`)
- Task home → Side menu: renders (evidence: `src/frontend/src/pages/HomePage.jsx`)
- Task cards → Task client: calls (evidence: `src/frontend/src/components/molecules/CardTarefas.jsx`)
- Clara chat → Header and alerts: renders (evidence: `src/frontend/src/pages/ChatClara.jsx`)
- Clara chat → Side menu: renders (evidence: `src/frontend/src/pages/ChatClara.jsx`)
- Clara chat → Chat routes: requests
- Header and alerts → Notification controller: displays (evidence: `src/frontend/src/components/molecules/Header.jsx`)
- Auth client → Auth routes: requests
- Task client → Task routes: requests
- HTTP server → Auth routes: registers (evidence: `src/backend/main.ts`)
- HTTP server → Task routes: registers (evidence: `src/backend/main.ts`)
- HTTP server → User routes: registers (evidence: `src/backend/main.ts`)
- HTTP server → Chat routes: registers (evidence: `src/backend/main.ts`)
- HTTP server → Notification routes: registers (evidence: `src/backend/main.ts`)
- Auth routes → Auth controller: dispatches (evidence: `src/backend/routes/authRoutes.ts`)
- Task routes → Task controller: dispatches (evidence: `src/backend/routes/taskRoutes.ts`)
- Chat routes → Chat controller: dispatches (evidence: `src/backend/routes/chatRoutes.ts`)
- Notification routes → Notification controller: dispatches (evidence: `src/backend/routes/notificationRoutes.ts`)
- User routes → User controller: dispatches (evidence: `src/backend/routes/userRoutes.ts`)
- Auth controller → Authentication: calls (evidence: `src/backend/controllers/authController.ts`)
- Task controller → Task management: calls (evidence: `src/backend/controllers/taskController.ts`)
- Chat controller → Chat service: calls (evidence: `src/backend/controllers/chatController.ts`)
- Notification controller → Notification service: calls (evidence: `src/backend/controllers/notificationController.ts`)
- User controller → User service: calls (evidence: `src/backend/controllers/userController.ts`)
- Auth routes → Auth middleware: uses (evidence: `src/backend/routes/authRoutes.ts`)
- Task routes → Auth middleware: uses (evidence: `src/backend/routes/taskRoutes.ts`)
- Chat routes → Auth middleware: uses (evidence: `src/backend/routes/chatRoutes.ts`)
- Notification routes → Auth middleware: uses (evidence: `src/backend/routes/notificationRoutes.ts`)
- User routes → Auth middleware: uses (evidence: `src/backend/routes/userRoutes.ts`)
- Authentication → Prisma client: reads/writes (evidence: `src/backend/services/authService.ts`)
- Authentication → JWT utilities: generates (evidence: `src/backend/services/authService.ts`)
- Authentication → Redis client: stores tokens (evidence: `src/backend/services/authService.ts`)
- Auth middleware → Redis client: checks tokens (evidence: `src/backend/middleware/auth.ts`)
- Auth middleware → JWT utilities: verifies (evidence: `src/backend/middleware/auth.ts`)
- Task management → Prisma client: reads/writes (evidence: `src/backend/services/taskService.ts`)
- Task management → Notification service: creates alerts (evidence: `src/backend/services/taskService.ts`)
- Chat service → Prisma client: reads/writes (evidence: `src/backend/services/chatService.ts`)
- Chat service → Task management: uses (evidence: `src/backend/services/chatService.ts`)
- Notification service → Prisma client: reads/writes (evidence: `src/backend/services/notificationService.ts`)
