# samarthtiku/team1-mars-rover-kata-winston_nahum_sam- architecture

> Architecture diagram of the GitHub repository samarthtiku/team1-mars-rover-kata-winston_nahum_sam-, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/samarthtiku/team1-mars-rover-kata-winston_nahum_sam-
- Repository: https://github.com/samarthtiku/team1-mars-rover-kata-winston_nahum_sam-

## Overview

##### Main Components

a) Application Layer:
- Entry point (MarsRoverApplication)
- Program orchestrator (MarsRoverProgram)
- As the top-level component that coordinates all operations

b) Model Layer:
- AbstractRover (base class)
- StandardRover and JumpingRover (implementations)
- Plateau (representing the grid)
- Orientation (enum)

c) Service Layer:
- As a separate component showing:
- InputHandler interface and ConsoleInputHandler implementation
- RoverFactory interface and RoverFactoryImpl
- Factory pattern relationships

d) Utility Layer:
- Supporting components:
- PlateauVisualizer
- Configuration

##### Component Relationships

- MarsRoverProgram → RoverFactory (creation)
- MarsRoverProgram → InputHandler (user input)
- RoverFactory → AbstractRover/Concrete Rovers (instantiation)
- AbstractRover → Plateau (navigation)
- PlateauVisualizer → Plateau (visualization)

##### Design Patterns Visualization

- Factory Pattern (RoverFactory)
- Command Pattern (for movement commands)
- Strategy Pattern (for movement algorithms)

##### Data Flow

Flow of:
- User input through InputHandler
- Command processing through the program
- Rover movement on the Plateau
- Visualization output

##### Specific Elements

a) Components:
**┌─────────────────┐**
- Application    │
- Layer         │
- ┬────────┘
- ↓
**┌─────────────────┐**
- Service Layer  │
- ┬────────┘
- ↓
**┌─────────────────┐**
- Model Layer    │
- ┬────────┘
- ↓
**┌─────────────────┐**
- Utility Layer  │
- ┘

- Interfaces (ovals)
- Concrete classes (rectangles)
- Enums (hexagons)

- Blue: Core components
- Green: Service layer
- Yellow: Model layer
- Gray: Utility components

##### Technical Notes

- Java 17 as the platform
- Gradle as build tool
- CI/CD integration points
- Test coverage indicators

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef application fill:#2196F3,stroke:#1565C0,color:white
    classDef service fill:#4CAF50,stroke:#388E3C,color:white
    classDef model fill:#FFC107,stroke:#FFA000,color:black
    classDef utility fill:#9E9E9E,stroke:#616161,color:white
    classDef interface fill:none,stroke:#000,stroke-dasharray: 5 5

    %% Application Layer
    subgraph AppLayer["Application Layer"]
        MarsRoverApp["MarsRoverApplication"]
        MarsRoverProg["MarsRoverProgram"]
    end

    %% Service Layer
    subgraph ServiceLayer["Service Layer"]
        InputHandler["InputHandler"]:::interface
        ConsoleInput["ConsoleInputHandler"]
        RoverFactory["RoverFactory"]:::interface
        RoverFactoryImpl["RoverFactoryImpl"]
    end

    %% Model Layer
    subgraph ModelLayer["Model Layer"]
        AbstractRover["AbstractRover"]
        StandardRover["StandardRover"]
        JumpingRover["JumpingRover"]
        Plateau["Plateau"]
        Orientation["Orientation"]
    end

    %% Utility Layer
    subgraph UtilLayer["Utility Layer"]
        PlateauVis["PlateauVisualizer"]
        Config["Configuration"]
    end

    %% Relationships
    MarsRoverApp --> MarsRoverProg
    MarsRoverProg --> RoverFactory
    MarsRoverProg --> InputHandler
    InputHandler --> ConsoleInput
    RoverFactory --> RoverFactoryImpl
    RoverFactoryImpl --> AbstractRover
    AbstractRover --> StandardRover
    AbstractRover --> JumpingRover
    AbstractRover --> Plateau
    Plateau --> PlateauVis
    Config --> MarsRoverProg

    %% Click Events
    click MarsRoverApp "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/application/MarsRoverApplication.java"
    click MarsRoverProg "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/application/MarsRoverProgram.java"
    click AbstractRover "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/model/AbstractRover.java"
    click StandardRover "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/model/StandardRover.java"
    click JumpingRover "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/model/JumpingRover.java"
    click Plateau "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/model/Plateau.java"
    click Orientation "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/model/Orientation.java"
    click InputHandler "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/service/InputHandler.java"
    click ConsoleInput "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/service/ConsoleInputHandler.java"
    click RoverFactory "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/service/RoverFactory.java"
    click RoverFactoryImpl "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/service/RoverFactoryImpl.java"
    click PlateauVis "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/util/PlateauVisualizer.java"
    click Config "https://github.com/samarthtiku/TEAM1-MARS-ROVER-KATA-WINSTON_NAHUM_SAM-/blob/seventh-Branch/src/main/java/com/marsrover/util/Configuration.java"

    %% Style Applications
    class MarsRoverApp,MarsRoverProg application
    class InputHandler,ConsoleInput,RoverFactory,RoverFactoryImpl service
    class AbstractRover,StandardRover,JumpingRover,Plateau,Orientation model
    class PlateauVis,Config utility
```
