# 5464-frc/template-2027 architecture

> Architecture diagram of the GitHub repository 5464-frc/template-2027, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/5464-frc/template-2027
- Repository: https://github.com/5464-frc/template-2027

## Overview

This is a small WPILib CommandV3 robot template. The runtime starts the robot, registers a simulated trigger to schedule a clock command, and runs the command scheduler periodically. Its reusable command factory abstracts command declarations and can log elapsed time; SimTrigger exposes DogLog-tunable state as a BooleanSupplier. The examples are reference code, though Robot uses the clock example. The clock implementation was not sampled, so its internal behavior is omitted; other unsampled mechanisms are not inferred.

Main entry points: [`src/main/java/first/robot/Robot.java`](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/Robot.java) (Robot runtime), [`src/main/java/first/robot/CommandFactory.java`](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/CommandFactory.java) (Command factory), [`src/main/java/first/robot/SimTrigger.java`](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/SimTrigger.java) (Simulated trigger), [`src/main/java/first/Main.java`](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/Main.java) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Robot lifecycle"]
  node_main["Application entry<br/>[Main.java]"]
  node_robot["Robot runtime<br/>[Robot.java]"]
end

subgraph group_commands["Command patterns"]
  node_clock["Clock example<br/>[Clock.java]"]
  node_command_factory["Command factory"]
  node_example_command["Command example<br/>[Command.java]"]
end

subgraph group_simulation["Simulation and telemetry"]
  node_sim_trigger["Simulated trigger<br/>[SimTrigger.java]"]
end

node_wpilib["WPILib framework"]
node_doglog["DogLog"]

node_main -->|"starts"| node_robot
node_robot -->|"extends and runs"| node_wpilib
node_robot -->|"schedules command"| node_clock
node_robot -->|"reads supplier"| node_sim_trigger
node_robot -->|"registers trigger"| node_wpilib
node_command_factory -->|"creates command"| node_wpilib
node_command_factory -->|"documents implementation"| node_example_command
node_sim_trigger -->|"creates tunable"| node_doglog
node_command_factory -->|"logs timing"| node_doglog

click node_main "https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/Main.java"
click node_robot "https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/Robot.java"
click node_clock "https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/examples/mechanisms/Clock.java"
click node_command_factory "https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/CommandFactory.java"
click node_example_command "https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/examples/mechanisms/Command.java"
click node_sim_trigger "https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/SimTrigger.java"

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_main,node_robot toneBlue
class node_clock,node_command_factory,node_example_command toneAmber
class node_sim_trigger toneMint
class node_wpilib,node_doglog toneIndigo
```

## Components

### Robot lifecycle

- [Application entry](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/Main.java): `src/main/java/first/Main.java`
- [Robot runtime](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/Robot.java): `src/main/java/first/robot/Robot.java`

### Command patterns

- [Clock example](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/examples/mechanisms/Clock.java): `src/main/java/first/robot/examples/mechanisms/Clock.java`
- [Command factory](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/CommandFactory.java): `src/main/java/first/robot/CommandFactory.java`
- [Command example](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/examples/mechanisms/Command.java): `src/main/java/first/robot/examples/mechanisms/Command.java`

### Simulation and telemetry

- [Simulated trigger](https://github.com/5464-frc/template-2027/blob/main/src/main/java/first/robot/SimTrigger.java): `src/main/java/first/robot/SimTrigger.java`

### Other components

- **WPILib framework**
- **DogLog**

## Connections

- Application entry → Robot runtime: starts (evidence: `src/main/java/first/Main.java`)
- Robot runtime → WPILib framework: extends and runs (evidence: `src/main/java/first/robot/Robot.java`)
- Robot runtime → Clock example: schedules command (evidence: `src/main/java/first/robot/Robot.java`)
- Robot runtime → Simulated trigger: reads supplier (evidence: `src/main/java/first/robot/Robot.java`)
- Robot runtime → WPILib framework: registers trigger (evidence: `src/main/java/first/robot/Robot.java`)
- Command factory → WPILib framework: creates command (evidence: `src/main/java/first/robot/CommandFactory.java`)
- Command factory → Command example: documents implementation (evidence: `src/main/java/first/robot/CommandFactory.java`)
- Simulated trigger → DogLog: creates tunable (evidence: `src/main/java/first/robot/SimTrigger.java`)
- Command factory → DogLog: logs timing (evidence: `src/main/java/first/robot/CommandFactory.java`)
