# panelica/pnlcs architecture

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

- Interactive diagram: https://gitdiagram.com/panelica/pnlcs
- Repository: https://github.com/panelica/pnlcs

## Overview

PNLCS is a self-hosted hosting billing platform and customer portal. Customers browse products, place orders, pay invoices, and manage resulting services; hosting actions, domains, SSL, and support are also available through the portal, while staff administer operations. The architecture separates web/API entry points, lifecycle and billing services, provider modules, and persisted business records. The README documents the broad capabilities and integrations; sampled excerpts confirm gateway webhook handling, module-backed hosting actions, and theme management, but do not expose every workflow’s call graph.

Main entry points: [`app/Http/Controllers/Client`](https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Client) (Client Portal), [`app/Models`](https://github.com/panelica/pnlcs/tree/main/app/Models) (Business Records), [`app/Http/Controllers/Admin`](https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Admin) (Admin Panel), [`app/Services/PaymentService.php`](https://github.com/panelica/pnlcs/blob/main/app/Services/PaymentService.php) (Payments)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Portal and API"]
  node_portal["Client Portal"]
  node_admin["Admin Panel"]
  node_api["API"]
end

subgraph group_lifecycle["Commerce and Billing"]
  node_cart["Cart<br/>[CartService.php]"]
  node_orders["Orders<br/>[OrderService.php]"]
  node_invoicing["Invoicing"]
  node_payments["Payments<br/>[PaymentService.php]"]
  node_webhooks["Gateway Webhooks"]
end

subgraph group_operations["Service Operations"]
  node_provision["Provisioning"]
  node_hosting["Hosting Controls"]
  node_domains["Domain Services<br/>[DomainService.php]"]
  node_ssl["SSL Provisioning"]
  node_support["Support Tickets<br/>[TicketService.php]"]
  node_knowledge["Knowledge Base<br/>[KbArticle.php]"]
end

subgraph group_providers["Provider Modules"]
  node_gatewaymods{{"Payment Gateways"}}
  node_servermods{{"Server Modules"}}
  node_registrars{{"Registrars"}}
  node_sslmods{{"SSL Providers"}}
end

subgraph group_state["Business Records"]
  node_records[("Business Records")]
end

node_customer(("Customer"))
node_staff(("Staff"))
node_external(("Provider Services"))

node_customer -->|"uses"| node_portal
node_staff -->|"administers"| node_admin
node_customer -.->|"integrates"| node_api
node_portal -->|"manages cart"| node_cart
node_portal -->|"places orders"| node_orders
node_orders -->|"generates invoices"| node_invoicing
node_portal -->|"pays invoices"| node_payments
node_webhooks -->|"dispatches to"| node_gatewaymods
node_webhooks -->|"records payment"| node_payments
node_payments -->|"uses gateway"| node_gatewaymods
node_orders -->|"provisions service"| node_provision
node_hosting -->|"calls module"| node_servermods
node_domains -->|"uses registrar"| node_registrars
node_ssl -->|"uses provider"| node_sslmods
node_gatewaymods -->|"transacts with"| node_external
node_servermods -->|"provisions on"| node_external
node_registrars -->|"registers with"| node_external
node_sslmods -->|"issues through"| node_external
node_admin -->|"administers"| node_domains
node_admin -->|"manages tickets"| node_support
node_portal -->|"opens tickets"| node_support
node_portal -->|"reads articles"| node_knowledge
node_portal -->|"reads and writes"| node_records
node_admin -->|"reads and writes"| node_records
node_api -->|"reads and writes"| node_records
node_invoicing -->|"stores billing data"| node_records
node_payments -->|"stores transactions"| node_records
node_provision -->|"updates services"| node_records

click node_portal "https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Client"
click node_admin "https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Admin"
click node_api "https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Api"
click node_cart "https://github.com/panelica/pnlcs/blob/main/app/Services/CartService.php"
click node_orders "https://github.com/panelica/pnlcs/blob/main/app/Services/OrderService.php"
click node_invoicing "https://github.com/panelica/pnlcs/blob/main/app/Services/InvoiceGenerationService.php"
click node_payments "https://github.com/panelica/pnlcs/blob/main/app/Services/PaymentService.php"
click node_webhooks "https://github.com/panelica/pnlcs/blob/main/app/Http/Controllers/GatewayWebhookController.php"
click node_provision "https://github.com/panelica/pnlcs/blob/main/app/Services/ProvisioningService.php"
click node_hosting "https://github.com/panelica/pnlcs/blob/main/app/Http/Controllers/Client/ServiceController.php"
click node_domains "https://github.com/panelica/pnlcs/blob/main/app/Services/DomainService.php"
click node_ssl "https://github.com/panelica/pnlcs/blob/main/app/Services/SslProvisioningService.php"
click node_support "https://github.com/panelica/pnlcs/blob/main/app/Services/TicketService.php"
click node_knowledge "https://github.com/panelica/pnlcs/blob/main/app/Models/KbArticle.php"
click node_gatewaymods "https://github.com/panelica/pnlcs/tree/main/modules/Gateways"
click node_servermods "https://github.com/panelica/pnlcs/tree/main/modules/Servers"
click node_registrars "https://github.com/panelica/pnlcs/tree/main/modules/Registrars"
click node_sslmods "https://github.com/panelica/pnlcs/tree/main/modules/Ssl"
click node_records "https://github.com/panelica/pnlcs/tree/main/app/Models"

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_portal,node_admin,node_api toneBlue
class node_cart,node_orders,node_invoicing,node_payments,node_webhooks toneAmber
class node_provision,node_hosting,node_domains,node_ssl,node_support,node_knowledge toneMint
class node_gatewaymods,node_servermods,node_registrars,node_sslmods toneRose
class node_records,node_customer,node_staff,node_external toneIndigo
```

## Components

### Portal and API

- [Client Portal](https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Client): `app/Http/Controllers/Client`
- [Admin Panel](https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Admin): `app/Http/Controllers/Admin`
- [API](https://github.com/panelica/pnlcs/tree/main/app/Http/Controllers/Api): `app/Http/Controllers/Api`

### Commerce and Billing

- [Cart](https://github.com/panelica/pnlcs/blob/main/app/Services/CartService.php): `app/Services/CartService.php`
- [Orders](https://github.com/panelica/pnlcs/blob/main/app/Services/OrderService.php): `app/Services/OrderService.php`
- [Invoicing](https://github.com/panelica/pnlcs/blob/main/app/Services/InvoiceGenerationService.php): `app/Services/InvoiceGenerationService.php`
- [Payments](https://github.com/panelica/pnlcs/blob/main/app/Services/PaymentService.php): `app/Services/PaymentService.php`
- [Gateway Webhooks](https://github.com/panelica/pnlcs/blob/main/app/Http/Controllers/GatewayWebhookController.php): `app/Http/Controllers/GatewayWebhookController.php`

### Service Operations

- [Provisioning](https://github.com/panelica/pnlcs/blob/main/app/Services/ProvisioningService.php): `app/Services/ProvisioningService.php`
- [Hosting Controls](https://github.com/panelica/pnlcs/blob/main/app/Http/Controllers/Client/ServiceController.php): `app/Http/Controllers/Client/ServiceController.php`
- [Domain Services](https://github.com/panelica/pnlcs/blob/main/app/Services/DomainService.php): `app/Services/DomainService.php`
- [SSL Provisioning](https://github.com/panelica/pnlcs/blob/main/app/Services/SslProvisioningService.php): `app/Services/SslProvisioningService.php`
- [Support Tickets](https://github.com/panelica/pnlcs/blob/main/app/Services/TicketService.php): `app/Services/TicketService.php`
- [Knowledge Base](https://github.com/panelica/pnlcs/blob/main/app/Models/KbArticle.php): `app/Models/KbArticle.php`

### Provider Modules

- [Payment Gateways](https://github.com/panelica/pnlcs/tree/main/modules/Gateways): `modules/Gateways`
- [Server Modules](https://github.com/panelica/pnlcs/tree/main/modules/Servers): `modules/Servers`
- [Registrars](https://github.com/panelica/pnlcs/tree/main/modules/Registrars): `modules/Registrars`
- [SSL Providers](https://github.com/panelica/pnlcs/tree/main/modules/Ssl): `modules/Ssl`

### Business Records

- [Business Records](https://github.com/panelica/pnlcs/tree/main/app/Models): `app/Models`

### Other components

- **Customer**
- **Staff**
- **Provider Services**

## Connections

- Customer → Client Portal: uses
- Staff → Admin Panel: administers
- Customer → API: integrates
- Client Portal → Cart: manages cart
- Client Portal → Orders: places orders
- Orders → Invoicing: generates invoices
- Client Portal → Payments: pays invoices
- Gateway Webhooks → Payment Gateways: dispatches to
- Gateway Webhooks → Payments: records payment
- Payments → Payment Gateways: uses gateway
- Orders → Provisioning: provisions service
- Hosting Controls → Server Modules: calls module
- Domain Services → Registrars: uses registrar
- SSL Provisioning → SSL Providers: uses provider
- Payment Gateways → Provider Services: transacts with
- Server Modules → Provider Services: provisions on
- Registrars → Provider Services: registers with
- SSL Providers → Provider Services: issues through
- Admin Panel → Domain Services: administers
- Admin Panel → Support Tickets: manages tickets
- Client Portal → Support Tickets: opens tickets
- Client Portal → Knowledge Base: reads articles
- Client Portal → Business Records: reads and writes
- Admin Panel → Business Records: reads and writes
- API → Business Records: reads and writes
- Invoicing → Business Records: stores billing data
- Payments → Business Records: stores transactions
- Provisioning → Business Records: updates services
