# mikchell/pulseee architecture

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

- Interactive diagram: https://gitdiagram.com/mikchell/pulseee
- Repository: https://github.com/mikchell/pulseee

## Overview

Pulseee is a Rails employee-pulse survey application. Its user-facing flow covers Google or development login, assigned survey responses, and administrative score and response-rate views; administrators also have survey creation, unanswered-user notifications, and CSV export capabilities. The graph includes the central models and background-work areas named in the source tree, but their internal call paths are not shown in the excerpts. Dashed edges mark documented product capabilities whose implementation wiring was not sampled.

Main entry points: [`db/schema.rb`](https://github.com/mikchell/pulseee/blob/main/db/schema.rb) (Application database), [`app/controllers/admin/team_weekly_scores_controller.rb`](https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/team_weekly_scores_controller.rb) (Team score dashboard), [`app/controllers/survey_responses_controller.rb`](https://github.com/mikchell/pulseee/blob/main/app/controllers/survey_responses_controller.rb) (Survey response), [`config/routes.rb`](https://github.com/mikchell/pulseee/blob/main/config/routes.rb) (HTTP routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and responses"]
  node_sessions["Session authentication"]
  node_home["Home and login<br/>[home_controller.rb]"]
  node_response_flow["Survey response"]
  node_score_ui["Score choice UI"]
end

subgraph group_survey_ops["Survey operations"]
  node_survey_admin["Survey operations"]
  node_survey_creation["Weekly survey creation"]
  node_creation_job["Survey creation job"]
  node_unanswered_query["Unanswered users query"]
  node_notify_job["Unanswered notification job"]
  node_slack_notify["Slack notification"]
  node_weekly_job["Weekly aggregation job"]
end

subgraph group_analytics["Analytics and export"]
  node_results_admin["Survey results export route"]
  node_csv_export["CSV exporter"]
  node_team_scores["Team score dashboard"]
  node_response_rates["Weekly response rates"]
end

subgraph group_platform["Application data and runtime"]
  node_assignments["Survey assignments"]
  node_survey_model["Survey and questions<br/>[survey.rb]"]
  node_answer_models["Survey answers<br/>[score_answer.rb]"]
  node_free_text["Free-text answers"]
  node_groups["Groups and snapshots"]
  node_user_model["Users and roles<br/>[user.rb]"]
  node_database[("Application database<br/>[schema.rb]")]
  node_routes["HTTP routes<br/>[routes.rb]"]
  node_app_config["Rails application config<br/>[application.rb]"]
  node_boot_config["Boot config<br/>[boot.rb]"]
  node_environment_config["Environment initialization<br/>[environment.rb]"]
end

node_employee(("Employee"))
node_administrator(("Administrator"))
node_google{{"Google OAuth"}}

node_employee -->|"signs in"| node_sessions
node_google -->|"returns callback"| node_sessions
node_administrator -->|"manages surveys"| node_survey_admin
node_administrator -->|"requests CSV"| node_results_admin
node_administrator -->|"views scores"| node_team_scores
node_employee -->|"submits response"| node_response_flow
node_sessions -->|"looks up user"| node_user_model
node_sessions -.->|"stores session state"| node_database
node_response_flow -.->|"handles assignment"| node_assignments
node_response_flow -.->|"records answers"| node_answer_models
node_response_flow -.->|"serves survey"| node_survey_model
node_score_ui -.->|"supports selection"| node_response_flow
node_survey_admin -.->|"creates survey"| node_survey_creation
node_creation_job -.->|"runs creation"| node_survey_creation
node_survey_admin -.->|"finds pending users"| node_unanswered_query
node_notify_job -.->|"queries pending users"| node_unanswered_query
node_notify_job -.->|"sends notification"| node_slack_notify
node_weekly_job -.->|"aggregates data"| node_database
node_results_admin -.->|"exports results"| node_csv_export
node_team_scores -->|"queries rates"| node_response_rates
node_team_scores -->|"selects completed surveys"| node_survey_model
node_team_scores -->|"reads scores"| node_answer_models
node_team_scores -->|"groups by snapshot"| node_groups
node_response_rates -->|"loads active surveys"| node_survey_model
node_response_rates -->|"counts submissions"| node_assignments
node_assignments -.->|"persists assignments"| node_database
node_survey_model -.->|"persists surveys"| node_database
node_answer_models -.->|"persists answers"| node_database
node_free_text -.->|"persists text answers"| node_database
node_groups -.->|"persists group snapshots"| node_database
node_user_model -.->|"persists users"| node_database
node_routes -->|"routes callbacks"| node_sessions
node_routes -->|"routes responses"| node_response_flow
node_routes -->|"routes operations"| node_survey_admin
node_routes -->|"routes results"| node_results_admin
node_routes -->|"routes dashboard"| node_team_scores
node_environment_config -->|"initializes application"| node_app_config
node_app_config -->|"loads boot"| node_boot_config

click node_sessions "https://github.com/mikchell/pulseee/blob/main/app/controllers/sessions_controller.rb"
click node_home "https://github.com/mikchell/pulseee/blob/main/app/controllers/home_controller.rb"
click node_response_flow "https://github.com/mikchell/pulseee/blob/main/app/controllers/survey_responses_controller.rb"
click node_score_ui "https://github.com/mikchell/pulseee/blob/main/app/javascript/controllers/score_choice_controller.js"
click node_assignments "https://github.com/mikchell/pulseee/blob/main/app/models/survey_assignment.rb"
click node_survey_model "https://github.com/mikchell/pulseee/blob/main/app/models/survey.rb"
click node_answer_models "https://github.com/mikchell/pulseee/blob/main/app/models/score_answer.rb"
click node_free_text "https://github.com/mikchell/pulseee/blob/main/app/models/free_text_answer.rb"
click node_groups "https://github.com/mikchell/pulseee/blob/main/app/models/answer_group_snapshot.rb"
click node_survey_admin "https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/survey_operations_controller.rb"
click node_survey_creation "https://github.com/mikchell/pulseee/blob/main/app/services/surveys/create_current_week_survey.rb"
click node_creation_job "https://github.com/mikchell/pulseee/blob/main/app/jobs/survey_creation_job.rb"
click node_unanswered_query "https://github.com/mikchell/pulseee/blob/main/app/services/surveys/unanswered_users_query.rb"
click node_notify_job "https://github.com/mikchell/pulseee/blob/main/app/jobs/survey_unanswered_notification_job.rb"
click node_slack_notify "https://github.com/mikchell/pulseee/blob/main/app/services/slack/survey_unanswered_notifier.rb"
click node_weekly_job "https://github.com/mikchell/pulseee/blob/main/app/jobs/survey_weekly_aggregation_job.rb"
click node_results_admin "https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/survey_results_controller.rb"
click node_csv_export "https://github.com/mikchell/pulseee/blob/main/app/services/survey_result_csv_exporter.rb"
click node_team_scores "https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/team_weekly_scores_controller.rb"
click node_response_rates "https://github.com/mikchell/pulseee/blob/main/app/services/surveys/weekly_response_rates_query.rb"
click node_user_model "https://github.com/mikchell/pulseee/blob/main/app/models/user.rb"
click node_database "https://github.com/mikchell/pulseee/blob/main/db/schema.rb"
click node_routes "https://github.com/mikchell/pulseee/blob/main/config/routes.rb"
click node_app_config "https://github.com/mikchell/pulseee/blob/main/config/application.rb"
click node_boot_config "https://github.com/mikchell/pulseee/blob/main/config/boot.rb"
click node_environment_config "https://github.com/mikchell/pulseee/blob/main/config/environment.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_sessions,node_home,node_response_flow,node_score_ui toneBlue
class node_survey_admin,node_survey_creation,node_creation_job,node_unanswered_query,node_notify_job,node_slack_notify,node_weekly_job toneAmber
class node_results_admin,node_csv_export,node_team_scores,node_response_rates toneMint
class node_assignments,node_survey_model,node_answer_models,node_free_text,node_groups,node_user_model,node_database,node_routes,node_app_config,node_boot_config,node_environment_config toneRose
class node_employee,node_administrator,node_google toneIndigo
```

## Components

### Access and responses

- [Session authentication](https://github.com/mikchell/pulseee/blob/main/app/controllers/sessions_controller.rb): `app/controllers/sessions_controller.rb`
- [Home and login](https://github.com/mikchell/pulseee/blob/main/app/controllers/home_controller.rb): `app/controllers/home_controller.rb`
- [Survey response](https://github.com/mikchell/pulseee/blob/main/app/controllers/survey_responses_controller.rb): `app/controllers/survey_responses_controller.rb`
- [Score choice UI](https://github.com/mikchell/pulseee/blob/main/app/javascript/controllers/score_choice_controller.js): `app/javascript/controllers/score_choice_controller.js`

### Survey operations

- [Survey operations](https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/survey_operations_controller.rb): `app/controllers/admin/survey_operations_controller.rb`
- [Weekly survey creation](https://github.com/mikchell/pulseee/blob/main/app/services/surveys/create_current_week_survey.rb): `app/services/surveys/create_current_week_survey.rb`
- [Survey creation job](https://github.com/mikchell/pulseee/blob/main/app/jobs/survey_creation_job.rb): `app/jobs/survey_creation_job.rb`
- [Unanswered users query](https://github.com/mikchell/pulseee/blob/main/app/services/surveys/unanswered_users_query.rb): `app/services/surveys/unanswered_users_query.rb`
- [Unanswered notification job](https://github.com/mikchell/pulseee/blob/main/app/jobs/survey_unanswered_notification_job.rb): `app/jobs/survey_unanswered_notification_job.rb`
- [Slack notification](https://github.com/mikchell/pulseee/blob/main/app/services/slack/survey_unanswered_notifier.rb): `app/services/slack/survey_unanswered_notifier.rb`
- [Weekly aggregation job](https://github.com/mikchell/pulseee/blob/main/app/jobs/survey_weekly_aggregation_job.rb): `app/jobs/survey_weekly_aggregation_job.rb`

### Analytics and export

- [Survey results export route](https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/survey_results_controller.rb): `app/controllers/admin/survey_results_controller.rb`
- [CSV exporter](https://github.com/mikchell/pulseee/blob/main/app/services/survey_result_csv_exporter.rb): `app/services/survey_result_csv_exporter.rb`
- [Team score dashboard](https://github.com/mikchell/pulseee/blob/main/app/controllers/admin/team_weekly_scores_controller.rb): `app/controllers/admin/team_weekly_scores_controller.rb`
- [Weekly response rates](https://github.com/mikchell/pulseee/blob/main/app/services/surveys/weekly_response_rates_query.rb): `app/services/surveys/weekly_response_rates_query.rb`

### Application data and runtime

- [Survey assignments](https://github.com/mikchell/pulseee/blob/main/app/models/survey_assignment.rb): `app/models/survey_assignment.rb`
- [Survey and questions](https://github.com/mikchell/pulseee/blob/main/app/models/survey.rb): `app/models/survey.rb`
- [Survey answers](https://github.com/mikchell/pulseee/blob/main/app/models/score_answer.rb): `app/models/score_answer.rb`
- [Free-text answers](https://github.com/mikchell/pulseee/blob/main/app/models/free_text_answer.rb): `app/models/free_text_answer.rb`
- [Groups and snapshots](https://github.com/mikchell/pulseee/blob/main/app/models/answer_group_snapshot.rb): `app/models/answer_group_snapshot.rb`
- [Users and roles](https://github.com/mikchell/pulseee/blob/main/app/models/user.rb): `app/models/user.rb`
- [Application database](https://github.com/mikchell/pulseee/blob/main/db/schema.rb): `db/schema.rb`
- [HTTP routes](https://github.com/mikchell/pulseee/blob/main/config/routes.rb): `config/routes.rb`
- [Rails application config](https://github.com/mikchell/pulseee/blob/main/config/application.rb): `config/application.rb`
- [Boot config](https://github.com/mikchell/pulseee/blob/main/config/boot.rb): `config/boot.rb`
- [Environment initialization](https://github.com/mikchell/pulseee/blob/main/config/environment.rb): `config/environment.rb`

### Other components

- **Employee**
- **Administrator**
- **Google OAuth**

## Connections

- Employee → Session authentication: signs in
- Google OAuth → Session authentication: returns callback
- Administrator → Survey operations: manages surveys
- Administrator → Survey results export route: requests CSV
- Administrator → Team score dashboard: views scores
- Employee → Survey response: submits response
- Session authentication → Users and roles: looks up user (evidence: `app/controllers/sessions_controller.rb`)
- Session authentication → Application database: stores session state
- Survey response → Survey assignments: handles assignment
- Survey response → Survey answers: records answers
- Survey response → Survey and questions: serves survey
- Score choice UI → Survey response: supports selection
- Survey operations → Weekly survey creation: creates survey
- Survey creation job → Weekly survey creation: runs creation
- Survey operations → Unanswered users query: finds pending users
- Unanswered notification job → Unanswered users query: queries pending users
- Unanswered notification job → Slack notification: sends notification
- Weekly aggregation job → Application database: aggregates data
- Survey results export route → CSV exporter: exports results
- Team score dashboard → Weekly response rates: queries rates (evidence: `app/controllers/admin/team_weekly_scores_controller.rb`)
- Team score dashboard → Survey and questions: selects completed surveys (evidence: `app/controllers/admin/team_weekly_scores_controller.rb`)
- Team score dashboard → Survey answers: reads scores (evidence: `app/controllers/admin/team_weekly_scores_controller.rb`)
- Team score dashboard → Groups and snapshots: groups by snapshot (evidence: `app/controllers/admin/team_weekly_scores_controller.rb`)
- Weekly response rates → Survey and questions: loads active surveys (evidence: `app/services/surveys/weekly_response_rates_query.rb`)
- Weekly response rates → Survey assignments: counts submissions (evidence: `app/services/surveys/weekly_response_rates_query.rb`)
- Survey assignments → Application database: persists assignments
- Survey and questions → Application database: persists surveys
- Survey answers → Application database: persists answers
- Free-text answers → Application database: persists text answers
- Groups and snapshots → Application database: persists group snapshots
- Users and roles → Application database: persists users
- HTTP routes → Session authentication: routes callbacks (evidence: `config/routes.rb`)
- HTTP routes → Survey response: routes responses (evidence: `config/routes.rb`)
- HTTP routes → Survey operations: routes operations (evidence: `config/routes.rb`)
- HTTP routes → Survey results export route: routes results (evidence: `config/routes.rb`)
- HTTP routes → Team score dashboard: routes dashboard (evidence: `config/routes.rb`)
- Environment initialization → Rails application config: initializes application (evidence: `config/environment.rb`)
- Rails application config → Boot config: loads boot (evidence: `config/application.rb`)
