# atharva1479/crick-live-score-app architecture

> Architecture diagram of the GitHub repository atharva1479/crick-live-score-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/atharva1479/crick-live-score-app
- Repository: https://github.com/atharva1479/crick-live-score-app

## Overview

##### Project type and purpose
- This is a full-stack web application called CrickScore.
- Purpose: provide real-time live cricket scores, match history, and IPL point tables via a modern UI.

##### File structure
- Top level: two directories `front-end` (Angular 17 + Tailwind CSS) and `back-end` (Spring Boot + Maven).
- Front-end has an Angular CLI project with components, pages, a central `ApiService` for REST calls, and `server.ts`/`main.server.ts` for optional SSR or custom Node hosting.
- Back-end follows standard Spring Boot MVC:
- `controllers/` expose REST endpoints
- `services/` define business logic
- `repositories/` interface with a MySQL database
- `entities/` model domain objects
- Maven wrapper and `application.properties` holds DB config

##### README for additional insights
- Tech stack: Angular 17, Tailwind, Spring Boot, MySQL.
- Features: real-time updates imply polling or push (websocket) from the back end to front end.
- Deployment: front end served from `localhost:4200` or Node (SSR), back end at `localhost:8080`.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Front-end Tier
    subgraph "Front-end Tier"
        direction TB
        Browser["User Browser"]:::ui
        AngularApp["Angular Application"]:::ui
        Components["Angular Components"]:::ui
        Pages["Angular Pages"]:::ui
        Router["Angular Router Config"]:::ui
        ApiService["ApiService (HTTP Client)"]:::ui
        EnvConfig["Environment Config"]:::config
        Tailwind["Tailwind CSS Config"]:::config
        CLIConfig["Angular Build & CLI Config"]:::config
        NodeServer["Node/Express SSR Server"]:::server
        UniversalBootstrap["Angular Universal Bootstrap"]:::server
        Browser -->|"loads UI"| AngularApp
        AngularApp -->|"renders components"| Components
        AngularApp -->|"navigates pages"| Pages
        AngularApp -->|"uses router"| Router
        AngularApp -->|"calls REST"| ApiService
        AngularApp -.->|"optional SSR"| NodeServer
        NodeServer -->|"bootstraps"| UniversalBootstrap
        AngularApp -->|"reads env"| EnvConfig
        AngularApp -->|"build config"| CLIConfig
        AngularApp -->|"styling config"| Tailwind
    end

    %% Back-end Tier
    subgraph "Back-end Tier"
        direction TB
        SpringBootApp["Spring Boot Application"]:::server
        Controllers["REST Controllers"]:::service
        Services["Service Layer"]:::service
        Repositories["Repository Layer"]:::service
        Entities["Entity Models"]:::service
        AppConfig["Application Config"]:::config
        Build["Maven Build & Wrapper"]:::config
        SpringBootApp -->|"exposes endpoints"| Controllers
        Controllers -->|"calls business logic"| Services
        Services -->|"accesses data"| Repositories
        Repositories -->|"maps to entities"| Entities
        SpringBootApp -->|"loads properties"| AppConfig
        SpringBootApp -->|"build process"| Build
    end

    %% Database
    MySQL["MySQL Database"]:::database
    Repositories -->|"CRUD via JPA"| MySQL

    %% Front-end to Back-end
    ApiService -->|"HTTP calls on :8080"| Controllers

    %% Click events Front-end
    click AngularApp "https://github.com/atharva1479/crick-live-score-app/tree/main/front-end/src/app"
    click Components "https://github.com/atharva1479/crick-live-score-app/tree/main/front-end/src/app/components/live-match-card"
    click Pages "https://github.com/atharva1479/crick-live-score-app/tree/main/front-end/src/app/pages"
    click Router "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/src/app/app.routes.ts"
    click ApiService "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/src/app/services/api.service.ts"
    click NodeServer "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/server.ts"
    click UniversalBootstrap "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/src/main.server.ts"
    click EnvConfig "https://github.com/atharva1479/crick-live-score-app/tree/main/front-end/src/environments"
    click Tailwind "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/tailwind.config.js"
    click CLIConfig "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/angular.json"
    click CLIConfig "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/tsconfig.json"
    click CLIConfig "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/tsconfig.app.json"
    click CLIConfig "https://github.com/atharva1479/crick-live-score-app/blob/main/front-end/tsconfig.spec.json"

    %% Click events Back-end
    click SpringBootApp "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/CrickbackendApplication.java"
    click Controllers "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/controllers/CricketController.java"
    click Services "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/services/CricketService.java"
    click Services "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/services/impl/CricketServiceImpl.java"
    click Repositories "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/repositories/MatchRepo.java"
    click Entities "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/entities/Match.java"
    click Entities "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/java/com/crick/apis/entities/MatchStatus.java"
    click AppConfig "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/src/main/resources/application.properties"
    click Build "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/pom.xml"
    click Build "https://github.com/atharva1479/crick-live-score-app/tree/main/back-end/mvnw"
    click Build "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/mvnw.cmd"
    click Build "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/.mvn/wrapper/maven-wrapper.properties"
    click Build "https://github.com/atharva1479/crick-live-score-app/blob/main/back-end/.mvn/wrapper/maven-wrapper.jar"

    %% Styles
    classDef ui fill:#e3f2fd,stroke:#64b5f6,stroke-width:2px
    classDef server fill:#e8f5e9,stroke:#66bb6a,stroke-width:2px
    classDef service fill:#fff3e0,stroke:#ffa726,stroke-width:2px
    classDef database fill:#ffebee,stroke:#ef5350,stroke-width:2px
    classDef config fill:#eceff1,stroke:#90a4ae,stroke-width:2px
    class Browser,AngularApp,Components,Pages,Router,ApiService ui
    class NodeServer,UniversalBootstrap,SpringBootApp server
    class Controllers,Services,Repositories,Entities service
    class MySQL database
    class EnvConfig,Tailwind,CLIConfig,AppConfig,Build config
```
