# nigelboada/futcon architecture

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

- Interactive diagram: https://gitdiagram.com/nigelboada/futcon
- Repository: https://github.com/nigelboada/futcon

## Overview

FUTCON is a football-community platform for creating role-specific profiles, discovering people, and contacting them. The main flow is account access and onboarding, profile completion, profile search and viewing, then conversation; achievements add a related progression feature. Supabase provides server-side authentication and data access, while profile completeness and localization are shared application services. The map includes documented-by-source-index routes and sampled implementations; many feature pages and actions were not opened, so their internal calls are not expanded.

Main entry points: [`src/app/dashboard/page.tsx`](https://github.com/nigelboada/futcon/blob/main/src/app/dashboard/page.tsx) (Dashboard), [`src/lib/auth/guards.ts`](https://github.com/nigelboada/futcon/blob/main/src/lib/auth/guards.ts) (Access guards), [`src/app/profile/edit/page.tsx`](https://github.com/nigelboada/futcon/blob/main/src/app/profile/edit/page.tsx) (Edit profile), [`src/lib/supabase/server.ts`](https://github.com/nigelboada/futcon/blob/main/src/lib/supabase/server.ts) (Server client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and profiles"]
  node_auth["Sign in and register<br/>[actions.ts]"]
  node_onboarding["Role onboarding<br/>[page.tsx]"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_profile_edit["Edit profile<br/>[page.tsx]"]
  node_profile_view["Public profile<br/>[page.tsx]"]
  node_profile_data["Profile completeness<br/>[completeness.ts]"]
end

subgraph group_community["Discovery and conversations"]
  node_search["Profile search<br/>[page.tsx]"]
  node_conversations["Conversations<br/>[page.tsx]"]
  node_conversation_actions["Conversation actions"]
  node_conversation_detail["Conversation detail<br/>[page.tsx]"]
end

subgraph group_progress["Achievements"]
  node_achievements["Achievement center<br/>[page.tsx]"]
  node_achievement_award["Achievement awards<br/>[award.ts]"]
end

subgraph group_platform["Shared platform"]
  node_admin["Administration<br/>[page.tsx]"]
  node_auth_guard["Access guards<br/>[guards.ts]"]
  node_profile_setup["Profile initialization<br/>[profiles.ts]"]
  node_supabase_server["Server client<br/>[server.ts]"]
  node_locale_server["Locale detection<br/>[server.ts]"]
  node_locale_config["Locale definitions<br/>[config.ts]"]
  node_messages["Translation messages<br/>[messages.ts]"]
  node_feedback["Feedback mapping<br/>[feedback.ts]"]
  node_completeness_ui["Completeness display"]
end

node_visitor(("User"))
node_supabase[("Supabase")]

node_visitor -->|"signs up"| node_auth
node_visitor -->|"sets role"| node_onboarding
node_visitor -->|"views dashboard"| node_dashboard
node_visitor -->|"edits profile"| node_profile_edit
node_visitor -->|"searches profiles"| node_search
node_visitor -->|"views conversations"| node_conversations
node_auth -->|"uses client"| node_supabase_server
node_onboarding -->|"uses client"| node_supabase_server
node_dashboard -->|"requires user"| node_auth_guard
node_dashboard -->|"reads profile data"| node_supabase
node_dashboard -->|"calculates completeness"| node_profile_data
node_profile_edit -->|"requires user"| node_auth_guard
node_profile_edit -->|"reads profile data"| node_supabase
node_profile_edit -->|"renders status"| node_completeness_ui
node_profile_view -->|"checks access"| node_auth_guard
node_profile_view -->|"uses completeness"| node_profile_data
node_profile_view -->|"uses badges"| node_achievement_award
node_search -->|"requires user"| node_auth_guard
node_search -->|"awards achievements"| node_achievement_award
node_conversations -->|"uses actions"| node_conversation_actions
node_conversation_detail -.->|"uses actions"| node_conversation_actions
node_auth_guard -->|"creates client"| node_supabase_server
node_auth_guard -->|"ensures profile"| node_profile_setup
node_supabase_server -->|"connects"| node_supabase
node_locale_server -->|"validates locale"| node_locale_config
node_dashboard -->|"gets locale"| node_locale_server
node_dashboard -->|"loads messages"| node_messages
node_dashboard -->|"resolves feedback"| node_feedback
node_admin -->|"requires user"| node_auth_guard
node_admin -->|"resolves feedback"| node_feedback

click node_auth "https://github.com/nigelboada/futcon/blob/main/src/app/(auth)/actions.ts"
click node_onboarding "https://github.com/nigelboada/futcon/blob/main/src/app/onboarding/page.tsx"
click node_dashboard "https://github.com/nigelboada/futcon/blob/main/src/app/dashboard/page.tsx"
click node_profile_edit "https://github.com/nigelboada/futcon/blob/main/src/app/profile/edit/page.tsx"
click node_profile_view "https://github.com/nigelboada/futcon/blob/main/src/app/profile/%5Bid%5D/page.tsx"
click node_profile_data "https://github.com/nigelboada/futcon/blob/main/src/lib/profiles/completeness.ts"
click node_search "https://github.com/nigelboada/futcon/blob/main/src/app/search/page.tsx"
click node_conversations "https://github.com/nigelboada/futcon/blob/main/src/app/conversations/page.tsx"
click node_conversation_actions "https://github.com/nigelboada/futcon/blob/main/src/app/conversations/conversation-actions.ts"
click node_conversation_detail "https://github.com/nigelboada/futcon/blob/main/src/app/conversations/%5Bid%5D/page.tsx"
click node_achievements "https://github.com/nigelboada/futcon/blob/main/src/app/achievements/page.tsx"
click node_achievement_award "https://github.com/nigelboada/futcon/blob/main/src/lib/achievements/award.ts"
click node_admin "https://github.com/nigelboada/futcon/blob/main/src/app/admin/page.tsx"
click node_auth_guard "https://github.com/nigelboada/futcon/blob/main/src/lib/auth/guards.ts"
click node_profile_setup "https://github.com/nigelboada/futcon/blob/main/src/lib/auth/profiles.ts"
click node_supabase_server "https://github.com/nigelboada/futcon/blob/main/src/lib/supabase/server.ts"
click node_locale_server "https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/server.ts"
click node_locale_config "https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/config.ts"
click node_messages "https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/messages.ts"
click node_feedback "https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/feedback.ts"
click node_completeness_ui "https://github.com/nigelboada/futcon/blob/main/src/components/profiles/profile-completeness-banner.tsx"

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_auth,node_onboarding,node_dashboard,node_profile_edit,node_profile_view,node_profile_data,node_visitor toneBlue
class node_search,node_conversations,node_conversation_actions,node_conversation_detail,node_supabase toneAmber
class node_achievements,node_achievement_award toneMint
class node_admin,node_auth_guard,node_profile_setup,node_supabase_server,node_locale_server,node_locale_config,node_messages,node_feedback,node_completeness_ui toneRose
```

## Components

### Identity and profiles

- [Sign in and register](https://github.com/nigelboada/futcon/blob/main/src/app/(auth)/actions.ts): `src/app/(auth)/actions.ts`
- [Role onboarding](https://github.com/nigelboada/futcon/blob/main/src/app/onboarding/page.tsx): `src/app/onboarding/page.tsx`
- [Dashboard](https://github.com/nigelboada/futcon/blob/main/src/app/dashboard/page.tsx): `src/app/dashboard/page.tsx`
- [Edit profile](https://github.com/nigelboada/futcon/blob/main/src/app/profile/edit/page.tsx): `src/app/profile/edit/page.tsx`
- [Public profile](https://github.com/nigelboada/futcon/blob/main/src/app/profile/%5Bid%5D/page.tsx): `src/app/profile/[id]/page.tsx`
- [Profile completeness](https://github.com/nigelboada/futcon/blob/main/src/lib/profiles/completeness.ts): `src/lib/profiles/completeness.ts`

### Discovery and conversations

- [Profile search](https://github.com/nigelboada/futcon/blob/main/src/app/search/page.tsx): `src/app/search/page.tsx`
- [Conversations](https://github.com/nigelboada/futcon/blob/main/src/app/conversations/page.tsx): `src/app/conversations/page.tsx`
- [Conversation actions](https://github.com/nigelboada/futcon/blob/main/src/app/conversations/conversation-actions.ts): `src/app/conversations/conversation-actions.ts`
- [Conversation detail](https://github.com/nigelboada/futcon/blob/main/src/app/conversations/%5Bid%5D/page.tsx): `src/app/conversations/[id]/page.tsx`

### Achievements

- [Achievement center](https://github.com/nigelboada/futcon/blob/main/src/app/achievements/page.tsx): `src/app/achievements/page.tsx`
- [Achievement awards](https://github.com/nigelboada/futcon/blob/main/src/lib/achievements/award.ts): `src/lib/achievements/award.ts`

### Shared platform

- [Administration](https://github.com/nigelboada/futcon/blob/main/src/app/admin/page.tsx): `src/app/admin/page.tsx`
- [Access guards](https://github.com/nigelboada/futcon/blob/main/src/lib/auth/guards.ts): `src/lib/auth/guards.ts`
- [Profile initialization](https://github.com/nigelboada/futcon/blob/main/src/lib/auth/profiles.ts): `src/lib/auth/profiles.ts`
- [Server client](https://github.com/nigelboada/futcon/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- [Locale detection](https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/server.ts): `src/lib/i18n/server.ts`
- [Locale definitions](https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/config.ts): `src/lib/i18n/config.ts`
- [Translation messages](https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/messages.ts): `src/lib/i18n/messages.ts`
- [Feedback mapping](https://github.com/nigelboada/futcon/blob/main/src/lib/i18n/feedback.ts): `src/lib/i18n/feedback.ts`
- [Completeness display](https://github.com/nigelboada/futcon/blob/main/src/components/profiles/profile-completeness-banner.tsx): `src/components/profiles/profile-completeness-banner.tsx`

### Other components

- **User**
- **Supabase**

## Connections

- User → Sign in and register: signs up
- User → Role onboarding: sets role (evidence: `src/app/onboarding/page.tsx`)
- User → Dashboard: views dashboard (evidence: `src/app/dashboard/page.tsx`)
- User → Edit profile: edits profile (evidence: `src/app/profile/edit/page.tsx`)
- User → Profile search: searches profiles (evidence: `src/app/search/page.tsx`)
- User → Conversations: views conversations (evidence: `src/app/conversations/page.tsx`)
- Sign in and register → Server client: uses client
- Role onboarding → Server client: uses client (evidence: `src/app/onboarding/page.tsx`)
- Dashboard → Access guards: requires user (evidence: `src/app/dashboard/page.tsx`)
- Dashboard → Supabase: reads profile data (evidence: `src/app/dashboard/page.tsx`)
- Dashboard → Profile completeness: calculates completeness (evidence: `src/app/dashboard/page.tsx`)
- Edit profile → Access guards: requires user (evidence: `src/app/profile/edit/page.tsx`)
- Edit profile → Supabase: reads profile data (evidence: `src/app/profile/edit/page.tsx`)
- Edit profile → Completeness display: renders status (evidence: `src/app/profile/edit/page.tsx`)
- Public profile → Access guards: checks access (evidence: `src/app/profile/[id]/page.tsx`)
- Public profile → Profile completeness: uses completeness (evidence: `src/app/profile/[id]/page.tsx`)
- Public profile → Achievement awards: uses badges (evidence: `src/app/profile/[id]/page.tsx`)
- Profile search → Access guards: requires user (evidence: `src/app/search/page.tsx`)
- Profile search → Achievement awards: awards achievements (evidence: `src/app/search/page.tsx`)
- Conversations → Conversation actions: uses actions (evidence: `src/app/conversations/page.tsx`)
- Conversation detail → Conversation actions: uses actions
- Access guards → Server client: creates client (evidence: `src/lib/auth/guards.ts`)
- Access guards → Profile initialization: ensures profile (evidence: `src/lib/auth/guards.ts`)
- Server client → Supabase: connects (evidence: `src/lib/supabase/server.ts`)
- Locale detection → Locale definitions: validates locale (evidence: `src/lib/i18n/server.ts`)
- Dashboard → Locale detection: gets locale (evidence: `src/app/dashboard/page.tsx`)
- Dashboard → Translation messages: loads messages (evidence: `src/app/dashboard/page.tsx`)
- Dashboard → Feedback mapping: resolves feedback (evidence: `src/app/dashboard/page.tsx`)
- Administration → Access guards: requires user (evidence: `src/app/admin/page.tsx`)
- Administration → Feedback mapping: resolves feedback (evidence: `src/app/admin/page.tsx`)
