# nikitakovalenko111/ural-hackaton architecture

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

- Interactive diagram: https://gitdiagram.com/nikitakovalenko111/ural-hackaton
- Repository: https://github.com/nikitakovalenko111/ural-hackaton

## Overview

Ural Hackaton is a hub and community-management web application. Visitors browse hubs, events, and mentors; users can register or sign in through magic links, then manage profile-related requests and bookings. The React client calls a Go/Fiber API backed by PostgreSQL. The README documents the product capabilities and API domains; internal backend call relationships are not shown in the supplied excerpts, so those links are marked unverified rather than presented as confirmed calls.

Main entry points: [`client/src/App.tsx`](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/App.tsx) (Routes and shell), [`client/src/api/api.ts`](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/api/api.ts) (HTTP client), [`server/internal/services/handlers`](https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/services/handlers) (Domain handlers), [`client/src/pages/events/EventsPage.tsx`](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/events/EventsPage.tsx) (Event browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Routes and shell<br/>[App.tsx]"]
  node_hubs_page["Hub browsing<br/>[HubsPage.tsx]"]
  node_hub_detail["Hub detail<br/>[IndexPage.tsx]"]
  node_events_page["Event browsing<br/>[EventsPage.tsx]"]
  node_mentors_page["Mentor browsing<br/>[MentorsPage.tsx]"]
  node_auth_pages["Registration and sign-in<br/>[LoginPage.tsx]"]
  node_auth_verify["Magic-link verification<br/>[AuthVerifyPage.tsx]"]
  node_profile_page["Profile and records<br/>[ProfilePage.tsx]"]
  node_registration_modal["Booking and request form"]
  node_user_state["User session state<br/>[userSlice.ts]"]
end

subgraph group_api["API and domain"]
  node_client_api["HTTP client<br/>[api.ts]"]
end

subgraph group_backend["Backend services"]
  node_http_api["HTTP routes<br/>[http.go]"]
  node_controllers["Request controllers<br/>[controllers.go]"]
  node_services["Domain handlers"]
  node_email["Email sender<br/>[sender.go]"]
  node_models["Domain models"]
end

subgraph group_persistence["Persistence"]
  node_repositories["Domain repositories"]
  node_postgres[("PostgreSQL")]
end

node_visitor(("Visitor or user"))

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_hubs_page
node_app -->|"routes to"| node_hub_detail
node_app -->|"routes to"| node_events_page
node_app -->|"routes to"| node_mentors_page
node_app -->|"routes to"| node_auth_pages
node_app -->|"routes to"| node_auth_verify
node_app -->|"routes to"| node_profile_page
node_app -->|"restores session via"| node_client_api
node_app -->|"sets session"| node_user_state
node_auth_verify -->|"verifies token via"| node_client_api
node_auth_verify -->|"sets user"| node_user_state
node_hubs_page -->|"loads hubs"| node_client_api
node_hub_detail -->|"loads hub data"| node_client_api
node_events_page -->|"loads events"| node_client_api
node_events_page -->|"opens form"| node_registration_modal
node_mentors_page -->|"loads mentors"| node_client_api
node_mentors_page -->|"opens form"| node_registration_modal
node_registration_modal -->|"submits bookings"| node_client_api
node_profile_page -->|"loads records"| node_client_api
node_profile_page -->|"clears session"| node_user_state
node_client_api -->|"calls HTTP endpoints"| node_http_api
node_http_api -.->|"dispatches to"| node_controllers
node_controllers -.->|"delegates to"| node_services
node_services -.->|"uses"| node_repositories
node_services -.->|"sends email"| node_email
node_repositories -->|"reads and writes"| node_postgres
node_services -.->|"uses domain data"| node_models

click node_app "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/App.tsx"
click node_hubs_page "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/hubs/HubsPage.tsx"
click node_hub_detail "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/index/IndexPage.tsx"
click node_events_page "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/events/EventsPage.tsx"
click node_mentors_page "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/mentors/MentorsPage.tsx"
click node_auth_pages "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/login/LoginPage.tsx"
click node_auth_verify "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/authVerify/AuthVerifyPage.tsx"
click node_profile_page "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/profile/ProfilePage.tsx"
click node_registration_modal "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/components/registrationModal/RegistrationModal.tsx"
click node_user_state "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/redux/features/users/userSlice.ts"
click node_client_api "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/api/api.ts"
click node_http_api "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/server/internal/transport/http/http.go"
click node_controllers "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/server/internal/transport/http/controllers/controllers.go"
click node_services "https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/services/handlers"
click node_email "https://github.com/nikitakovalenko111/ural-hackaton/blob/main/server/internal/services/handlers/email/sender.go"
click node_repositories "https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/storage/repositories"
click node_models "https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/models"

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_hubs_page,node_hub_detail,node_events_page,node_mentors_page,node_auth_pages,node_auth_verify,node_profile_page,node_registration_modal,node_user_state,node_visitor toneBlue
class node_client_api toneAmber
class node_http_api,node_controllers,node_services,node_email,node_models toneMint
class node_repositories,node_postgres toneRose
```

## Components

### Web client

- [Routes and shell](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Hub browsing](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/hubs/HubsPage.tsx): `client/src/pages/hubs/HubsPage.tsx`
- [Hub detail](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/index/IndexPage.tsx): `client/src/pages/index/IndexPage.tsx`
- [Event browsing](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/events/EventsPage.tsx): `client/src/pages/events/EventsPage.tsx`
- [Mentor browsing](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/mentors/MentorsPage.tsx): `client/src/pages/mentors/MentorsPage.tsx`
- [Registration and sign-in](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/login/LoginPage.tsx): `client/src/pages/login/LoginPage.tsx`
- [Magic-link verification](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/authVerify/AuthVerifyPage.tsx): `client/src/pages/authVerify/AuthVerifyPage.tsx`
- [Profile and records](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/pages/profile/ProfilePage.tsx): `client/src/pages/profile/ProfilePage.tsx`
- [Booking and request form](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/components/registrationModal/RegistrationModal.tsx): `client/src/components/registrationModal/RegistrationModal.tsx`
- [User session state](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/redux/features/users/userSlice.ts): `client/src/redux/features/users/userSlice.ts`

### API and domain

- [HTTP client](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/client/src/api/api.ts): `client/src/api/api.ts`

### Backend services

- [HTTP routes](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/server/internal/transport/http/http.go): `server/internal/transport/http/http.go`
- [Request controllers](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/server/internal/transport/http/controllers/controllers.go): `server/internal/transport/http/controllers/controllers.go`
- [Domain handlers](https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/services/handlers): `server/internal/services/handlers`
- [Email sender](https://github.com/nikitakovalenko111/ural-hackaton/blob/main/server/internal/services/handlers/email/sender.go): `server/internal/services/handlers/email/sender.go`
- [Domain models](https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/models): `server/internal/models`

### Persistence

- [Domain repositories](https://github.com/nikitakovalenko111/ural-hackaton/tree/main/server/internal/storage/repositories): `server/internal/storage/repositories`
- **PostgreSQL**

### Other components

- **Visitor or user**

## Connections

- Visitor or user → Routes and shell: uses (evidence: `README.md`)
- Routes and shell → Hub browsing: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Hub detail: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Event browsing: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Mentor browsing: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Registration and sign-in: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Magic-link verification: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → Profile and records: routes to (evidence: `client/src/App.tsx`)
- Routes and shell → HTTP client: restores session via (evidence: `client/src/App.tsx`)
- Routes and shell → User session state: sets session (evidence: `client/src/App.tsx`)
- Magic-link verification → HTTP client: verifies token via (evidence: `client/src/pages/authVerify/AuthVerifyPage.tsx`)
- Magic-link verification → User session state: sets user (evidence: `client/src/pages/authVerify/AuthVerifyPage.tsx`)
- Hub browsing → HTTP client: loads hubs (evidence: `client/src/api/api.ts`)
- Hub detail → HTTP client: loads hub data (evidence: `client/src/pages/index/IndexPage.tsx`)
- Event browsing → HTTP client: loads events (evidence: `client/src/pages/events/EventsPage.tsx`)
- Event browsing → Booking and request form: opens form (evidence: `client/src/pages/events/EventsPage.tsx`)
- Mentor browsing → HTTP client: loads mentors (evidence: `client/src/pages/mentors/MentorsPage.tsx`)
- Mentor browsing → Booking and request form: opens form (evidence: `client/src/pages/mentors/MentorsPage.tsx`)
- Booking and request form → HTTP client: submits bookings (evidence: `client/src/components/registrationModal/RegistrationModal.tsx`)
- Profile and records → HTTP client: loads records (evidence: `client/src/pages/profile/ProfilePage.tsx`)
- Profile and records → User session state: clears session (evidence: `client/src/pages/profile/ProfilePage.tsx`)
- HTTP client → HTTP routes: calls HTTP endpoints (evidence: `README.md`)
- HTTP routes → Request controllers: dispatches to
- Request controllers → Domain handlers: delegates to
- Domain handlers → Domain repositories: uses
- Domain handlers → Email sender: sends email
- Domain repositories → PostgreSQL: reads and writes (evidence: `README.md`)
- Domain handlers → Domain models: uses domain data
