# chis132060/connectguidance architecture

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

## Overview

GuidanceConnect is a role-based counseling management application. Students book or cancel appointments and submit wellness check-ins; counselors manage appointments and encrypted case notes; receptionists book walk-ins; administrators manage users, analytics, audits, and exports. Django role-specific views handle requests and delegate business operations to services backed by shared domain models. The README documents these capabilities, while source excerpts and the SOURCE INDEX support the specific service-call relationships shown. Some subsystems are represented by their exact enclosing directory because their implementation was not excerpted.

Main entry points: [`core/services/appointments.py`](https://github.com/chis132060/connectguidance/blob/main/core/services/appointments.py) (Appointment Lifecycle), [`core/views/student.py`](https://github.com/chis132060/connectguidance/blob/main/core/views/student.py) (Student Routes), [`core/views/admin_views.py`](https://github.com/chis132060/connectguidance/blob/main/core/views/admin_views.py) (Admin Routes), [`core/models.py`](https://github.com/chis132060/connectguidance/blob/main/core/models.py) (Guidance Domain Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Roles"]
  node_auth_views["Authentication<br/>[auth.py]"]
  node_forms["Input Forms<br/>[forms.py]"]
  node_guards["Role Guards<br/>[guards.py]"]
end

subgraph group_appointments["Appointments"]
  node_student_views["Student Routes<br/>[student.py]"]
  node_counselor_views["Counselor Routes<br/>[counselor.py]"]
  node_reception_views["Reception Routes<br/>[receptionist.py]"]
  node_slots["Slot Availability<br/>[slots.py]"]
  node_appointments_service["Appointment Lifecycle<br/>[appointments.py]"]
  node_reception_service["Walk-in Booking<br/>[receptionist.py]"]
end

subgraph group_wellness["Counseling and Wellness"]
  node_mood["Mood Check-ins<br/>[mood.py]"]
  node_chat_views["Chat Endpoint<br/>[chat.py]"]
  node_chat_service["AI Chat and Safety<br/>[chat.py]"]
  node_case_notes["Encrypted Case Notes<br/>[case_notes.py]"]
  node_encryption["Note Encryption<br/>[encryption.py]"]
end

subgraph group_operations["Administration"]
  node_admin_views["Admin Routes<br/>[admin_views.py]"]
  node_admin_users["User Safeguards<br/>[admin_users.py]"]
  node_metrics["Executive Metrics<br/>[metrics.py]"]
  node_reports["Reports and Exports<br/>[reports.py]"]
  node_audit["Audit Logging<br/>[audit.py]"]
end

subgraph group_data["Domain Data"]
  node_models["Guidance Domain Models<br/>[models.py]"]
  node_database[("Relational Database")]
  node_choices["Domain Choices<br/>[choices.py]"]
end

node_student(("Student"))
node_counselor(("Counselor"))
node_receptionist(("Receptionist"))
node_administrator(("Administrator"))
node_llm_provider{{"LLM Providers"}}

node_student -->|"signs in"| node_auth_views
node_student -->|"uses"| node_student_views
node_counselor -->|"uses"| node_counselor_views
node_receptionist -->|"uses"| node_reception_views
node_administrator -->|"uses"| node_admin_views
node_auth_views -->|"validates registration"| node_forms
node_student_views -->|"enforces role"| node_guards
node_counselor_views -->|"enforces role"| node_guards
node_reception_views -->|"enforces role"| node_guards
node_admin_views -->|"enforces role"| node_guards
node_student_views -->|"books or cancels"| node_appointments_service
node_student_views -->|"requests availability"| node_slots
node_appointments_service -->|"checks conflicts"| node_slots
node_reception_views -->|"requests walk-in booking"| node_reception_service
node_reception_service -->|"books appointment"| node_appointments_service
node_reception_service -->|"finds next slot"| node_slots
node_student_views -->|"processes check-in"| node_mood
node_chat_views -->|"streams chat"| node_chat_service
node_chat_service -->|"streams completion"| node_llm_provider
node_counselor_views -->|"updates status"| node_appointments_service
node_counselor_views -->|"manages notes"| node_case_notes
node_case_notes -->|"encrypts content"| node_encryption
node_admin_views -->|"manages accounts"| node_admin_users
node_admin_views -->|"loads analytics"| node_metrics
node_admin_views -->|"generates exports"| node_reports
node_reports -->|"uses analytics"| node_metrics
node_appointments_service -->|"records actions"| node_audit
node_case_notes -->|"records actions"| node_audit
node_admin_users -->|"records changes"| node_audit
node_reports -->|"records exports"| node_audit
node_models -->|"persists domain data"| node_database
node_appointments_service -->|"reads and writes"| node_models
node_slots -->|"reads appointments"| node_models
node_audit -->|"writes audit entries"| node_models
node_models -->|"defines field values"| node_choices

click node_auth_views "https://github.com/chis132060/connectguidance/blob/main/core/views/auth.py"
click node_forms "https://github.com/chis132060/connectguidance/blob/main/core/forms.py"
click node_guards "https://github.com/chis132060/connectguidance/blob/main/core/guards.py"
click node_student_views "https://github.com/chis132060/connectguidance/blob/main/core/views/student.py"
click node_counselor_views "https://github.com/chis132060/connectguidance/blob/main/core/views/counselor.py"
click node_reception_views "https://github.com/chis132060/connectguidance/blob/main/core/views/receptionist.py"
click node_slots "https://github.com/chis132060/connectguidance/blob/main/core/services/slots.py"
click node_appointments_service "https://github.com/chis132060/connectguidance/blob/main/core/services/appointments.py"
click node_reception_service "https://github.com/chis132060/connectguidance/blob/main/core/services/receptionist.py"
click node_mood "https://github.com/chis132060/connectguidance/blob/main/core/services/mood.py"
click node_chat_views "https://github.com/chis132060/connectguidance/blob/main/core/views/chat.py"
click node_chat_service "https://github.com/chis132060/connectguidance/blob/main/core/services/chat.py"
click node_case_notes "https://github.com/chis132060/connectguidance/blob/main/core/services/case_notes.py"
click node_encryption "https://github.com/chis132060/connectguidance/blob/main/core/services/encryption.py"
click node_admin_views "https://github.com/chis132060/connectguidance/blob/main/core/views/admin_views.py"
click node_admin_users "https://github.com/chis132060/connectguidance/blob/main/core/services/admin_users.py"
click node_metrics "https://github.com/chis132060/connectguidance/blob/main/core/services/metrics.py"
click node_reports "https://github.com/chis132060/connectguidance/blob/main/core/services/reports.py"
click node_audit "https://github.com/chis132060/connectguidance/blob/main/core/services/audit.py"
click node_models "https://github.com/chis132060/connectguidance/blob/main/core/models.py"
click node_choices "https://github.com/chis132060/connectguidance/blob/main/core/choices.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_auth_views,node_forms,node_guards toneBlue
class node_student_views,node_counselor_views,node_reception_views,node_slots,node_appointments_service,node_reception_service toneAmber
class node_mood,node_chat_views,node_chat_service,node_case_notes,node_encryption toneMint
class node_admin_views,node_admin_users,node_metrics,node_reports,node_audit toneRose
class node_models,node_database,node_choices,node_student,node_counselor,node_receptionist,node_administrator,node_llm_provider toneIndigo
```

## Components

### Access and Roles

- [Authentication](https://github.com/chis132060/connectguidance/blob/main/core/views/auth.py): `core/views/auth.py`
- [Input Forms](https://github.com/chis132060/connectguidance/blob/main/core/forms.py): `core/forms.py`
- [Role Guards](https://github.com/chis132060/connectguidance/blob/main/core/guards.py): `core/guards.py`

### Appointments

- [Student Routes](https://github.com/chis132060/connectguidance/blob/main/core/views/student.py): `core/views/student.py`
- [Counselor Routes](https://github.com/chis132060/connectguidance/blob/main/core/views/counselor.py): `core/views/counselor.py`
- [Reception Routes](https://github.com/chis132060/connectguidance/blob/main/core/views/receptionist.py): `core/views/receptionist.py`
- [Slot Availability](https://github.com/chis132060/connectguidance/blob/main/core/services/slots.py): `core/services/slots.py`
- [Appointment Lifecycle](https://github.com/chis132060/connectguidance/blob/main/core/services/appointments.py): `core/services/appointments.py`
- [Walk-in Booking](https://github.com/chis132060/connectguidance/blob/main/core/services/receptionist.py): `core/services/receptionist.py`

### Counseling and Wellness

- [Mood Check-ins](https://github.com/chis132060/connectguidance/blob/main/core/services/mood.py): `core/services/mood.py`
- [Chat Endpoint](https://github.com/chis132060/connectguidance/blob/main/core/views/chat.py): `core/views/chat.py`
- [AI Chat and Safety](https://github.com/chis132060/connectguidance/blob/main/core/services/chat.py): `core/services/chat.py`
- [Encrypted Case Notes](https://github.com/chis132060/connectguidance/blob/main/core/services/case_notes.py): `core/services/case_notes.py`
- [Note Encryption](https://github.com/chis132060/connectguidance/blob/main/core/services/encryption.py): `core/services/encryption.py`

### Administration

- [Admin Routes](https://github.com/chis132060/connectguidance/blob/main/core/views/admin_views.py): `core/views/admin_views.py`
- [User Safeguards](https://github.com/chis132060/connectguidance/blob/main/core/services/admin_users.py): `core/services/admin_users.py`
- [Executive Metrics](https://github.com/chis132060/connectguidance/blob/main/core/services/metrics.py): `core/services/metrics.py`
- [Reports and Exports](https://github.com/chis132060/connectguidance/blob/main/core/services/reports.py): `core/services/reports.py`
- [Audit Logging](https://github.com/chis132060/connectguidance/blob/main/core/services/audit.py): `core/services/audit.py`

### Domain Data

- [Guidance Domain Models](https://github.com/chis132060/connectguidance/blob/main/core/models.py): `core/models.py`
- **Relational Database**
- [Domain Choices](https://github.com/chis132060/connectguidance/blob/main/core/choices.py): `core/choices.py`

### Other components

- **Student**
- **Counselor**
- **Receptionist**
- **Administrator**
- **LLM Providers**

## Connections

- Student → Authentication: signs in (evidence: `README.md`)
- Student → Student Routes: uses (evidence: `README.md`)
- Counselor → Counselor Routes: uses (evidence: `README.md`)
- Receptionist → Reception Routes: uses (evidence: `README.md`)
- Administrator → Admin Routes: uses (evidence: `README.md`)
- Authentication → Input Forms: validates registration (evidence: `core/views/auth.py`)
- Student Routes → Role Guards: enforces role (evidence: `core/views/student.py`)
- Counselor Routes → Role Guards: enforces role (evidence: `core/views/counselor.py`)
- Reception Routes → Role Guards: enforces role (evidence: `core/views/receptionist.py`)
- Admin Routes → Role Guards: enforces role (evidence: `core/views/admin_views.py`)
- Student Routes → Appointment Lifecycle: books or cancels (evidence: `core/views/student.py`)
- Student Routes → Slot Availability: requests availability (evidence: `core/views/student.py`)
- Appointment Lifecycle → Slot Availability: checks conflicts (evidence: `core/services/appointments.py`)
- Reception Routes → Walk-in Booking: requests walk-in booking (evidence: `core/views/receptionist.py`)
- Walk-in Booking → Appointment Lifecycle: books appointment (evidence: `core/services/receptionist.py`)
- Walk-in Booking → Slot Availability: finds next slot (evidence: `core/services/receptionist.py`)
- Student Routes → Mood Check-ins: processes check-in (evidence: `core/views/student.py`)
- Chat Endpoint → AI Chat and Safety: streams chat (evidence: `core/views/chat.py`)
- AI Chat and Safety → LLM Providers: streams completion (evidence: `core/services/chat.py`)
- Counselor Routes → Appointment Lifecycle: updates status (evidence: `core/views/counselor.py`)
- Counselor Routes → Encrypted Case Notes: manages notes (evidence: `core/views/counselor.py`)
- Encrypted Case Notes → Note Encryption: encrypts content (evidence: `core/services/case_notes.py`)
- Admin Routes → User Safeguards: manages accounts (evidence: `core/views/admin_views.py`)
- Admin Routes → Executive Metrics: loads analytics (evidence: `core/views/admin_views.py`)
- Admin Routes → Reports and Exports: generates exports (evidence: `core/views/admin_views.py`)
- Reports and Exports → Executive Metrics: uses analytics (evidence: `core/services/reports.py`)
- Appointment Lifecycle → Audit Logging: records actions (evidence: `core/services/appointments.py`)
- Encrypted Case Notes → Audit Logging: records actions (evidence: `core/services/case_notes.py`)
- User Safeguards → Audit Logging: records changes (evidence: `core/services/admin_users.py`)
- Reports and Exports → Audit Logging: records exports (evidence: `core/services/reports.py`)
- Guidance Domain Models → Relational Database: persists domain data (evidence: `README.md`)
- Appointment Lifecycle → Guidance Domain Models: reads and writes (evidence: `core/services/appointments.py`)
- Slot Availability → Guidance Domain Models: reads appointments (evidence: `core/services/slots.py`)
- Audit Logging → Guidance Domain Models: writes audit entries (evidence: `core/services/audit.py`)
- Guidance Domain Models → Domain Choices: defines field values (evidence: `core/models.py`)
