# code-craft-project/code-craft-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/code-craft-project/code-craft-frontend
- Repository: https://github.com/code-craft-project/code-craft-frontend

## Overview

Code Craft is a frontend coding-challenges and hiring platform. Its principal workflow is browsing or searching challenges, events, jobs, and organizations; users can open challenge/event details, submit code or participate, while organizations manage challenges, events, members, and hiring posts. The graph reflects documented routes and sampled search, session, and HTTP-service wiring. Several product areas are visible in the tree and README-level description but their internal calls were not sampled, so those links are omitted rather than inferred.

Main entry points: [`src/presentation/App.tsx`](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/App.tsx) (Route & Providers), [`src/application/services.ts`](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services.ts) (Service Registry), [`src/application/hooks/useUserSession.ts`](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useUserSession.ts) (Session Hook), [`src/application/services/SearchService.ts`](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services/SearchService.ts) (Search API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application Shell"]
  node_entry["React App Entry<br/>[main.tsx]"]
  node_router["Route &amp; Providers<br/>[App.tsx]"]
end

subgraph group_identity["Identity &amp; Session"]
  node_session["Session Hook<br/>[useUserSession.ts]"]
  node_sessionctx["Session Context"]
  node_signin["Sign In / Up<br/>[SignIn.tsx]"]
  node_settings["User Settings<br/>[Settings.tsx]"]
end

subgraph group_discovery["Discovery &amp; Hiring"]
  node_searchpage["Search Page<br/>[Search.tsx]"]
  node_searchhook["Search State<br/>[useSearch.ts]"]
  node_searchsvc["Search API Client<br/>[SearchService.ts]"]
  node_jobpages["Job Listings<br/>[JobsPost.tsx]"]
  node_jobdetail["Job Post Detail<br/>[SingleJobPost.tsx]"]
  node_jobcreate["Job Post Authoring<br/>[CreateJobPost.tsx]"]
end

subgraph group_challenge["Challenges &amp; Events"]
  node_challengebrowse["Challenge Catalog<br/>[Challenges.tsx]"]
  node_challengepage["Challenge Workspace<br/>[ChallengePage.tsx]"]
  node_submission["Submission Hook<br/>[useSubmission.ts]"]
  node_eventlist["Event Catalog<br/>[Events.tsx]"]
  node_eventdetail["Event Participation<br/>[SingleEvent.tsx]"]
  node_eventhook["Event State<br/>[useEvent.ts]"]
end

subgraph group_org["Organization Management"]
  node_orgpages["Organization Pages"]
  node_orgdashboard["Organization Dashboard"]
  node_orgsettings["Organization Settings"]
end

subgraph group_infra["Application Services"]
  node_http["HTTP Transport<br/>[AxiosHttp.ts]"]
  node_services["Service Registry<br/>[services.ts]"]
end

node_visitor(("Visitor / User"))
node_backend[("Code Craft Backend")]

node_visitor -->|"opens app"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"routes"| node_signin
node_router -->|"routes"| node_searchpage
node_router -->|"routes"| node_challengebrowse
node_router -->|"routes"| node_challengepage
node_router -->|"routes"| node_eventlist
node_router -->|"routes"| node_eventdetail
node_router -->|"routes"| node_jobpages
node_router -->|"routes"| node_jobdetail
node_router -->|"routes"| node_jobcreate
node_router -->|"routes"| node_orgpages
node_router -->|"routes"| node_orgdashboard
node_router -.->|"routes"| node_orgsettings
node_router -->|"routes"| node_settings
node_router -->|"initializes"| node_session
node_router -->|"provides"| node_sessionctx
node_session -->|"uses clients"| node_services
node_session -.->|"supplies state"| node_sessionctx
node_searchpage -->|"invokes"| node_searchhook
node_searchhook -->|"queries"| node_searchsvc
node_searchsvc -->|"sends requests"| node_http
node_services -->|"constructs clients"| node_http
node_services -->|"constructs client"| node_searchsvc
node_http -->|"HTTP requests"| node_backend
node_eventdetail -->|"uses state"| node_eventhook
node_eventhook -->|"uses clients"| node_services
node_challengepage -.->|"manages submissions"| node_submission
node_orgdashboard -.->|"manages organization"| node_orgpages

click node_entry "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/main.tsx"
click node_router "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/App.tsx"
click node_session "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useUserSession.ts"
click node_sessionctx "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/contexts/UserSessionContext.ts"
click node_signin "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SignIn.tsx"
click node_settings "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Settings.tsx"
click node_searchpage "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Search.tsx"
click node_searchhook "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useSearch.ts"
click node_searchsvc "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services/SearchService.ts"
click node_jobpages "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/JobsPost.tsx"
click node_jobdetail "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SingleJobPost.tsx"
click node_jobcreate "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/CreateJobPost.tsx"
click node_challengebrowse "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Challenges.tsx"
click node_challengepage "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/ChallengePage.tsx"
click node_submission "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useSubmission.ts"
click node_eventlist "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Events.tsx"
click node_eventdetail "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SingleEvent.tsx"
click node_eventhook "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useEvent.ts"
click node_orgpages "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SingleOrganization.tsx"
click node_orgdashboard "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/OrganizationDashboard.tsx"
click node_orgsettings "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/OrganizationSettings.tsx"
click node_http "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services/AxiosHttp.ts"
click node_services "https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services.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_entry,node_router,node_visitor toneBlue
class node_session,node_sessionctx,node_signin,node_settings,node_backend toneAmber
class node_searchpage,node_searchhook,node_searchsvc,node_jobpages,node_jobdetail,node_jobcreate toneMint
class node_challengebrowse,node_challengepage,node_submission,node_eventlist,node_eventdetail,node_eventhook toneRose
class node_orgpages,node_orgdashboard,node_orgsettings toneIndigo
class node_http,node_services toneTeal
```

## Components

### Application Shell

- [React App Entry](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/main.tsx): `src/application/main.tsx`
- [Route & Providers](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/App.tsx): `src/presentation/App.tsx`

### Identity & Session

- [Session Hook](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useUserSession.ts): `src/application/hooks/useUserSession.ts`
- [Session Context](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/contexts/UserSessionContext.ts): `src/application/contexts/UserSessionContext.ts`
- [Sign In / Up](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SignIn.tsx): `src/presentation/pages/SignIn.tsx`
- [User Settings](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Settings.tsx): `src/presentation/pages/Settings.tsx`

### Discovery & Hiring

- [Search Page](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Search.tsx): `src/presentation/pages/Search.tsx`
- [Search State](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useSearch.ts): `src/application/hooks/useSearch.ts`
- [Search API Client](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services/SearchService.ts): `src/application/services/SearchService.ts`
- [Job Listings](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/JobsPost.tsx): `src/presentation/pages/JobsPost.tsx`
- [Job Post Detail](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SingleJobPost.tsx): `src/presentation/pages/SingleJobPost.tsx`
- [Job Post Authoring](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/CreateJobPost.tsx): `src/presentation/pages/CreateJobPost.tsx`

### Challenges & Events

- [Challenge Catalog](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Challenges.tsx): `src/presentation/pages/Challenges.tsx`
- [Challenge Workspace](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/ChallengePage.tsx): `src/presentation/pages/ChallengePage.tsx`
- [Submission Hook](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useSubmission.ts): `src/application/hooks/useSubmission.ts`
- [Event Catalog](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/Events.tsx): `src/presentation/pages/Events.tsx`
- [Event Participation](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SingleEvent.tsx): `src/presentation/pages/SingleEvent.tsx`
- [Event State](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/hooks/useEvent.ts): `src/application/hooks/useEvent.ts`

### Organization Management

- [Organization Pages](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/SingleOrganization.tsx): `src/presentation/pages/SingleOrganization.tsx`
- [Organization Dashboard](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/OrganizationDashboard.tsx): `src/presentation/pages/OrganizationDashboard.tsx`
- [Organization Settings](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/presentation/pages/OrganizationSettings.tsx): `src/presentation/pages/OrganizationSettings.tsx`

### Application Services

- [HTTP Transport](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services/AxiosHttp.ts): `src/application/services/AxiosHttp.ts`
- [Service Registry](https://github.com/code-craft-project/code-craft-frontend/blob/main/src/application/services.ts): `src/application/services.ts`

### Other components

- **Visitor / User**
- **Code Craft Backend**

## Connections

- Visitor / User → React App Entry: opens app (evidence: `src/application/main.tsx`)
- React App Entry → Route & Providers: renders (evidence: `src/application/main.tsx`)
- Route & Providers → Sign In / Up: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Search Page: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Challenge Catalog: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Challenge Workspace: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Event Catalog: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Event Participation: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Job Listings: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Job Post Detail: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Job Post Authoring: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Organization Pages: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Organization Dashboard: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Organization Settings: routes
- Route & Providers → User Settings: routes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Session Hook: initializes (evidence: `src/presentation/App.tsx`)
- Route & Providers → Session Context: provides (evidence: `src/presentation/App.tsx`)
- Session Hook → Service Registry: uses clients (evidence: `src/application/hooks/useUserSession.ts`)
- Session Hook → Session Context: supplies state
- Search Page → Search State: invokes (evidence: `src/presentation/pages/Search.tsx`)
- Search State → Search API Client: queries (evidence: `src/application/hooks/useSearch.ts`)
- Search API Client → HTTP Transport: sends requests (evidence: `src/application/services/SearchService.ts`)
- Service Registry → HTTP Transport: constructs clients (evidence: `src/application/services.ts`)
- Service Registry → Search API Client: constructs client (evidence: `src/application/services.ts`)
- HTTP Transport → Code Craft Backend: HTTP requests (evidence: `src/application/services/AxiosHttp.ts`)
- Event Participation → Event State: uses state (evidence: `src/presentation/pages/SingleEvent.tsx`)
- Event State → Service Registry: uses clients (evidence: `src/application/hooks/useEvent.ts`)
- Challenge Workspace → Submission Hook: manages submissions
- Organization Dashboard → Organization Pages: manages organization
