# gabriellatcc/poketeamup architecture

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

- Interactive diagram: https://gitdiagram.com/gabriellatcc/poketeamup
- Repository: https://github.com/gabriellatcc/poketeamup

## Overview

PokeTeam Up is a Pokémon team-building web application: users browse or search Pokémon, assemble and manage teams, and authenticate through a Next.js client backed by a Laravel API. The graph follows the documented client/API split and the source-visible controller, repository, and model relationships. README capabilities include team strategy and account verification; some frontend wiring and those feature implementations were not shown, so uncertain links are dashed or omitted.

Main entry points: [`frontend/src/app/myteams/page.tsx`](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/myteams/page.tsx) (My teams), [`backend/app/Repositories/PokeApiRepository.php`](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Repositories/PokeApiRepository.php) (Pokémon data), [`backend/app/Models/User.php`](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/User.php) (User model), [`backend/routes/auth.php`](https://github.com/gabriellatcc/poketeamup/blob/main/backend/routes/auth.php) (Auth routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_home["Home page<br/>[page.tsx]"]
  node_pokedex["Pokédex<br/>[page.tsx]"]
  node_pokemon_detail["Pokémon details<br/>[page.tsx]"]
  node_team_page["My teams<br/>[page.tsx]"]
  node_selector["Pokémon selector"]
  node_team_card["Team card<br/>[TeamCard.tsx]"]
  node_team_details["Team details"]
  node_signin["Sign in<br/>[page.tsx]"]
  node_signup["Sign up<br/>[page.tsx]"]
  node_auth_hook["Auth state<br/>[useAuth.ts]"]
  node_http_client["API client<br/>[axios.ts]"]
end

subgraph group_api["Laravel API"]
  node_api_routes["API routes<br/>[api.php]"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_pokemon_controller["Pokémon API"]
  node_team_controller["Team API<br/>[TeamController.php]"]
end

subgraph group_domain["Domain and integrations"]
  node_user_model["User model<br/>[User.php]"]
  node_team_model["Team model<br/>[Team.php]"]
  node_pokemon_model["Pokémon model<br/>[Pokemon.php]"]
  node_poke_controller["Pokémon data"]
  node_poke_interface["PokeAPI contract"]
  node_poke_response["Pokémon response"]
end

subgraph group_identity["Account access"]
  node_registration["Registration"]
  node_sessions["Login and logout"]
  node_verification["Email verification"]
  node_login_request["Login validation<br/>[LoginRequest.php]"]
  node_register_request["Registration validation"]
  node_auth_service["Auth service<br/>[AuthService.php]"]
end

node_user(("User"))
node_pokeapi{{"PokéAPI"}}
node_mysql[("MySQL")]

node_user -->|"uses"| node_home
node_user -->|"browses"| node_pokedex
node_user -->|"manages teams"| node_team_page
node_user -.->|"authenticates"| node_signin
node_user -.->|"registers"| node_signup
node_pokedex -.->|"requests data"| node_http_client
node_team_page -.->|"requests teams"| node_http_client
node_signin -.->|"uses auth"| node_auth_hook
node_signup -.->|"uses auth"| node_auth_hook
node_http_client -.->|"calls API"| node_api_routes
node_api_routes -->|"routes Pokémon"| node_pokemon_controller
node_api_routes -->|"routes teams"| node_team_controller
node_auth_routes -->|"routes registration"| node_registration
node_auth_routes -->|"routes sessions"| node_sessions
node_auth_routes -->|"routes verification"| node_verification
node_registration -->|"validates with"| node_register_request
node_registration -->|"creates user"| node_user_model
node_sessions -->|"authenticates with"| node_login_request
node_pokemon_controller -->|"fetches Pokémon"| node_poke_controller
node_team_controller -->|"creates and queries"| node_team_model
node_team_model -->|"belongs to"| node_user_model
node_team_model -->|"relates Pokémon"| node_pokemon_model
node_poke_controller -->|"implements"| node_poke_interface
node_poke_controller -->|"builds responses"| node_poke_response
node_poke_controller -->|"requests data"| node_pokeapi
node_team_controller -.->|"persists teams"| node_mysql
node_user_model -.->|"persists accounts"| node_mysql
node_selector -.->|"supports team selection"| node_team_page
node_team_card -.->|"displays teams"| node_team_page
node_team_details -.->|"shows team details"| node_team_page
node_auth_service -->|"creates user"| node_user_model

click node_home "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/page.tsx"
click node_pokedex "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/pokedex/page.tsx"
click node_pokemon_detail "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/pokemon/%5Bid%5D/page.tsx"
click node_team_page "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/myteams/page.tsx"
click node_selector "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/components/PokemonSelectorPanel/PokemonSelectorPanel.tsx"
click node_team_card "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/components/TeamCard/TeamCard.tsx"
click node_team_details "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/components/TeamDetailsPanel/TeamDetailsPanel.tsx"
click node_signin "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/signin/page.tsx"
click node_signup "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/signup/page.tsx"
click node_auth_hook "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/hooks/useAuth.ts"
click node_http_client "https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/lib/axios.ts"
click node_api_routes "https://github.com/gabriellatcc/poketeamup/blob/main/backend/routes/api.php"
click node_auth_routes "https://github.com/gabriellatcc/poketeamup/blob/main/backend/routes/auth.php"
click node_pokemon_controller "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Api/PokemonController.php"
click node_team_controller "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Api/TeamController.php"
click node_registration "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_sessions "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_verification "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Auth/VerifyEmailController.php"
click node_login_request "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Requests/Auth/LoginRequest.php"
click node_register_request "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Requests/Auth/RegisterRequest.php"
click node_auth_service "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Services/AuthService.php"
click node_user_model "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/User.php"
click node_team_model "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/Team.php"
click node_pokemon_model "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/Pokemon.php"
click node_poke_controller "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Repositories/PokeApiRepository.php"
click node_poke_interface "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Interfaces/PokeApiInterface.php"
click node_poke_response "https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/PokeApiResponse.php"

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_home,node_pokedex,node_pokemon_detail,node_team_page,node_selector,node_team_card,node_team_details,node_signin,node_signup,node_auth_hook,node_http_client,node_user toneBlue
class node_api_routes,node_auth_routes,node_pokemon_controller,node_team_controller,node_mysql toneAmber
class node_user_model,node_team_model,node_pokemon_model,node_poke_controller,node_poke_interface,node_poke_response,node_pokeapi toneMint
class node_registration,node_sessions,node_verification,node_login_request,node_register_request,node_auth_service toneRose
```

## Components

### Web client

- [Home page](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/page.tsx): `frontend/src/app/page.tsx`
- [Pokédex](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/pokedex/page.tsx): `frontend/src/app/pokedex/page.tsx`
- [Pokémon details](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/pokemon/%5Bid%5D/page.tsx): `frontend/src/app/pokemon/[id]/page.tsx`
- [My teams](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/myteams/page.tsx): `frontend/src/app/myteams/page.tsx`
- [Pokémon selector](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/components/PokemonSelectorPanel/PokemonSelectorPanel.tsx): `frontend/components/PokemonSelectorPanel/PokemonSelectorPanel.tsx`
- [Team card](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/components/TeamCard/TeamCard.tsx): `frontend/components/TeamCard/TeamCard.tsx`
- [Team details](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/components/TeamDetailsPanel/TeamDetailsPanel.tsx): `frontend/components/TeamDetailsPanel/TeamDetailsPanel.tsx`
- [Sign in](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/signin/page.tsx): `frontend/src/app/signin/page.tsx`
- [Sign up](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/app/signup/page.tsx): `frontend/src/app/signup/page.tsx`
- [Auth state](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/hooks/useAuth.ts): `frontend/src/hooks/useAuth.ts`
- [API client](https://github.com/gabriellatcc/poketeamup/blob/main/frontend/src/lib/axios.ts): `frontend/src/lib/axios.ts`

### Laravel API

- [API routes](https://github.com/gabriellatcc/poketeamup/blob/main/backend/routes/api.php): `backend/routes/api.php`
- [Auth routes](https://github.com/gabriellatcc/poketeamup/blob/main/backend/routes/auth.php): `backend/routes/auth.php`
- [Pokémon API](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Api/PokemonController.php): `backend/app/Http/Controllers/Api/PokemonController.php`
- [Team API](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Api/TeamController.php): `backend/app/Http/Controllers/Api/TeamController.php`

### Domain and integrations

- [User model](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/User.php): `backend/app/Models/User.php`
- [Team model](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/Team.php): `backend/app/Models/Team.php`
- [Pokémon model](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/Pokemon.php): `backend/app/Models/Pokemon.php`
- [Pokémon data](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Repositories/PokeApiRepository.php): `backend/app/Repositories/PokeApiRepository.php`
- [PokeAPI contract](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Interfaces/PokeApiInterface.php): `backend/app/Interfaces/PokeApiInterface.php`
- [Pokémon response](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Models/PokeApiResponse.php): `backend/app/Models/PokeApiResponse.php`

### Account access

- [Registration](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Auth/RegisteredUserController.php): `backend/app/Http/Controllers/Auth/RegisteredUserController.php`
- [Login and logout](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `backend/app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Email verification](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Controllers/Auth/VerifyEmailController.php): `backend/app/Http/Controllers/Auth/VerifyEmailController.php`
- [Login validation](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Requests/Auth/LoginRequest.php): `backend/app/Http/Requests/Auth/LoginRequest.php`
- [Registration validation](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Http/Requests/Auth/RegisterRequest.php): `backend/app/Http/Requests/Auth/RegisterRequest.php`
- [Auth service](https://github.com/gabriellatcc/poketeamup/blob/main/backend/app/Services/AuthService.php): `backend/app/Services/AuthService.php`

### Other components

- **User**
- **PokéAPI**
- **MySQL**

## Connections

- User → Home page: uses (evidence: `README.md`)
- User → Pokédex: browses (evidence: `README.md`)
- User → My teams: manages teams (evidence: `README.md`)
- User → Sign in: authenticates
- User → Sign up: registers
- Pokédex → API client: requests data
- My teams → API client: requests teams
- Sign in → Auth state: uses auth
- Sign up → Auth state: uses auth
- API client → API routes: calls API (evidence: `README.md`)
- API routes → Pokémon API: routes Pokémon (evidence: `backend/routes/api.php`)
- API routes → Team API: routes teams (evidence: `backend/routes/api.php`)
- Auth routes → Registration: routes registration (evidence: `backend/routes/auth.php`)
- Auth routes → Login and logout: routes sessions (evidence: `backend/routes/auth.php`)
- Auth routes → Email verification: routes verification (evidence: `backend/routes/auth.php`)
- Registration → Registration validation: validates with (evidence: `backend/app/Http/Controllers/Auth/RegisteredUserController.php`)
- Registration → User model: creates user (evidence: `backend/app/Http/Controllers/Auth/RegisteredUserController.php`)
- Login and logout → Login validation: authenticates with (evidence: `backend/app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Pokémon API → Pokémon data: fetches Pokémon (evidence: `backend/app/Http/Controllers/Api/PokemonController.php`)
- Team API → Team model: creates and queries (evidence: `backend/app/Http/Controllers/Api/TeamController.php`)
- Team model → User model: belongs to (evidence: `backend/app/Models/Team.php`)
- Team model → Pokémon model: relates Pokémon (evidence: `backend/app/Models/Team.php`)
- Pokémon data → PokeAPI contract: implements (evidence: `backend/app/Repositories/PokeApiRepository.php`)
- Pokémon data → Pokémon response: builds responses (evidence: `backend/app/Repositories/PokeApiRepository.php`)
- Pokémon data → PokéAPI: requests data (evidence: `backend/app/Repositories/PokeApiRepository.php`)
- Team API → MySQL: persists teams
- User model → MySQL: persists accounts
- Pokémon selector → My teams: supports team selection
- Team card → My teams: displays teams
- Team details → My teams: shows team details
- Auth service → User model: creates user (evidence: `backend/app/Services/AuthService.php`)
