# gunasekharreddy1979/acxiomcrm architecture

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

- Interactive diagram: https://gitdiagram.com/gunasekharreddy1979/acxiomcrm
- Repository: https://github.com/gunasekharreddy1979/acxiomcrm

## Overview

AcxiomCRM is a role-controlled sales CRM covering lead capture and conversion, customer accounts, opportunities, follow-ups, activity history, analytics, user administration, and audit review. Users enter through the React interface; routed pages call the Express REST API, where authentication and role checks protect domain services that use Sequelize models backed by MySQL. The graph preserves these distinct product areas and the documented reporting/dashboard capabilities. Most page and service internals were not excerpted, so their links are included only where the README or shown route/controller wiring supports them.

Main entry points: [`frontend/src/routes/AppRoutes.jsx`](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/routes/AppRoutes.jsx) (Page routing), [`frontend/src/services/api.js`](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/services/api.js) (API client), [`backend/models`](https://github.com/gunasekharreddy1979/acxiomcrm/tree/main/backend/models) (CRM domain models), [`backend/utils/auditLogger.js`](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/utils/auditLogger.js) (Audit logging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["CRM interface"]
  node_routes_ui["Page routing<br/>[AppRoutes.jsx]"]
  node_auth_ui["Session context<br/>[AuthContext.jsx]"]
  node_customer_ui["Customer pages"]
  node_lead_ui["Lead capture<br/>[LeadsListPage.jsx]"]
  node_opportunity_ui["Opportunity deals"]
  node_followup_ui["Follow-up schedule<br/>[FollowUpsPage.jsx]"]
  node_activity_ui["Activity timeline<br/>[ActivitiesPage.jsx]"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_api["API and access"]
  node_api_app["API routing<br/>[app.js]"]
  node_auth_routes["Authentication routes<br/>[authRoutes.js]"]
  node_auth_service["Authentication logic<br/>[authService.js]"]
  node_security["Token and role checks<br/>[authMiddleware.js]"]
  node_audit_logger["Audit logging<br/>[auditLogger.js]"]
end

subgraph group_sales["Sales operations"]
  node_customer_service["Customer management<br/>[customerService.js]"]
  node_lead_service["Lead and conversion<br/>[leadService.js]"]
  node_opportunity_service["Opportunity pipeline"]
  node_followup_service["Follow-up lifecycle<br/>[followUpService.js]"]
  node_activity_service["Activity logging<br/>[activityService.js]"]
end

subgraph group_insights["Insights and oversight"]
  node_dashboard_ui["KPI dashboard<br/>[DashboardPage.jsx]"]
  node_charts["Pipeline chart<br/>[PipelineChart.jsx]"]
  node_reports_ui["Analytics reports<br/>[ReportsPage.jsx]"]
  node_users_ui["User admin<br/>[UsersPage.jsx]"]
  node_audit_ui["Audit viewer<br/>[AuditLogPage.jsx]"]
  node_dashboard_service["Dashboard metrics"]
  node_report_service["Report generation<br/>[reportService.js]"]
  node_user_service["User administration<br/>[userService.js]"]
end

subgraph group_persistence["Domain persistence"]
  node_models["CRM domain models"]
  node_mysql[("MySQL database<br/>[db.js]")]
end

node_staff(("CRM user"))
node_external[("MySQL service")]

node_staff -->|"uses"| node_routes_ui
node_routes_ui -->|"checks session"| node_auth_ui
node_routes_ui -->|"routes to"| node_customer_ui
node_routes_ui -->|"routes to"| node_lead_ui
node_routes_ui -->|"routes to"| node_opportunity_ui
node_routes_ui -->|"routes to"| node_followup_ui
node_routes_ui -->|"routes to"| node_activity_ui
node_routes_ui -->|"routes to"| node_dashboard_ui
node_routes_ui -->|"routes to"| node_reports_ui
node_routes_ui -->|"admin routes"| node_users_ui
node_routes_ui -->|"role routes"| node_audit_ui
node_auth_ui -->|"uses"| node_api_client
node_customer_ui -.->|"requests data"| node_api_client
node_lead_ui -.->|"requests data"| node_api_client
node_opportunity_ui -.->|"requests data"| node_api_client
node_followup_ui -.->|"requests data"| node_api_client
node_activity_ui -.->|"requests data"| node_api_client
node_dashboard_ui -.->|"requests data"| node_api_client
node_reports_ui -.->|"requests data"| node_api_client
node_users_ui -.->|"requests data"| node_api_client
node_audit_ui -.->|"requests data"| node_api_client
node_api_client -.->|"REST requests"| node_api_app
node_api_app -->|"mounts"| node_auth_routes
node_auth_routes -->|"dispatches"| node_auth_service
node_auth_routes -->|"authenticates"| node_security
node_api_app -.->|"protects resources"| node_security
node_customer_service -.->|"uses"| node_models
node_lead_service -->|"reads and writes"| node_models
node_opportunity_service -->|"reads and writes"| node_models
node_followup_service -.->|"uses"| node_models
node_activity_service -.->|"uses"| node_models
node_dashboard_service -.->|"uses"| node_models
node_report_service -->|"queries"| node_models
node_user_service -.->|"uses"| node_models
node_auth_service -->|"uses"| node_models
node_lead_service -->|"records events"| node_audit_logger
node_opportunity_service -->|"records events"| node_audit_logger
node_auth_service -->|"records events"| node_audit_logger
node_audit_logger -->|"persists logs"| node_models
node_models -->|"defines ORM"| node_mysql
node_mysql -->|"connects"| node_external
node_dashboard_ui -.->|"visualizes pipeline"| node_charts

click node_routes_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/routes/AppRoutes.jsx"
click node_auth_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/context/AuthContext.jsx"
click node_customer_ui "https://github.com/gunasekharreddy1979/acxiomcrm/tree/main/frontend/src/pages/customers"
click node_lead_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/leads/LeadsListPage.jsx"
click node_opportunity_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/opportunities/OpportunitiesListPage.jsx"
click node_followup_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/followups/FollowUpsPage.jsx"
click node_activity_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/activities/ActivitiesPage.jsx"
click node_dashboard_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/dashboard/DashboardPage.jsx"
click node_charts "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/components/charts/PipelineChart.jsx"
click node_reports_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/reports/ReportsPage.jsx"
click node_users_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/users/UsersPage.jsx"
click node_audit_ui "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/audit/AuditLogPage.jsx"
click node_api_client "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/services/api.js"
click node_api_app "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/app.js"
click node_auth_routes "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/routes/authRoutes.js"
click node_auth_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/authService.js"
click node_security "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/middleware/authMiddleware.js"
click node_customer_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/customerService.js"
click node_lead_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/leadService.js"
click node_opportunity_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/opportunityService.js"
click node_followup_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/followUpService.js"
click node_activity_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/activityService.js"
click node_dashboard_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/dashboardService.js"
click node_report_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/reportService.js"
click node_user_service "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/userService.js"
click node_audit_logger "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/utils/auditLogger.js"
click node_models "https://github.com/gunasekharreddy1979/acxiomcrm/tree/main/backend/models"
click node_mysql "https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/config/db.js"

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_routes_ui,node_auth_ui,node_customer_ui,node_lead_ui,node_opportunity_ui,node_followup_ui,node_activity_ui,node_api_client,node_staff toneBlue
class node_api_app,node_auth_routes,node_auth_service,node_security,node_audit_logger,node_external toneAmber
class node_customer_service,node_lead_service,node_opportunity_service,node_followup_service,node_activity_service toneMint
class node_dashboard_ui,node_charts,node_reports_ui,node_users_ui,node_audit_ui,node_dashboard_service,node_report_service,node_user_service toneRose
class node_models,node_mysql toneIndigo
```

## Components

### CRM interface

- [Page routing](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/routes/AppRoutes.jsx): `frontend/src/routes/AppRoutes.jsx`
- [Session context](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Customer pages](https://github.com/gunasekharreddy1979/acxiomcrm/tree/main/frontend/src/pages/customers): `frontend/src/pages/customers`
- [Lead capture](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/leads/LeadsListPage.jsx): `frontend/src/pages/leads/LeadsListPage.jsx`
- [Opportunity deals](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/opportunities/OpportunitiesListPage.jsx): `frontend/src/pages/opportunities/OpportunitiesListPage.jsx`
- [Follow-up schedule](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/followups/FollowUpsPage.jsx): `frontend/src/pages/followups/FollowUpsPage.jsx`
- [Activity timeline](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/activities/ActivitiesPage.jsx): `frontend/src/pages/activities/ActivitiesPage.jsx`
- [API client](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and access

- [API routing](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/app.js): `backend/app.js`
- [Authentication routes](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Authentication logic](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/authService.js): `backend/services/authService.js`
- [Token and role checks](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/middleware/authMiddleware.js): `backend/middleware/authMiddleware.js`
- [Audit logging](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/utils/auditLogger.js): `backend/utils/auditLogger.js`

### Sales operations

- [Customer management](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/customerService.js): `backend/services/customerService.js`
- [Lead and conversion](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/leadService.js): `backend/services/leadService.js`
- [Opportunity pipeline](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/opportunityService.js): `backend/services/opportunityService.js`
- [Follow-up lifecycle](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/followUpService.js): `backend/services/followUpService.js`
- [Activity logging](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/activityService.js): `backend/services/activityService.js`

### Insights and oversight

- [KPI dashboard](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/dashboard/DashboardPage.jsx): `frontend/src/pages/dashboard/DashboardPage.jsx`
- [Pipeline chart](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/components/charts/PipelineChart.jsx): `frontend/src/components/charts/PipelineChart.jsx`
- [Analytics reports](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/reports/ReportsPage.jsx): `frontend/src/pages/reports/ReportsPage.jsx`
- [User admin](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/users/UsersPage.jsx): `frontend/src/pages/users/UsersPage.jsx`
- [Audit viewer](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/frontend/src/pages/audit/AuditLogPage.jsx): `frontend/src/pages/audit/AuditLogPage.jsx`
- [Dashboard metrics](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/dashboardService.js): `backend/services/dashboardService.js`
- [Report generation](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/reportService.js): `backend/services/reportService.js`
- [User administration](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/services/userService.js): `backend/services/userService.js`

### Domain persistence

- [CRM domain models](https://github.com/gunasekharreddy1979/acxiomcrm/tree/main/backend/models): `backend/models`
- [MySQL database](https://github.com/gunasekharreddy1979/acxiomcrm/blob/main/backend/config/db.js): `backend/config/db.js`

### Other components

- **CRM user**
- **MySQL service**

## Connections

- CRM user → Page routing: uses (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Session context: checks session (evidence: `frontend/src/App.jsx`)
- Page routing → Customer pages: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Lead capture: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Opportunity deals: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Follow-up schedule: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Activity timeline: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → KPI dashboard: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Analytics reports: routes to (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → User admin: admin routes (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Page routing → Audit viewer: role routes (evidence: `frontend/src/routes/AppRoutes.jsx`)
- Session context → API client: uses (evidence: `frontend/src/context/AuthContext.jsx`)
- Customer pages → API client: requests data
- Lead capture → API client: requests data
- Opportunity deals → API client: requests data
- Follow-up schedule → API client: requests data
- Activity timeline → API client: requests data
- KPI dashboard → API client: requests data
- Analytics reports → API client: requests data
- User admin → API client: requests data
- Audit viewer → API client: requests data
- API client → API routing: REST requests
- API routing → Authentication routes: mounts (evidence: `backend/app.js`)
- Authentication routes → Authentication logic: dispatches (evidence: `backend/routes/authRoutes.js`)
- Authentication routes → Token and role checks: authenticates (evidence: `backend/routes/authRoutes.js`)
- API routing → Token and role checks: protects resources
- Customer management → CRM domain models: uses
- Lead and conversion → CRM domain models: reads and writes (evidence: `backend/services/leadService.js`)
- Opportunity pipeline → CRM domain models: reads and writes (evidence: `backend/services/opportunityService.js`)
- Follow-up lifecycle → CRM domain models: uses
- Activity logging → CRM domain models: uses
- Dashboard metrics → CRM domain models: uses
- Report generation → CRM domain models: queries (evidence: `backend/services/reportService.js`)
- User administration → CRM domain models: uses
- Authentication logic → CRM domain models: uses (evidence: `backend/services/authService.js`)
- Lead and conversion → Audit logging: records events (evidence: `backend/services/leadService.js`)
- Opportunity pipeline → Audit logging: records events (evidence: `backend/services/opportunityService.js`)
- Authentication logic → Audit logging: records events (evidence: `backend/services/authService.js`)
- Audit logging → CRM domain models: persists logs (evidence: `backend/utils/auditLogger.js`)
- CRM domain models → MySQL database: defines ORM (evidence: `backend/models/index.js`)
- MySQL database → MySQL service: connects (evidence: `backend/config/db.js`)
- KPI dashboard → Pipeline chart: visualizes pipeline
