# alexianeba/crmevent architecture

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

- Interactive diagram: https://gitdiagram.com/alexianeba/crmevent
- Repository: https://github.com/alexianeba/crmevent

## Overview

CRMEvent is a CRM for managing customers, sales opportunities, activities and events, quotes, invoices, tasks, and notifications. The main workflow is a user working through the Vue application, whose router selects a feature page; feature requests reach FastAPI routers and services, which operate on SQLAlchemy-backed records. Authentication, history, and notification scheduling support that workflow. The README is empty, so capability coverage comes from the repository tree and source index. Some frontend-to-API wiring and unsampled service behavior are not shown; those relationships are omitted rather than inferred.

Main entry points: [`backend/crmevent/main.py`](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/main.py) (FastAPI application), [`backend/crmevent/routers/invoice.py`](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/routers/invoice.py) (Quote and invoice routes), [`backend/crmevent/routers/users.py`](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/routers/users.py) (Authentication routes), [`backend/crmevent/routers`](https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/routers) (CRM resource routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_vue_app["Vue application<br/>[main.js]"]
  node_web_routes["Page routing<br/>[index.js]"]
  node_feature_pages["CRM feature pages"]
  node_api_client["API client<br/>[api.js]"]
  node_frontend_services["Feature services"]
end

subgraph group_api["API and access"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_auth_routes["Authentication routes<br/>[users.py]"]
  node_security["Token and access control<br/>[security.py]"]
end

subgraph group_crm["CRM workflows"]
  node_crm_routes["CRM resource routes"]
  node_crm_services["CRM domain services"]
  node_history_service["Change history<br/>[history.py]"]
end

subgraph group_billing["Quotes and billing"]
  node_quote_invoice_routes["Quote and invoice routes<br/>[invoice.py]"]
  node_invoice_service["Invoice and payments<br/>[invoice.py]"]
  node_invoice_contracts["Invoice schemas<br/>[invoice.py]"]
end

subgraph group_data["Persistence and automation"]
  node_notification_service["Notifications<br/>[notification.py]"]
  node_scheduler["Notification scheduler"]
  node_orm_models["CRM data models"]
  node_db_base["ORM and sessions<br/>[base.py]"]
  node_database[("SQL database<br/>[session.py]")]
end

node_person(("CRM user"))

node_person -.->|"uses"| node_vue_app
node_vue_app -->|"installs"| node_web_routes
node_web_routes -->|"routes to"| node_feature_pages
node_feature_pages -.->|"uses"| node_frontend_services
node_frontend_services -.->|"sends requests"| node_api_client
node_api_app -->|"registers"| node_auth_routes
node_api_app -->|"registers"| node_crm_routes
node_api_app -->|"registers"| node_quote_invoice_routes
node_api_app -->|"starts"| node_scheduler
node_auth_routes -->|"uses"| node_security
node_auth_routes -->|"delegates"| node_crm_services
node_crm_routes -->|"delegates"| node_crm_services
node_crm_routes -->|"records changes"| node_history_service
node_quote_invoice_routes -->|"delegates"| node_invoice_service
node_quote_invoice_routes -->|"records changes"| node_history_service
node_quote_invoice_routes -->|"validates with"| node_invoice_contracts
node_invoice_service -->|"reads and writes"| node_orm_models
node_notification_service -->|"reads and writes"| node_orm_models
node_notification_service -.->|"persists through"| node_database
node_db_base -->|"creates sessions"| node_database
node_orm_models -->|"inherits from"| node_db_base
node_api_app -->|"creates tables"| node_db_base

click node_vue_app "https://github.com/alexianeba/crmevent/blob/main/frontend/crmevent-front/src/main.js"
click node_web_routes "https://github.com/alexianeba/crmevent/blob/main/frontend/crmevent-front/src/router/index.js"
click node_feature_pages "https://github.com/alexianeba/crmevent/tree/main/frontend/crmevent-front/src/pages"
click node_api_client "https://github.com/alexianeba/crmevent/blob/main/frontend/crmevent-front/src/api/api.js"
click node_frontend_services "https://github.com/alexianeba/crmevent/tree/main/frontend/crmevent-front/src/services"
click node_api_app "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/main.py"
click node_auth_routes "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/routers/users.py"
click node_security "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/core/security.py"
click node_crm_routes "https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/routers"
click node_crm_services "https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/services"
click node_history_service "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/history.py"
click node_quote_invoice_routes "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/routers/invoice.py"
click node_invoice_service "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/invoice.py"
click node_invoice_contracts "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/schemas/invoice.py"
click node_notification_service "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/notification.py"
click node_scheduler "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/notification_scheduler.py"
click node_orm_models "https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/models"
click node_db_base "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/db/base.py"
click node_database "https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/db/session.py"

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_vue_app,node_web_routes,node_feature_pages,node_api_client,node_frontend_services,node_person toneBlue
class node_api_app,node_auth_routes,node_security toneAmber
class node_crm_routes,node_crm_services,node_history_service toneMint
class node_quote_invoice_routes,node_invoice_service,node_invoice_contracts toneRose
class node_notification_service,node_scheduler,node_orm_models,node_db_base,node_database toneIndigo
```

## Components

### Web application

- [Vue application](https://github.com/alexianeba/crmevent/blob/main/frontend/crmevent-front/src/main.js): `frontend/crmevent-front/src/main.js`
- [Page routing](https://github.com/alexianeba/crmevent/blob/main/frontend/crmevent-front/src/router/index.js): `frontend/crmevent-front/src/router/index.js`
- [CRM feature pages](https://github.com/alexianeba/crmevent/tree/main/frontend/crmevent-front/src/pages): `frontend/crmevent-front/src/pages`
- [API client](https://github.com/alexianeba/crmevent/blob/main/frontend/crmevent-front/src/api/api.js): `frontend/crmevent-front/src/api/api.js`
- [Feature services](https://github.com/alexianeba/crmevent/tree/main/frontend/crmevent-front/src/services): `frontend/crmevent-front/src/services`

### API and access

- [FastAPI application](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/main.py): `backend/crmevent/main.py`
- [Authentication routes](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/routers/users.py): `backend/crmevent/routers/users.py`
- [Token and access control](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/core/security.py): `backend/crmevent/core/security.py`

### CRM workflows

- [CRM resource routes](https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/routers): `backend/crmevent/routers`
- [CRM domain services](https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/services): `backend/crmevent/services`
- [Change history](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/history.py): `backend/crmevent/services/history.py`

### Quotes and billing

- [Quote and invoice routes](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/routers/invoice.py): `backend/crmevent/routers/invoice.py`
- [Invoice and payments](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/invoice.py): `backend/crmevent/services/invoice.py`
- [Invoice schemas](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/schemas/invoice.py): `backend/crmevent/schemas/invoice.py`

### Persistence and automation

- [Notifications](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/notification.py): `backend/crmevent/services/notification.py`
- [Notification scheduler](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/services/notification_scheduler.py): `backend/crmevent/services/notification_scheduler.py`
- [CRM data models](https://github.com/alexianeba/crmevent/tree/main/backend/crmevent/models): `backend/crmevent/models`
- [ORM and sessions](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/db/base.py): `backend/crmevent/db/base.py`
- [SQL database](https://github.com/alexianeba/crmevent/blob/main/backend/crmevent/db/session.py): `backend/crmevent/db/session.py`

### Other components

- **CRM user**

## Connections

- CRM user → Vue application: uses
- Vue application → Page routing: installs (evidence: `frontend/crmevent-front/src/main.js`)
- Page routing → CRM feature pages: routes to (evidence: `frontend/crmevent-front/src/router/index.js`)
- CRM feature pages → Feature services: uses
- Feature services → API client: sends requests
- FastAPI application → Authentication routes: registers (evidence: `backend/crmevent/main.py`)
- FastAPI application → CRM resource routes: registers (evidence: `backend/crmevent/main.py`)
- FastAPI application → Quote and invoice routes: registers (evidence: `backend/crmevent/main.py`)
- FastAPI application → Notification scheduler: starts (evidence: `backend/crmevent/main.py`)
- Authentication routes → Token and access control: uses (evidence: `backend/crmevent/routers/users.py`)
- Authentication routes → CRM domain services: delegates (evidence: `backend/crmevent/routers/users.py`)
- CRM resource routes → CRM domain services: delegates (evidence: `backend/crmevent/routers/activity.py`)
- CRM resource routes → Change history: records changes (evidence: `backend/crmevent/routers/activity.py`)
- Quote and invoice routes → Invoice and payments: delegates (evidence: `backend/crmevent/routers/invoice.py`)
- Quote and invoice routes → Change history: records changes (evidence: `backend/crmevent/routers/invoice.py`)
- Quote and invoice routes → Invoice schemas: validates with (evidence: `backend/crmevent/routers/invoice.py`)
- Invoice and payments → CRM data models: reads and writes (evidence: `backend/crmevent/services/invoice.py`)
- Notifications → CRM data models: reads and writes (evidence: `backend/crmevent/services/notification.py`)
- Notifications → SQL database: persists through
- ORM and sessions → SQL database: creates sessions (evidence: `backend/crmevent/db/base.py`)
- CRM data models → ORM and sessions: inherits from (evidence: `backend/crmevent/models/invoice.py`)
- FastAPI application → ORM and sessions: creates tables (evidence: `backend/crmevent/main.py`)
