# dharmeshlakum67/cardspe-server-02 architecture

> Architecture diagram of the GitHub repository dharmeshlakum67/cardspe-server-02, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dharmeshlakum67/cardspe-server-02
- Repository: https://github.com/dharmeshlakum67/cardspe-server-02

## Overview

Facit is a React administration dashboard for managing users, roles, service configuration, payments, reports, and developer API documentation. An administrator enters through the routed interface; protected pages use authentication and permission state, and domain services make API requests. The README describes the product as an admin dashboard template, while the route configuration and source index reveal its major feature areas. Some page and integration implementations are not included in the excerpts, so those branches are represented at the routing level rather than with speculative internal flows.

Main entry points: [`src/services/apiClient.ts`](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/apiClient.ts) (HTTP API client), [`src/routes/contentRoutes.tsx`](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx) (Page routing), [`src/App/App.tsx`](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/App/App.tsx) (Dashboard shell), [`src/pages/presentation/auth/services/authService.ts`](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/auth/services/authService.ts) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_application["Dashboard shell<br/>[App.tsx]"]
  node_content_routes["Page routing<br/>[contentRoutes.tsx]"]
end

subgraph group_access["Identity and access"]
  node_auth_service["Authentication service<br/>[authService.ts]"]
  node_permission_state["Permission state"]
end

subgraph group_domains["Admin workflows"]
  node_auth_routes["Auth pages<br/>[contentRoutes.tsx]"]
  node_user_admin["User and role admin<br/>[contentRoutes.tsx]"]
  node_service_admin["Service management"]
  node_payments["Payments"]
  node_reports["Reports<br/>[reportService.ts]"]
  node_developer_tools["Developer tools"]
  node_user_service["User service<br/>[userService.ts]"]
  node_service_category_api["Category service"]
end

subgraph group_platform["Shared services"]
  node_api_client["HTTP API client<br/>[apiClient.ts]"]
  node_api_endpoints["API endpoints<br/>[apiEndpoints.ts]"]
  node_environment["Runtime configuration<br/>[env.config.ts]"]
  node_permission_service["Permission service"]
  node_notification_service["Notifications"]
  node_socket_listener["Socket notifications"]
end

node_admin(("Administrator"))
node_backend[("Backend API")]

node_admin -->|"uses"| node_application
node_application -.->|"hosts"| node_content_routes
node_content_routes -->|"routes to"| node_auth_routes
node_content_routes -->|"routes to"| node_user_admin
node_content_routes -->|"routes to"| node_service_admin
node_admin -.->|"manages"| node_user_admin
node_admin -.->|"manages"| node_payments
node_admin -.->|"views"| node_reports
node_admin -.->|"manages"| node_developer_tools
node_auth_routes -.->|"uses"| node_auth_service
node_auth_service -->|"calls"| node_api_client
node_user_admin -->|"uses"| node_user_service
node_user_service -->|"calls"| node_api_client
node_service_admin -->|"calls"| node_service_category_api
node_service_category_api -.->|"calls"| node_api_client
node_reports -->|"calls"| node_api_client
node_payments -.->|"calls"| node_api_client
node_developer_tools -.->|"calls"| node_api_client
node_auth_service -->|"uses"| node_api_endpoints
node_user_service -->|"uses"| node_api_endpoints
node_api_client -->|"reads config"| node_environment
node_api_client -->|"sends requests"| node_backend
node_permission_state -->|"loads permissions"| node_permission_service
node_permission_service -->|"calls"| node_api_client
node_application -->|"mounts"| node_socket_listener
node_notification_service -->|"calls"| node_api_client

click node_application "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/App/App.tsx"
click node_content_routes "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx"
click node_auth_routes "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx"
click node_user_admin "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx"
click node_service_admin "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/service-management/service-category/ServiceCategoryListPage.tsx"
click node_payments "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/payments/wallet-transaction/service/walletTransactionService.ts"
click node_reports "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/reports/service/reportService.ts"
click node_developer_tools "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/developer/api-documentation/service/apiDocumentationService.ts"
click node_auth_service "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/auth/services/authService.ts"
click node_permission_state "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/contexts/permissionContext.tsx"
click node_user_service "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/user-management/users/service/userService.ts"
click node_service_category_api "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/service-management/service-category/service/serviceCategoryService.ts"
click node_api_client "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/apiClient.ts"
click node_api_endpoints "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/constants/apiEndpoints.ts"
click node_environment "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/config/env.config.ts"
click node_permission_service "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/permissionService.ts"
click node_notification_service "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/notificationService.ts"
click node_socket_listener "https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/components/common/SocketNotificationListener.tsx"

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_application,node_content_routes toneBlue
class node_auth_service,node_permission_state,node_backend toneAmber
class node_auth_routes,node_user_admin,node_service_admin,node_payments,node_reports,node_developer_tools,node_user_service,node_service_category_api toneMint
class node_api_client,node_api_endpoints,node_environment,node_permission_service,node_notification_service,node_socket_listener toneRose
class node_admin toneIndigo
```

## Components

### Application shell

- [Dashboard shell](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/App/App.tsx): `src/App/App.tsx`
- [Page routing](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx): `src/routes/contentRoutes.tsx`

### Identity and access

- [Authentication service](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/auth/services/authService.ts): `src/pages/presentation/auth/services/authService.ts`
- [Permission state](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/contexts/permissionContext.tsx): `src/contexts/permissionContext.tsx`

### Admin workflows

- [Auth pages](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx): `src/routes/contentRoutes.tsx`
- [User and role admin](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/routes/contentRoutes.tsx): `src/routes/contentRoutes.tsx`
- [Service management](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/service-management/service-category/ServiceCategoryListPage.tsx): `src/pages/presentation/service-management/service-category/ServiceCategoryListPage.tsx`
- [Payments](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/payments/wallet-transaction/service/walletTransactionService.ts): `src/pages/presentation/payments/wallet-transaction/service/walletTransactionService.ts`
- [Reports](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/reports/service/reportService.ts): `src/pages/presentation/reports/service/reportService.ts`
- [Developer tools](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/developer/api-documentation/service/apiDocumentationService.ts): `src/pages/presentation/developer/api-documentation/service/apiDocumentationService.ts`
- [User service](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/user-management/users/service/userService.ts): `src/pages/presentation/user-management/users/service/userService.ts`
- [Category service](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/pages/presentation/service-management/service-category/service/serviceCategoryService.ts): `src/pages/presentation/service-management/service-category/service/serviceCategoryService.ts`

### Shared services

- [HTTP API client](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/apiClient.ts): `src/services/apiClient.ts`
- [API endpoints](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/constants/apiEndpoints.ts): `src/constants/apiEndpoints.ts`
- [Runtime configuration](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/config/env.config.ts): `src/config/env.config.ts`
- [Permission service](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/permissionService.ts): `src/services/permissionService.ts`
- [Notifications](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/services/notificationService.ts): `src/services/notificationService.ts`
- [Socket notifications](https://github.com/dharmeshlakum67/cardspe-server-02/blob/main/src/components/common/SocketNotificationListener.tsx): `src/components/common/SocketNotificationListener.tsx`

### Other components

- **Administrator**
- **Backend API**

## Connections

- Administrator → Dashboard shell: uses (evidence: `src/App/App.tsx`)
- Dashboard shell → Page routing: hosts
- Page routing → Auth pages: routes to (evidence: `src/routes/contentRoutes.tsx`)
- Page routing → User and role admin: routes to (evidence: `src/routes/contentRoutes.tsx`)
- Page routing → Service management: routes to (evidence: `src/routes/contentRoutes.tsx`)
- Administrator → User and role admin: manages
- Administrator → Payments: manages
- Administrator → Reports: views
- Administrator → Developer tools: manages
- Auth pages → Authentication service: uses
- Authentication service → HTTP API client: calls (evidence: `src/pages/presentation/auth/services/authService.ts`)
- User and role admin → User service: uses
- User service → HTTP API client: calls (evidence: `src/pages/presentation/user-management/users/service/userService.ts`)
- Service management → Category service: calls (evidence: `src/pages/presentation/service-management/service-category/ServiceCategoryListPage.tsx`)
- Category service → HTTP API client: calls
- Reports → HTTP API client: calls (evidence: `src/pages/presentation/reports/service/reportService.ts`)
- Payments → HTTP API client: calls
- Developer tools → HTTP API client: calls
- Authentication service → API endpoints: uses (evidence: `src/pages/presentation/auth/services/authService.ts`)
- User service → API endpoints: uses (evidence: `src/pages/presentation/user-management/users/service/userService.ts`)
- HTTP API client → Runtime configuration: reads config (evidence: `src/services/apiClient.ts`)
- HTTP API client → Backend API: sends requests (evidence: `src/services/apiClient.ts`)
- Permission state → Permission service: loads permissions (evidence: `src/contexts/permissionContext.tsx`)
- Permission service → HTTP API client: calls (evidence: `src/services/permissionService.ts`)
- Dashboard shell → Socket notifications: mounts (evidence: `src/App/App.tsx`)
- Notifications → HTTP API client: calls (evidence: `src/services/notificationService.ts`)
