# 2026-2-ncc2/projeto1 architecture

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

- Interactive diagram: https://gitdiagram.com/2026-2-ncc2/projeto1
- Repository: https://github.com/2026-2-ncc2/projeto1

## Overview

TrocaTicket is presented as an event-ticketing and management platform. In the visible runtime, users enter through routed React pages; account registration calls a frontend API helper, while organizers can configure an event through a four-step, explicitly demo-only wizard. Admin pages cover dashboard and registration approval. The README also describes ticket discovery, purchasing, digital tickets, sales/order monitoring, and event-day access, but their implementations or connections are not established by the sampled files. The tree contains duplicate frontend snapshots; this map uses the sampled Src implementation where available. Unverified product capabilities are shown separately.

Main entry points: [`Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`](https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/routes/index.jsx) (Page routes), [`Src/Entrega 1/client/src/components/EventRegistration.jsx`](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/components/EventRegistration.jsx) (Event wizard), [`Src/Entrega 1/client/src/main.jsx`](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/main.jsx) (React entry), [`Src/Entrega 1/client/src/pages/Cadastro.jsx`](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/Cadastro.jsx) (Account signup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Frontend app"]
  node_entry["React entry<br/>[main.jsx]"]
  node_routes["Page routes<br/>[index.jsx]"]
  node_register["Account signup<br/>[Cadastro.jsx]"]
  node_api["Signup API helper<br/>[api.js]"]
end

subgraph group_organizer["Organizer tools"]
  node_eventflow["Event wizard"]
  node_eventbasics["Event details<br/>[EventBasics.jsx]"]
  node_lots["Audience and lots<br/>[AudienceLots.jsx]"]
  node_indcost["Independent costs"]
  node_costitems["Cost items<br/>[CostItems.jsx]"]
  node_eventpanel["Event dashboard"]
end

subgraph group_admin["Administration"]
  node_adminpanel["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_approvals["Registration approvals"]
  node_badges["Status badges<br/>[Badge.jsx]"]
end

subgraph group_backend["Authentication backend"]
  node_authroutes["Auth endpoints<br/>[authRoutes.js]"]
  node_userdb[("User database<br/>[db.js]")]
end

subgraph group_documented["Documented capabilities"]
  node_buyers["Ticket discovery and purchase"]
  node_digital["Digital ticket delivery"]
  node_eventday["Event-day access control"]
  node_sales["Sales and order monitoring"]
end

node_visitor(("Platform user"))

node_visitor -->|"opens"| node_entry
node_entry -->|"loads routes"| node_routes
node_routes -->|"routes to"| node_register
node_routes -->|"routes to"| node_eventflow
node_routes -->|"routes to"| node_eventpanel
node_routes -->|"routes to"| node_adminpanel
node_routes -->|"routes to"| node_approvals
node_register -->|"calls"| node_api
node_eventflow -->|"renders"| node_eventbasics
node_eventflow -->|"renders"| node_lots
node_eventflow -->|"renders"| node_indcost
node_eventflow -->|"renders"| node_costitems
node_adminpanel -->|"renders"| node_badges
node_approvals -->|"renders"| node_badges
node_authroutes -->|"queries"| node_userdb
node_api -.->|"HTTP request"| node_authroutes
node_visitor -.->|"searches and buys"| node_buyers
node_buyers -.->|"receives ticket"| node_digital
node_eventpanel -.->|"monitors"| node_sales
node_visitor -.->|"access checked"| node_eventday

click node_entry "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/main.jsx"
click node_routes "https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/routes/index.jsx"
click node_register "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/Cadastro.jsx"
click node_api "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/services/api.js"
click node_eventflow "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/components/EventRegistration.jsx"
click node_eventbasics "https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/pages/EventBasics.jsx"
click node_lots "https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/pages/AudienceLots.jsx"
click node_indcost "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/IndependentCosts.jsx"
click node_costitems "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/CostItems.jsx"
click node_eventpanel "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/PainelDeEventos.jsx"
click node_adminpanel "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/adminPages/AdminDashboard.jsx"
click node_approvals "https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/pages/adminPages/AprovarCadastros.jsx"
click node_badges "https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/components/ui/Badge.jsx"
click node_authroutes "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/server/routes/authRoutes.js"
click node_userdb "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/server/config/db.js"
click node_buyers "https://github.com/2026-2-ncc2/projeto1/tree/main/Src/Entrega%201/client/src"
click node_digital "https://github.com/2026-2-ncc2/projeto1/tree/main/Src/Entrega%201/client/src"
click node_eventday "https://github.com/2026-2-ncc2/projeto1/tree/main/Src/Entrega%201/client/src"
click node_sales "https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/PainelDeEventos.jsx"

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_entry,node_routes,node_register,node_api,node_visitor toneBlue
class node_eventflow,node_eventbasics,node_lots,node_indcost,node_costitems,node_eventpanel toneAmber
class node_adminpanel,node_approvals,node_badges toneMint
class node_authroutes,node_userdb toneRose
class node_buyers,node_digital,node_eventday,node_sales toneIndigo
```

## Components

### Frontend app

- [React entry](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/main.jsx): `Src/Entrega 1/client/src/main.jsx`
- [Page routes](https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/routes/index.jsx): `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`
- [Account signup](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/Cadastro.jsx): `Src/Entrega 1/client/src/pages/Cadastro.jsx`
- [Signup API helper](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/services/api.js): `Src/Entrega 1/client/src/services/api.js`

### Organizer tools

- [Event wizard](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/components/EventRegistration.jsx): `Src/Entrega 1/client/src/components/EventRegistration.jsx`
- [Event details](https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/pages/EventBasics.jsx): `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/pages/EventBasics.jsx`
- [Audience and lots](https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/pages/AudienceLots.jsx): `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/pages/AudienceLots.jsx`
- [Independent costs](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/IndependentCosts.jsx): `Src/Entrega 1/client/src/pages/IndependentCosts.jsx`
- [Cost items](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/CostItems.jsx): `Src/Entrega 1/client/src/pages/CostItems.jsx`
- [Event dashboard](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/PainelDeEventos.jsx): `Src/Entrega 1/client/src/pages/PainelDeEventos.jsx`

### Administration

- [Admin dashboard](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/adminPages/AdminDashboard.jsx): `Src/Entrega 1/client/src/pages/adminPages/AdminDashboard.jsx`
- [Registration approvals](https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/pages/adminPages/AprovarCadastros.jsx): `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/pages/adminPages/AprovarCadastros.jsx`
- [Status badges](https://github.com/2026-2-ncc2/projeto1/blob/main/Documentos/Entrega%201/Desenvolvimento%20Web%20FullStack/Frontend/client/src/components/ui/Badge.jsx): `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/components/ui/Badge.jsx`

### Authentication backend

- [Auth endpoints](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/server/routes/authRoutes.js): `Src/Entrega 1/server/routes/authRoutes.js`
- [User database](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/server/config/db.js): `Src/Entrega 1/server/config/db.js`

### Documented capabilities

- [Ticket discovery and purchase](https://github.com/2026-2-ncc2/projeto1/tree/main/Src/Entrega%201/client/src): `Src/Entrega 1/client/src`
- [Digital ticket delivery](https://github.com/2026-2-ncc2/projeto1/tree/main/Src/Entrega%201/client/src): `Src/Entrega 1/client/src`
- [Event-day access control](https://github.com/2026-2-ncc2/projeto1/tree/main/Src/Entrega%201/client/src): `Src/Entrega 1/client/src`
- [Sales and order monitoring](https://github.com/2026-2-ncc2/projeto1/blob/main/Src/Entrega%201/client/src/pages/PainelDeEventos.jsx): `Src/Entrega 1/client/src/pages/PainelDeEventos.jsx`

### Other components

- **Platform user**

## Connections

- Platform user → React entry: opens (evidence: `Src/Entrega 1/client/src/main.jsx`)
- React entry → Page routes: loads routes (evidence: `Src/Entrega 1/client/src/main.jsx`)
- Page routes → Account signup: routes to (evidence: `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`)
- Page routes → Event wizard: routes to (evidence: `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`)
- Page routes → Event dashboard: routes to (evidence: `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`)
- Page routes → Admin dashboard: routes to (evidence: `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`)
- Page routes → Registration approvals: routes to (evidence: `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/routes/index.jsx`)
- Account signup → Signup API helper: calls (evidence: `Src/Entrega 1/client/src/pages/Cadastro.jsx`)
- Event wizard → Event details: renders (evidence: `Src/Entrega 1/client/src/components/EventRegistration.jsx`)
- Event wizard → Audience and lots: renders (evidence: `Src/Entrega 1/client/src/components/EventRegistration.jsx`)
- Event wizard → Independent costs: renders (evidence: `Src/Entrega 1/client/src/components/EventRegistration.jsx`)
- Event wizard → Cost items: renders (evidence: `Src/Entrega 1/client/src/components/EventRegistration.jsx`)
- Admin dashboard → Status badges: renders (evidence: `Src/Entrega 1/client/src/pages/adminPages/AdminDashboard.jsx`)
- Registration approvals → Status badges: renders (evidence: `Documentos/Entrega 1/Desenvolvimento Web FullStack/Frontend/client/src/pages/adminPages/AprovarCadastros.jsx`)
- Auth endpoints → User database: queries (evidence: `Src/Entrega 1/server/routes/authRoutes.js`)
- Signup API helper → Auth endpoints: HTTP request
- Platform user → Ticket discovery and purchase: searches and buys (evidence: `README.md`)
- Ticket discovery and purchase → Digital ticket delivery: receives ticket (evidence: `README.md`)
- Event dashboard → Sales and order monitoring: monitors (evidence: `README.md`)
- Platform user → Event-day access control: access checked (evidence: `README.md`)
