# mario-659/funeralmanagementsystem architecture

> Architecture diagram of the GitHub repository mario-659/funeralmanagementsystem, 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/mario-659/funeralmanagementsystem
- Repository: https://github.com/mario-659/funeralmanagementsystem

## Overview

This is a Rails web application for managing funeral-planning records, funeral services and their orders, user accounts, and mourning cards. The principal workflow is a browser request routed to a controller, which creates, retrieves, or updates domain records; mourning-card requests can also generate a PDF. Controllers and model paths are supported by the tree and sampled code. Some controller-to-model links and persistence behavior are inferred from Rails conventions; unsampled details are not expanded.

Main entry points: [`config/routes.rb`](https://github.com/mario-659/funeralmanagementsystem/blob/master/config/routes.rb) (Routes), [`db/schema.rb`](https://github.com/mario-659/funeralmanagementsystem/blob/master/db/schema.rb) (Application database), [`app/controllers/mourning_cards_controller.rb`](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/mourning_cards_controller.rb) (Card controller), [`app/models/user.rb`](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/user.rb) (User record)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_routes["Routes<br/>[routes.rb]"]
  node_home["Home controller<br/>[home_controller.rb]"]
end

subgraph group_planning["Funeral planning"]
  node_deceased_ctl["Deceased controller"]
  node_funeral_ctl["Funeral controller"]
  node_service_ctl["Services controller"]
  node_order_ctl["Orders controller"]
  node_deceased["Deceased record<br/>[deceased.rb]"]
  node_funeral["Funeral record<br/>[funeral.rb]"]
  node_service["Funeral service<br/>[funeral_service.rb]"]
  node_order["Service order"]
end

subgraph group_memorial["Memorial cards"]
  node_card_ctl["Card controller"]
  node_card["Mourning card<br/>[mourning_card.rb]"]
  node_pdf["Card PDF"]
end

subgraph group_identity["Accounts and data"]
  node_user_ctl["User controller"]
  node_registration_ctl["Registration controller"]
  node_user["User record<br/>[user.rb]"]
  node_database[("Application database<br/>[schema.rb]")]
end

node_visitor(("User"))

node_visitor -->|"sends request"| node_routes
node_routes -->|"dispatches"| node_home
node_routes -->|"dispatches"| node_deceased_ctl
node_routes -->|"dispatches"| node_funeral_ctl
node_routes -->|"dispatches"| node_service_ctl
node_routes -->|"dispatches"| node_order_ctl
node_routes -->|"dispatches"| node_card_ctl
node_routes -->|"dispatches"| node_user_ctl
node_routes -->|"dispatches"| node_registration_ctl
node_deceased_ctl -->|"reads/writes"| node_deceased
node_funeral_ctl -->|"reads/writes"| node_funeral
node_service_ctl -->|"reads/writes"| node_service
node_order_ctl -->|"reads/writes"| node_order
node_card_ctl -->|"reads/writes"| node_card
node_card_ctl -->|"renders"| node_pdf
node_user_ctl -->|"reads/writes"| node_user
node_registration_ctl -->|"creates account"| node_user
node_deceased -->|"persists"| node_database
node_funeral -->|"persists"| node_database
node_service -->|"persists"| node_database
node_order -->|"persists"| node_database
node_card -->|"persists"| node_database
node_user -->|"persists"| node_database

click node_routes "https://github.com/mario-659/funeralmanagementsystem/blob/master/config/routes.rb"
click node_home "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/home_controller.rb"
click node_deceased_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/deceaseds_controller.rb"
click node_funeral_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/funerals_controller.rb"
click node_service_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/funeral_services_controller.rb"
click node_order_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/funeral_service_orders_controller.rb"
click node_deceased "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/deceased.rb"
click node_funeral "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/funeral.rb"
click node_service "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/funeral_service.rb"
click node_order "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/funeral_service_order.rb"
click node_card_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/mourning_cards_controller.rb"
click node_card "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/mourning_card.rb"
click node_pdf "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/pdf/mourning_card_pdf.rb"
click node_user_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/users_controller.rb"
click node_registration_ctl "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/users/registrations_controller.rb"
click node_user "https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/user.rb"
click node_database "https://github.com/mario-659/funeralmanagementsystem/blob/master/db/schema.rb"

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,node_home,node_visitor toneBlue
class node_deceased_ctl,node_funeral_ctl,node_service_ctl,node_order_ctl,node_deceased,node_funeral,node_service,node_order toneAmber
class node_card_ctl,node_card,node_pdf toneMint
class node_user_ctl,node_registration_ctl,node_user,node_database toneRose
```

## Components

### Web entry

- [Routes](https://github.com/mario-659/funeralmanagementsystem/blob/master/config/routes.rb): `config/routes.rb`
- [Home controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/home_controller.rb): `app/controllers/home_controller.rb`

### Funeral planning

- [Deceased controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/deceaseds_controller.rb): `app/controllers/deceaseds_controller.rb`
- [Funeral controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/funerals_controller.rb): `app/controllers/funerals_controller.rb`
- [Services controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/funeral_services_controller.rb): `app/controllers/funeral_services_controller.rb`
- [Orders controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/funeral_service_orders_controller.rb): `app/controllers/funeral_service_orders_controller.rb`
- [Deceased record](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/deceased.rb): `app/models/deceased.rb`
- [Funeral record](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/funeral.rb): `app/models/funeral.rb`
- [Funeral service](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/funeral_service.rb): `app/models/funeral_service.rb`
- [Service order](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/funeral_service_order.rb): `app/models/funeral_service_order.rb`

### Memorial cards

- [Card controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/mourning_cards_controller.rb): `app/controllers/mourning_cards_controller.rb`
- [Mourning card](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/mourning_card.rb): `app/models/mourning_card.rb`
- [Card PDF](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/pdf/mourning_card_pdf.rb): `app/pdf/mourning_card_pdf.rb`

### Accounts and data

- [User controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/users_controller.rb): `app/controllers/users_controller.rb`
- [Registration controller](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/controllers/users/registrations_controller.rb): `app/controllers/users/registrations_controller.rb`
- [User record](https://github.com/mario-659/funeralmanagementsystem/blob/master/app/models/user.rb): `app/models/user.rb`
- [Application database](https://github.com/mario-659/funeralmanagementsystem/blob/master/db/schema.rb): `db/schema.rb`

### Other components

- **User**

## Connections

- User → Routes: sends request
- Routes → Home controller: dispatches
- Routes → Deceased controller: dispatches
- Routes → Funeral controller: dispatches
- Routes → Services controller: dispatches
- Routes → Orders controller: dispatches
- Routes → Card controller: dispatches
- Routes → User controller: dispatches
- Routes → Registration controller: dispatches
- Deceased controller → Deceased record: reads/writes
- Funeral controller → Funeral record: reads/writes
- Services controller → Funeral service: reads/writes
- Orders controller → Service order: reads/writes
- Card controller → Mourning card: reads/writes
- Card controller → Card PDF: renders
- User controller → User record: reads/writes
- Registration controller → User record: creates account
- Deceased record → Application database: persists
- Funeral record → Application database: persists
- Funeral service → Application database: persists
- Service order → Application database: persists
- Mourning card → Application database: persists
- User record → Application database: persists
