# shakilahmedbhuiyan/printnsign architecture

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

- Interactive diagram: https://gitdiagram.com/shakilahmedbhuiyan/printnsign
- Repository: https://github.com/shakilahmedbhuiyan/printnsign

## Overview

1. This is a Laravel monolith focused on authentication, account management, and role-based administration rather than a generic CRUD app. The main runtime is the standard Laravel HTTP stack, with `routes/web.php` and `routes/api.php` as entry points and Eloquent as the persistence layer.

2. The UI is primarily Blade + Livewire, not controller-driven MVC. Most interactive screens live under `app/Livewire`, with matching Blade templates in `resources/views/livewire`. Traditional controllers are minimal, so the request flow usually goes: route → Livewire component → model/action → rendered Blade.

3. The app is split into two visible front-end zones:
   - `Guest` for public/auth-related pages and a landing-style experience
   - `Dash` for authenticated application pages
   These zones each have their own layout components and navigation/sidebar components, which makes them separate presentation boundaries in the architecture diagram.

4. The guest side includes a home/index page plus shared components like nav, top header, and a search modal. It also uses standard Jetstream/Laravel auth pages in `resources/views/auth`, so public access covers marketing-like pages plus sign-in, registration, password reset, and email verification flows.

5. Authentication and account lifecycle are handled by Fortify and Jetstream. The `app/Actions/Fortify` classes implement user creation, password updates/reset, profile updates, and password validation rules. Jetstream-specific actions handle account deletion. This means identity management is centralized in framework-provided auth services rather than custom domain controllers.

6. The authenticated account features include profile settings, two-factor authentication, browser sessions, and API token management. The presence of `resources/views/profile` and `resources/views/api`, along with tests for those flows, shows that these are first-class product features and not incidental framework scaffolding.

7. Admin functionality is organized around users and roles. Under `app/Livewire/Dash/Admin`, there are dedicated Livewire pages for listing, creating, and updating roles, plus listing and updating users. That suggests an admin back office where user access is managed directly in the app UI.

8. Authorization is enforced with policies and permission tables. `app/Policies/RolePolicy.php` and `PermissionPolicy.php` sit on top of the database schema created by `create_permission_tables.php`, which strongly suggests a role/permission model, likely via the Spatie permission package. This is the key business boundary between “who can see/edit what” and the admin screens.

9. Database state is centered on identity and access control:
   - `users`
   - two-factor columns on users
   - personal access tokens
   - permission/role tables
   Seeders include a default admin and default permissions, indicating the app boots with an initial privileged identity and a baseline authorization matrix.

10. Filament is present as an admin-panel provider, which indicates a secondary admin framework is configured alongside the custom Livewire dashboard. In diagram terms, this is an administration tooling layer over the same auth/permission model, even if the visible application pages are mostly custom Livewire.

11. Front-end assets are built with the standard Laravel toolchain: Vite, Tailwind, and npm-managed JS/CSS. `resources/js`, `resources/css`, `tailwind.config.js`, and `vite.config.js` define the compiled client bundle, while `public/` contains the built output and vendor assets such as Filament’s JS/CSS.

12. Tests are concentrated on authentication and account-management flows rather than broad business logic. Feature tests cover API token permissions, browser sessions, profile updates, password changes, two-factor auth, and account deletion, which reinforces that the repo’s architectural center is secure user administration.

13. Overall, the main architecture diagram should show three layers:
   - presentation: Blade/Livewire views for guest and dashboard areas
   - application/services: Fortify/Jetstream actions, Livewire pages, policies
   - data/infrastructure: Eloquent models, migrations, seeders, auth/token/permission tables
   The dominant cross-cutting concern is access control, which governs both the dashboard and the admin workflows.

Main entry points: [`app/Livewire/Dash`](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash) (Dash), [`app/Livewire/Guest`](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Guest) (Guest), [`app/Actions/Fortify`](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Actions/Fortify) (Fortify Actions), [`app/Models/User.php`](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/Models/User.php) (User)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_guest_zone["Guest<br/>public UI"]
  node_dash_zone["Dash<br/>app UI"]
  node_guest_layout["Guest Layout<br/>[GuestLayout.php]"]
  node_app_layout["App Layout<br/>[AppLayout.php]"]
  node_guest_components["Guest UI<br/>components"]
  node_dash_components["Dash UI<br/>components"]
  node_auth_views["Auth Views<br/>blade views"]
  node_profile_views["Profile Views<br/>blade views"]
  node_api_views["API Views<br/>blade views"]
end

subgraph group_application["Application"]
  node_routes["Routes<br/>http entrypoints<br/>[web.php]"]
  node_fortify_actions["Fortify Actions<br/>auth services"]
  node_jetstream_actions["Jetstream Actions<br/>account services"]
  node_admin_livewire["Admin Pages<br/>livewire admin"]
  node_policies["Policies<br/>authorization"]
end

subgraph group_data["Data"]
  node_user_model[("User<br/>eloquent model<br/>[User.php]")]
  node_migrations["Migrations<br/>schema"]
  node_seeders["Seeders<br/>bootstrap data"]
end

subgraph group_infrastructure["Infrastructure"]
  node_filament_provider["Filament Admin<br/>panel provider"]
  node_framework_providers["Auth Providers<br/>service providers"]
  node_assets["Frontend Assets<br/>build pipeline<br/>[vite.config.js]"]
  node_tests["Feature Tests<br/>test suite"]
end

node_routes -->|"guest pages"| node_guest_zone
node_routes -->|"app pages"| node_dash_zone
node_guest_zone -->|"wraps"| node_guest_layout
node_dash_zone -->|"wraps"| node_app_layout
node_guest_zone -->|"uses"| node_guest_components
node_dash_zone -->|"uses"| node_dash_components
node_guest_zone -->|"auth flow"| node_auth_views
node_dash_zone -->|"account settings"| node_profile_views
node_dash_zone -->|"tokens"| node_api_views
node_auth_views -->|"driven by"| node_fortify_actions
node_profile_views -->|"driven by"| node_fortify_actions
node_profile_views -->|"account delete"| node_jetstream_actions
node_admin_livewire -->|"guarded by"| node_policies
node_policies -->|"enforced by"| node_migrations
node_fortify_actions -->|"updates"| node_user_model
node_jetstream_actions -->|"deletes"| node_user_model
node_user_model -->|"persisted in"| node_migrations
node_seeders -->|"populates"| node_migrations
node_filament_provider -->|"uses"| node_policies
node_framework_providers -->|"registers"| node_fortify_actions
node_framework_providers -->|"integrates"| node_user_model
node_assets -->|"styles"| node_guest_zone
node_assets -->|"styles"| node_dash_zone
node_tests -.->|"verifies"| node_fortify_actions
node_tests -.->|"verifies"| node_api_views
node_tests -.->|"verifies"| node_admin_livewire

click node_routes "https://github.com/shakilahmedbhuiyan/printnsign/blob/main/routes/web.php"
click node_guest_zone "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Guest"
click node_dash_zone "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash"
click node_guest_layout "https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/View/Components/GuestLayout.php"
click node_app_layout "https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/View/Components/AppLayout.php"
click node_guest_components "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Guest/Components"
click node_dash_components "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash/Components"
click node_auth_views "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/resources/views/auth"
click node_profile_views "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/resources/views/profile"
click node_api_views "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/resources/views/api"
click node_fortify_actions "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Actions/Fortify"
click node_jetstream_actions "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Actions/Jetstream"
click node_admin_livewire "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash/Admin"
click node_policies "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Policies"
click node_user_model "https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/Models/User.php"
click node_migrations "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/database/migrations"
click node_seeders "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/database/seeders"
click node_filament_provider "https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/Providers/Filament/AdminPanelProvider.php"
click node_framework_providers "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Providers"
click node_assets "https://github.com/shakilahmedbhuiyan/printnsign/blob/main/vite.config.js"
click node_tests "https://github.com/shakilahmedbhuiyan/printnsign/tree/main/tests/Feature"

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_guest_zone,node_dash_zone,node_guest_layout,node_app_layout,node_guest_components,node_dash_components,node_auth_views,node_profile_views,node_api_views toneBlue
class node_routes,node_fortify_actions,node_jetstream_actions,node_admin_livewire,node_policies toneAmber
class node_user_model,node_migrations,node_seeders toneMint
class node_filament_provider,node_framework_providers,node_assets,node_tests toneRose
```

## Components

### Presentation

Blade and Livewire UI surfaces

- [Guest](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Guest): public UI · Public and auth-facing presentation area · `app/Livewire/Guest`
- [Dash](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash): app UI · Authenticated application presentation area · `app/Livewire/Dash`
- [Guest Layout](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/View/Components/GuestLayout.php): layout · Shared layout for public screens · `app/View/Components/GuestLayout.php`
- [App Layout](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/View/Components/AppLayout.php): layout · Shared layout for authenticated screens · `app/View/Components/AppLayout.php`
- [Guest UI](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Guest/Components): components · Guest navigation, header, and search modal · `app/Livewire/Guest/Components`
- [Dash UI](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash/Components): components · Dashboard navigation and sidebar · `app/Livewire/Dash/Components`
- [Auth Views](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/resources/views/auth): blade views · Login, registration, reset, and verification screens · `resources/views/auth`
- [Profile Views](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/resources/views/profile): blade views · Profile, browser sessions, 2FA, and account settings pages · `resources/views/profile`
- [API Views](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/resources/views/api): blade views · Personal access token management screens · `resources/views/api`

### Application

Auth actions, Livewire pages, and policies

- [Routes](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/routes/web.php): http entrypoints · Web and API route entry points · `routes/web.php`
- [Fortify Actions](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Actions/Fortify): auth services · User creation, password reset, password update, and profile update logic · `app/Actions/Fortify`
- [Jetstream Actions](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Actions/Jetstream): account services · Account lifecycle actions such as user deletion · `app/Actions/Jetstream`
- [Admin Pages](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Livewire/Dash/Admin): livewire admin · Role and user management pages in the dashboard · `app/Livewire/Dash/Admin`
- [Policies](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Policies): authorization · Role and permission authorization rules · `app/Policies`

### Data

Models, migrations, and seed data

- [User](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/Models/User.php): eloquent model · Primary identity model with two-factor and token support · `app/Models/User.php`
- [Migrations](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/database/migrations): schema · Users, tokens, and permission tables · `database/migrations`
- [Seeders](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/database/seeders): bootstrap data · Default admin and baseline permissions · `database/seeders`

### Infrastructure

Framework providers and built assets

- [Filament Admin](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/app/Providers/Filament/AdminPanelProvider.php): panel provider · Secondary admin panel over the same auth model · `app/Providers/Filament/AdminPanelProvider.php`
- [Auth Providers](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/app/Providers): service providers · Fortify and Jetstream integration configuration · `app/Providers`
- [Frontend Assets](https://github.com/shakilahmedbhuiyan/printnsign/blob/main/vite.config.js): build pipeline · Vite, Tailwind, and bundled JS/CSS output · `vite.config.js`
- [Feature Tests](https://github.com/shakilahmedbhuiyan/printnsign/tree/main/tests/Feature): test suite · Auth, profile, 2FA, sessions, and token management tests · `tests/Feature`

## Connections

- Routes → Guest: guest pages · Web routes land on public Livewire screens
- Routes → Dash: app pages · Authenticated routes land on dashboard screens
- Guest → Guest Layout: wraps · Guest screens use the guest layout
- Dash → App Layout: wraps · Dashboard screens use the app layout
- Guest → Guest UI: uses · Guest screens compose shared nav and header pieces
- Dash → Dash UI: uses · Dashboard screens compose nav and sidebar pieces
- Guest → Auth Views: auth flow · Public area includes login and registration views
- Dash → Profile Views: account settings · Authenticated area includes profile management screens
- Dash → API Views: tokens · Authenticated area includes API token management
- Auth Views → Fortify Actions: driven by · Auth pages are backed by Fortify actions
- Profile Views → Fortify Actions: driven by · Profile and password flows use Fortify actions
- Profile Views → Jetstream Actions: account delete · Account deletion is handled by Jetstream actions
- Admin Pages → Policies: guarded by · Admin user and role screens depend on authorization policies
- Policies → Migrations: enforced by · Policies sit atop the permission schema
- Fortify Actions → User: updates · Identity actions operate on the user model
- Jetstream Actions → User: deletes · Account lifecycle actions operate on the user model
- User → Migrations: persisted in · Users and auth state are stored in database tables
- Seeders → Migrations: populates · Seed data initializes default admin and permissions
- Filament Admin → Policies: uses · Filament admin shares the same authorization layer
- Auth Providers → Fortify Actions: registers · Framework providers wire Fortify into the app
- Auth Providers → User: integrates · Framework providers connect auth features to the user model
- Frontend Assets → Guest: styles · Frontend bundle supports guest presentation
- Frontend Assets → Dash: styles · Frontend bundle supports dashboard presentation
- Feature Tests → Fortify Actions: verifies · Feature tests cover password, profile, and 2FA flows
- Feature Tests → API Views: verifies · Feature tests cover API token management
- Feature Tests → Admin Pages: verifies · Feature tests exercise account and access-management behavior
