# sammoreno18/golazoapp architecture

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

- Interactive diagram: https://gitdiagram.com/sammoreno18/golazoapp
- Repository: https://github.com/sammoreno18/golazoapp

## Overview

##### Project Type and Purpose
- The README and file tree reveal a full-stack system with multiple frontends—a modern mobile application ("golazo-app") built with a React/TypeScript framework (using Expo/TSX components), and at least one web interface (see directories “web” and “appMovil/web” which use PHP).
- The backend is clearly defined in the “golazoapi” directory, implemented with NestJS and structured modularly (see modules like users, team, matches, league, lodging, etc.).
- The project is meant to handle large volumes of real-time soccer match data, user management (including OAuth integrations), live streaming of results, notifications, and support for tourism and transportation data.

##### File Structure
- Mobile App Components:
- “golazo-app” contains a mobile client with a clear component structure (using folders like “app/(drawer)” for navigation routes, shared UI components in “components/ui”, and configuration files such as babel.config.js, tailwind.config.js, and tsconfig.json).
- The .expo directory suggests Expo is being used for rapid mobile development.
- Backend Components:
- “golazoapi” is a NestJS-powered backend with modular separation (modules for car-rental, league, locations, lodging, matches, restaurants, results, team, users, etc.), along with middleware for authorization and dedicated schemas for data validation.
- There are configuration files (nest-cli.json, tsconfig.json, etc.) and testing directories indicating good testing practices.
- Web/Legacy Components:
- Both “appMovil” and “web” directories show parallel implementations in PHP with similar file structures (separate API directories, controllers, views, and database resources). This might indicate legacy or alternative implementations.
- External integrations and configuration are suggested by the presence of environment/template files, SMTP configurations, and external styling/configuration with Tailwind and NativeWind for UI.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Mobile Frontend
    subgraph "Mobile Frontend"
        mNav["Mobile Navigation (Drawer)"]:::mobile
        mUI["Mobile UI Components"]:::mobile
        mClient["Mobile Client"]:::mobile
        mNav --> mClient
        mUI --> mClient
    end

    %% Web Frontend
    subgraph "Web Frontend"
        legacy["Legacy/Mobile Web Interface (PHP)"]:::web
        desktop["Desktop Web Interface (PHP)"]:::web
    end

    %% Backend API
    subgraph "Backend API"
        api["Backend API"]:::backend
        subgraph "Modules"
            users["Users Module"]:::backend
            matches["Matches Module"]:::backend
            team["Team Module"]:::backend
            league["League Module"]:::backend
            lodging["Lodging Module"]:::backend
            carRental["Car Rental Module"]:::backend
            locations["Locations Module"]:::backend
            restaurants["Restaurants Module"]:::backend
            results["Results Module"]:::backend
        end
        middleware["Authorization Middleware"]:::backend
        smtp["SMTP/External Integrations"]:::backend
        api --> users
        api --> matches
        api --> team
        api --> league
        api --> lodging
        api --> carRental
        api --> locations
        api --> restaurants
        api --> results
        api --> middleware
        api --> smtp
    end

    %% Data Layer
    subgraph "Data Layer"
        dbMain["Database/Caching"]:::database
        dbMobile["Mobile DB Resources"]:::database
        dbDesktop["Desktop DB Resources"]:::database
    end

    %% External Services
    external["External Services (OAuth,GoogleMaps,PushNotifications)"]:::external

    %% Relationships
    mClient -->|"HTTP" | api
    legacy -->|"HTTP" | api
    desktop -->|"HTTP" | api
    api -->|"CRUD" | dbMain
    legacy -->|"Uses" | dbMobile
    desktop -->|"Uses" | dbDesktop
    api -->|"Integrates" | external
    mClient -->|"Realtime" | external

    %% Click Events for Mobile Frontend
    click mClient "https://github.com/sammoreno18/golazoapp/tree/main/golazo-app"
    click mNav "https://github.com/sammoreno18/golazoapp/tree/main/golazo-app/app/(drawer)"
    click mUI "https://github.com/sammoreno18/golazoapp/tree/main/golazo-app/components/ui"

    %% Click Events for Backend API and Modules
    click api "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi"
    click users "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/users"
    click matches "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/matches"
    click team "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/team"
    click league "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/league"
    click lodging "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/lodging"
    click carRental "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/car-rental"
    click locations "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/locations"
    click restaurants "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/restaurants"
    click results "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/src/results"
    click middleware "https://github.com/sammoreno18/golazoapp/blob/main/golazoapi/src/middleware/JWTAuthorization.middleware.ts"
    click smtp "https://github.com/sammoreno18/golazoapp/tree/main/golazoapi/SMTP"

    %% Click Events for Web Frontend and Database
    click legacy "https://github.com/sammoreno18/golazoapp/tree/main/appMovil/web"
    click desktop "https://github.com/sammoreno18/golazoapp/tree/main/web/web"
    click dbMobile "https://github.com/sammoreno18/golazoapp/tree/main/appMovil/recursos/database"
    click dbDesktop "https://github.com/sammoreno18/golazoapp/tree/main/web/recursos/database"

    %% Styles
    classDef mobile fill:#FFCC00,stroke:#000,stroke-width:2px;
    classDef web fill:#66FF66,stroke:#000,stroke-width:2px;
    classDef backend fill:#66CCFF,stroke:#000,stroke-width:2px;
    classDef database fill:#CCFFCC,stroke:#000,stroke-width:2px;
    classDef external fill:#FF99CC,stroke:#000,stroke-width:2px;
```
