# baihaqipcr/project-jamsostek architecture

> Architecture diagram of the GitHub repository baihaqipcr/project-jamsostek, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/baihaqipcr/project-jamsostek
- Repository: https://github.com/baihaqipcr/project-jamsostek

## Overview

This is a Laravel/Inertia application for recording and managing business potential (“potensi”), with user accounts and map, import, export, and SP1 document features. The main workflow is a user request routed to a controller, which validates and processes potensi data through Eloquent models, then returns a page or download. Authentication and profile management form a separate branch; Google sign-in is an optional external integration. The README describes Laravel rather than this application, so feature links rely on the sampled controller and source index; unsampled page and route details are not expanded.

Main entry points: [`app/Http/Controllers/PotensiController.php`](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/PotensiController.php) (Potensi controller), [`routes/auth.php`](https://github.com/baihaqipcr/project-jamsostek/blob/main/routes/auth.php) (Auth routes), [`app/Models/User.php`](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/User.php) (User records), [`routes/web.php`](https://github.com/baihaqipcr/project-jamsostek/blob/main/routes/web.php) (Web routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_potensi_pages["Potensi pages"]
  node_inertia_app["Inertia app<br/>[app.js]"]
  node_main_layout["Main layout<br/>[MainLayout.vue]"]
  node_error_boundary["Error boundary<br/>[ErrorBoundary.vue]"]
end

subgraph group_identity["Accounts"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_auth_controller["Session controller"]
  node_registration["Registration"]
  node_google_auth["Google sign-in"]
  node_profile_controller["Profile controller"]
end

subgraph group_domain["Potensi management"]
  node_potensi_controller["Potensi controller"]
  node_potensi_export["Potensi export<br/>[PotensiExport.php]"]
  node_template_export["Import template"]
end

subgraph group_data["Domain data"]
  node_potensi_store[("Potensi records<br/>[Potensi.php]")]
  node_program_store[("Program records<br/>[ProgramPotensi.php]")]
  node_user_store[("User records<br/>[User.php]")]
end

node_user(("User"))
node_google(("Google identity"))

node_user -->|"requests"| node_web_routes
node_web_routes -->|"routes to"| node_potensi_controller
node_potensi_controller -->|"reads and writes"| node_potensi_store
node_potensi_controller -->|"renders pages"| node_potensi_pages
node_potensi_controller -->|"downloads export"| node_potensi_export
node_potensi_controller -->|"downloads template"| node_template_export
node_potensi_store -->|"has many"| node_program_store
node_user -->|"requests"| node_auth_routes
node_auth_routes -->|"routes to"| node_auth_controller
node_auth_routes -->|"routes to"| node_registration
node_auth_routes -->|"routes to"| node_google_auth
node_auth_controller -->|"authenticates via"| node_user_store
node_registration -->|"creates user"| node_user_store
node_google_auth -->|"looks up and updates"| node_user_store
node_google_auth -->|"authenticates with"| node_google
node_web_routes -->|"routes to"| node_profile_controller
node_profile_controller -->|"updates account"| node_user_store
node_inertia_app -->|"applies layout"| node_main_layout
node_inertia_app -->|"wraps pages"| node_error_boundary

click node_web_routes "https://github.com/baihaqipcr/project-jamsostek/blob/main/routes/web.php"
click node_auth_routes "https://github.com/baihaqipcr/project-jamsostek/blob/main/routes/auth.php"
click node_potensi_controller "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/PotensiController.php"
click node_potensi_pages "https://github.com/baihaqipcr/project-jamsostek/tree/main/resources/js/Pages/Potensi"
click node_potensi_store "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/Potensi.php"
click node_program_store "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/ProgramPotensi.php"
click node_potensi_export "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Exports/PotensiExport.php"
click node_template_export "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Exports/PotensiTemplateExport.php"
click node_auth_controller "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_registration "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_google_auth "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/Auth/GoogleAuthController.php"
click node_profile_controller "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/ProfileController.php"
click node_user_store "https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/User.php"
click node_inertia_app "https://github.com/baihaqipcr/project-jamsostek/blob/main/resources/js/app.js"
click node_main_layout "https://github.com/baihaqipcr/project-jamsostek/blob/main/resources/js/Layouts/MainLayout.vue"
click node_error_boundary "https://github.com/baihaqipcr/project-jamsostek/blob/main/resources/js/Components/ErrorBoundary.vue"

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_web_routes,node_potensi_pages,node_inertia_app,node_main_layout,node_error_boundary,node_user toneBlue
class node_auth_routes,node_auth_controller,node_registration,node_google_auth,node_profile_controller toneAmber
class node_potensi_controller,node_potensi_export,node_template_export toneMint
class node_potensi_store,node_program_store,node_user_store toneRose
class node_google toneIndigo
```

## Components

### Web interface

- [Web routes](https://github.com/baihaqipcr/project-jamsostek/blob/main/routes/web.php): `routes/web.php`
- [Potensi pages](https://github.com/baihaqipcr/project-jamsostek/tree/main/resources/js/Pages/Potensi): `resources/js/Pages/Potensi`
- [Inertia app](https://github.com/baihaqipcr/project-jamsostek/blob/main/resources/js/app.js): `resources/js/app.js`
- [Main layout](https://github.com/baihaqipcr/project-jamsostek/blob/main/resources/js/Layouts/MainLayout.vue): `resources/js/Layouts/MainLayout.vue`
- [Error boundary](https://github.com/baihaqipcr/project-jamsostek/blob/main/resources/js/Components/ErrorBoundary.vue): `resources/js/Components/ErrorBoundary.vue`

### Accounts

- [Auth routes](https://github.com/baihaqipcr/project-jamsostek/blob/main/routes/auth.php): `routes/auth.php`
- [Session controller](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Registration](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Google sign-in](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/Auth/GoogleAuthController.php): `app/Http/Controllers/Auth/GoogleAuthController.php`
- [Profile controller](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`

### Potensi management

- [Potensi controller](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Http/Controllers/PotensiController.php): `app/Http/Controllers/PotensiController.php`
- [Potensi export](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Exports/PotensiExport.php): `app/Exports/PotensiExport.php`
- [Import template](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Exports/PotensiTemplateExport.php): `app/Exports/PotensiTemplateExport.php`

### Domain data

- [Potensi records](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/Potensi.php): `app/Models/Potensi.php`
- [Program records](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/ProgramPotensi.php): `app/Models/ProgramPotensi.php`
- [User records](https://github.com/baihaqipcr/project-jamsostek/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **User**
- **Google identity**

## Connections

- User → Web routes: requests (evidence: `routes/web.php`)
- Web routes → Potensi controller: routes to (evidence: `routes/web.php`)
- Potensi controller → Potensi records: reads and writes (evidence: `app/Http/Controllers/PotensiController.php`)
- Potensi controller → Potensi pages: renders pages (evidence: `app/Http/Controllers/PotensiController.php`)
- Potensi controller → Potensi export: downloads export (evidence: `app/Http/Controllers/PotensiController.php`)
- Potensi controller → Import template: downloads template (evidence: `app/Http/Controllers/PotensiController.php`)
- Potensi records → Program records: has many (evidence: `app/Models/Potensi.php`)
- User → Auth routes: requests (evidence: `routes/auth.php`)
- Auth routes → Session controller: routes to (evidence: `routes/auth.php`)
- Auth routes → Registration: routes to (evidence: `routes/auth.php`)
- Auth routes → Google sign-in: routes to (evidence: `routes/auth.php`)
- Session controller → User records: authenticates via
- Registration → User records: creates user (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Google sign-in → User records: looks up and updates (evidence: `app/Http/Controllers/Auth/GoogleAuthController.php`)
- Google sign-in → Google identity: authenticates with (evidence: `app/Http/Controllers/Auth/GoogleAuthController.php`)
- Web routes → Profile controller: routes to (evidence: `routes/web.php`)
- Profile controller → User records: updates account (evidence: `app/Http/Controllers/ProfileController.php`)
- Inertia app → Main layout: applies layout (evidence: `resources/js/app.js`)
- Inertia app → Error boundary: wraps pages (evidence: `resources/js/app.js`)
