# tiagocavaler/motoprojetofinal07-main architecture

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

- Interactive diagram: https://gitdiagram.com/tiagocavaler/motoprojetofinal07-main
- Repository: https://github.com/tiagocavaler/motoprojetofinal07-main

## Overview

This is a Palworld-themed web portal and shop. Its visible product areas include browsing a catalog and product details, cart and payment, customer accounts and orders, admin management, breeding/map guides, and game news and patch notes. The sampled server routes show authentication split across Supabase and a Java service, product listings from local image folders, and order/customer API proxying to Java. Evidence is limited: the README is uninformative and most UI source was not sampled, so page-to-page and UI-to-API wiring is not asserted where it cannot be verified.

Main entry points: [`front/app/(auth)/login/page.tsx`](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(auth)/login/page.tsx) (Sign-in and registration), [`front/app/api/popular/route.ts`](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/popular/route.ts) (Product import API), [`front/app/api/auth/login/route.ts`](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/login/route.ts) (Login API), [`front/app/guia/breeding/page.tsx`](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/guia/breeding/page.tsx) (Breeding guide)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shop["Shop and orders"]
  node_catalog["Catalog<br/>[page.tsx]"]
  node_product["Product details<br/>[page.tsx]"]
  node_cart["Cart<br/>[page.tsx]"]
  node_payment["Payment<br/>[page.tsx]"]
  node_orders["Order history<br/>[page.tsx]"]
  node_order["Order detail<br/>[page.tsx]"]
end

subgraph group_accounts["Accounts and admin"]
  node_auth_pages["Sign-in and registration<br/>[page.tsx]"]
  node_forgot_page["Password recovery<br/>[page.tsx]"]
  node_profile["Customer profile<br/>[page.tsx]"]
  node_admin["Admin workspace<br/>[page.tsx]"]
end

subgraph group_game["Game guides and news"]
  node_breeding["Breeding guide<br/>[page.tsx]"]
  node_map["World map<br/>[page.tsx]"]
  node_news["News feed<br/>[route.ts]"]
  node_patches["Patch notes API<br/>[route.ts]"]
end

subgraph group_services["Server integrations"]
  node_items_api["Item listing API<br/>[route.ts]"]
  node_popular_api["Product import API<br/>[route.ts]"]
  node_avatars["Avatar listing API<br/>[route.ts]"]
  node_login_api["Login API<br/>[route.ts]"]
  node_register_api["Registration API<br/>[route.ts]"]
  node_forgot_api["Recovery API<br/>[route.ts]"]
  node_customer_api["Customer API<br/>[route.ts]"]
  node_pedido_api["Order API<br/>[route.ts]"]
  node_pals_api["Pal data API<br/>[route.ts]"]
  node_image_api["Pal image API<br/>[route.ts]"]
end

node_visitor(("Shopper / visitor"))
node_steam["Steam news service"]
node_java["Java backend"]
node_supabase[("Supabase")]
node_image_cdns["Pal image CDNs"]

node_visitor -->|"browses"| node_catalog
node_visitor -->|"signs in"| node_auth_pages
node_visitor -->|"views guide"| node_breeding
node_visitor -->|"views map"| node_map
node_items_api -.-> node_popular_api
node_popular_api -->|"writes products"| node_supabase
node_auth_pages -.->|"submits credentials"| node_login_api
node_login_api -->|"authenticates"| node_supabase
node_register_api -->|"forwards registration"| node_java
node_forgot_api -->|"requests reset"| node_supabase
node_customer_api -->|"proxies customer calls"| node_java
node_pedido_api -->|"proxies orders"| node_java
node_avatars -.->|"provides avatar list"| node_profile
node_pals_api -.->|"provides Pal data"| node_breeding
node_image_api -.->|"fetches fallback images"| node_image_cdns
node_news -->|"fetches news"| node_steam
node_patches -->|"fetches patches"| node_steam

click node_catalog "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/catalogo/page.tsx"
click node_product "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/produto/%5Bid%5D/page.tsx"
click node_cart "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/carrinho/page.tsx"
click node_payment "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/pagamento/page.tsx"
click node_orders "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/pedidos/page.tsx"
click node_order "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/pedido/page.tsx"
click node_items_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/itens/route.ts"
click node_popular_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/popular/route.ts"
click node_auth_pages "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(auth)/login/page.tsx"
click node_forgot_page "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(auth)/esqueci/page.tsx"
click node_profile "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/cliente/page.tsx"
click node_admin "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/admin/page.tsx"
click node_avatars "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/avatares/route.ts"
click node_login_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/login/route.ts"
click node_register_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/register/route.ts"
click node_forgot_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/forgot/route.ts"
click node_customer_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/cliente/route.ts"
click node_pedido_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/pedido/route.ts"
click node_breeding "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/guia/breeding/page.tsx"
click node_map "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/guia/mapa/page.tsx"
click node_pals_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/pals/route.ts"
click node_image_api "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/pal-image/route.ts"
click node_news "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/novidades/route.ts"
click node_patches "https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/patch-notes/route.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_catalog,node_product,node_cart,node_payment,node_orders,node_order toneBlue
class node_auth_pages,node_forgot_page,node_profile,node_admin,node_supabase toneAmber
class node_breeding,node_map,node_news,node_patches toneMint
class node_items_api,node_popular_api,node_avatars,node_login_api,node_register_api,node_forgot_api,node_customer_api,node_pedido_api,node_pals_api,node_image_api toneRose
class node_visitor,node_steam,node_java,node_image_cdns toneIndigo
```

## Components

### Shop and orders

- [Catalog](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/catalogo/page.tsx): `front/app/(sistema)/catalogo/page.tsx`
- [Product details](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/produto/%5Bid%5D/page.tsx): `front/app/(sistema)/produto/[id]/page.tsx`
- [Cart](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/carrinho/page.tsx): `front/app/(sistema)/carrinho/page.tsx`
- [Payment](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/pagamento/page.tsx): `front/app/(sistema)/pagamento/page.tsx`
- [Order history](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/pedidos/page.tsx): `front/app/(sistema)/pedidos/page.tsx`
- [Order detail](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/pedido/page.tsx): `front/app/(sistema)/pedido/page.tsx`

### Accounts and admin

- [Sign-in and registration](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(auth)/login/page.tsx): `front/app/(auth)/login/page.tsx`
- [Password recovery](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(auth)/esqueci/page.tsx): `front/app/(auth)/esqueci/page.tsx`
- [Customer profile](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/(sistema)/cliente/page.tsx): `front/app/(sistema)/cliente/page.tsx`
- [Admin workspace](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/admin/page.tsx): `front/app/admin/page.tsx`

### Game guides and news

- [Breeding guide](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/guia/breeding/page.tsx): `front/app/guia/breeding/page.tsx`
- [World map](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/guia/mapa/page.tsx): `front/app/guia/mapa/page.tsx`
- [News feed](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/novidades/route.ts): `front/app/api/novidades/route.ts`
- [Patch notes API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/patch-notes/route.ts): `front/app/api/patch-notes/route.ts`

### Server integrations

- [Item listing API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/itens/route.ts): `front/app/api/itens/route.ts`
- [Product import API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/popular/route.ts): `front/app/api/popular/route.ts`
- [Avatar listing API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/avatares/route.ts): `front/app/api/avatares/route.ts`
- [Login API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/login/route.ts): `front/app/api/auth/login/route.ts`
- [Registration API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/register/route.ts): `front/app/api/auth/register/route.ts`
- [Recovery API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/auth/forgot/route.ts): `front/app/api/auth/forgot/route.ts`
- [Customer API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/cliente/route.ts): `front/app/api/cliente/route.ts`
- [Order API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/pedido/route.ts): `front/app/api/pedido/route.ts`
- [Pal data API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/pals/route.ts): `front/app/api/pals/route.ts`
- [Pal image API](https://github.com/tiagocavaler/motoprojetofinal07-main/blob/main/front/app/api/pal-image/route.ts): `front/app/api/pal-image/route.ts`

### Other components

- **Shopper / visitor**
- **Steam news service**
- **Java backend**
- **Supabase**
- **Pal image CDNs**

## Connections

- Shopper / visitor → Catalog: browses
- Shopper / visitor → Sign-in and registration: signs in
- Shopper / visitor → Breeding guide: views guide
- Shopper / visitor → World map: views map
- Item listing API → Product import API
- Product import API → Supabase: writes products
- Sign-in and registration → Login API: submits credentials
- Login API → Supabase: authenticates
- Registration API → Java backend: forwards registration
- Recovery API → Supabase: requests reset
- Customer API → Java backend: proxies customer calls
- Order API → Java backend: proxies orders
- Avatar listing API → Customer profile: provides avatar list
- Pal data API → Breeding guide: provides Pal data
- Pal image API → Pal image CDNs: fetches fallback images
- News feed → Steam news service: fetches news
- Patch notes API → Steam news service: fetches patches
