# bhavyaanand2101-coder/bytexl_hackathon_2026_oct architecture

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

- Interactive diagram: https://gitdiagram.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct
- Repository: https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct

## Overview

CampusPulse turns campus records into deterministic, explainable student-success assessments and advisor actions. Its primary workflow is file ingestion, cleaning and enrichment, scoring and segmentation, persistence, then advisor-facing API access and intervention tracking. The README also describes competitive intelligence and ML-assisted risk analysis; these are included as distinct capabilities. Source excerpts and the SOURCE INDEX support the main pipeline and several API dependencies, but not every route-level interaction, so uncertain links are omitted.

Main entry points: [`apps/api/main.py`](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/apps/api/main.py) (CampusPulse API), [`services/pipeline.py`](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/pipeline.py) (Pipeline Orchestrator), [`services/enrichment/rules_layer.py`](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/rules_layer.py) (Rule Enrichment), [`adapters/postgres/repository.py`](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/adapters/postgres/repository.py) (Data Repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data Preparation"]
  node_pipeline["Pipeline Orchestrator<br/>[pipeline.py]"]
  node_loader["File Ingestion<br/>[loader.py]"]
  node_cleaner["Data Cleaning<br/>[cleaner.py]"]
end

subgraph group_analysis["Success Analysis"]
  node_rules["Rule Enrichment<br/>[rules_layer.py]"]
  node_scores["Score Model<br/>[scores.py]"]
  node_segments["Student Segments<br/>[segments.py]"]
  node_flags["Risk Flags<br/>[flags.py]"]
  node_stats["Statistical Enrichment<br/>[stat_layer.py]"]
  node_ml["ML Risk Analysis<br/>[ml_layer.py]"]
end

subgraph group_service["Advisor Services"]
  node_notes["Advisor Notes<br/>[nl_layer.py]"]
  node_api["CampusPulse API<br/>[main.py]"]
  node_schemas["API Schemas<br/>[schemas.py]"]
  node_competitive["Competitive Intelligence<br/>[competitive.py]"]
end

subgraph group_storage["Persistence"]
  node_repository["Data Repository<br/>[repository.py]"]
  node_models["Database Models<br/>[models.py]"]
  node_database[("Student Data Store")]
end

node_campus_data["Campus Files"]
node_advisor(("Faculty Advisor"))

node_campus_data -->|"supplies files"| node_loader
node_pipeline -->|"invokes ingestion"| node_loader
node_loader -->|"cleans rows"| node_cleaner
node_pipeline -->|"enriches records"| node_rules
node_rules -->|"calculates scores"| node_scores
node_rules -->|"assigns segments"| node_segments
node_pipeline -->|"evaluates flags"| node_flags
node_pipeline -->|"uses enrichment"| node_stats
node_pipeline -->|"renders guidance"| node_notes
node_pipeline -->|"persists records"| node_models
node_advisor -->|"requests insights"| node_api
node_api -->|"queries records"| node_repository
node_api -->|"runs processing"| node_pipeline
node_api -->|"uses schemas"| node_schemas
node_api -->|"uses scoring"| node_scores
node_api -->|"uses segments"| node_segments
node_api -->|"uses risk analysis"| node_ml
node_api -->|"uses advisor copy"| node_notes
node_api -->|"serves intelligence"| node_competitive
node_repository -->|"queries models"| node_models
node_repository -.->|"reads and writes"| node_database
node_pipeline -.->|"stores results"| node_database

click node_pipeline "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/pipeline.py"
click node_loader "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/ingestion/loader.py"
click node_cleaner "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/cleaning/cleaner.py"
click node_rules "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/rules_layer.py"
click node_scores "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/scores.py"
click node_segments "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/segments.py"
click node_flags "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/flags.py"
click node_stats "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/stat_layer.py"
click node_ml "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/ml_layer.py"
click node_notes "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/nl_layer.py"
click node_api "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/apps/api/main.py"
click node_schemas "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/apps/api/schemas.py"
click node_competitive "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/competitive.py"
click node_repository "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/adapters/postgres/repository.py"
click node_models "https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/adapters/postgres/models.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_pipeline,node_loader,node_cleaner toneBlue
class node_rules,node_scores,node_segments,node_flags,node_stats,node_ml toneAmber
class node_notes,node_api,node_schemas,node_competitive toneMint
class node_repository,node_models,node_database toneRose
class node_campus_data,node_advisor toneIndigo
```

## Components

### Data Preparation

- [Pipeline Orchestrator](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/pipeline.py): `services/pipeline.py`
- [File Ingestion](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/ingestion/loader.py): `services/ingestion/loader.py`
- [Data Cleaning](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/cleaning/cleaner.py): `services/cleaning/cleaner.py`

### Success Analysis

- [Rule Enrichment](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/rules_layer.py): `services/enrichment/rules_layer.py`
- [Score Model](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/scores.py): `packages/domain/scores.py`
- [Student Segments](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/segments.py): `packages/domain/segments.py`
- [Risk Flags](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/flags.py): `packages/domain/flags.py`
- [Statistical Enrichment](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/stat_layer.py): `services/enrichment/stat_layer.py`
- [ML Risk Analysis](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/ml_layer.py): `services/enrichment/ml_layer.py`

### Advisor Services

- [Advisor Notes](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/services/enrichment/nl_layer.py): `services/enrichment/nl_layer.py`
- [CampusPulse API](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/apps/api/main.py): `apps/api/main.py`
- [API Schemas](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/apps/api/schemas.py): `apps/api/schemas.py`
- [Competitive Intelligence](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/packages/domain/competitive.py): `packages/domain/competitive.py`

### Persistence

- [Data Repository](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/adapters/postgres/repository.py): `adapters/postgres/repository.py`
- [Database Models](https://github.com/bhavyaanand2101-coder/bytexl_hackathon_2026_oct/blob/main/adapters/postgres/models.py): `adapters/postgres/models.py`
- **Student Data Store**

### Other components

- **Campus Files**
- **Faculty Advisor**

## Connections

- Campus Files → File Ingestion: supplies files (evidence: `README.md`)
- Pipeline Orchestrator → File Ingestion: invokes ingestion (evidence: `services/pipeline.py`)
- File Ingestion → Data Cleaning: cleans rows (evidence: `services/ingestion/loader.py`)
- Pipeline Orchestrator → Rule Enrichment: enriches records (evidence: `services/pipeline.py`)
- Rule Enrichment → Score Model: calculates scores (evidence: `services/enrichment/rules_layer.py`)
- Rule Enrichment → Student Segments: assigns segments (evidence: `services/enrichment/rules_layer.py`)
- Pipeline Orchestrator → Risk Flags: evaluates flags (evidence: `services/pipeline.py`)
- Pipeline Orchestrator → Statistical Enrichment: uses enrichment (evidence: `services/pipeline.py`)
- Pipeline Orchestrator → Advisor Notes: renders guidance (evidence: `services/pipeline.py`)
- Pipeline Orchestrator → Database Models: persists records (evidence: `services/pipeline.py`)
- Faculty Advisor → CampusPulse API: requests insights (evidence: `README.md`)
- CampusPulse API → Data Repository: queries records (evidence: `apps/api/main.py`)
- CampusPulse API → Pipeline Orchestrator: runs processing (evidence: `apps/api/main.py`)
- CampusPulse API → API Schemas: uses schemas (evidence: `apps/api/main.py`)
- CampusPulse API → Score Model: uses scoring (evidence: `apps/api/main.py`)
- CampusPulse API → Student Segments: uses segments (evidence: `apps/api/main.py`)
- CampusPulse API → ML Risk Analysis: uses risk analysis (evidence: `apps/api/main.py`)
- CampusPulse API → Advisor Notes: uses advisor copy (evidence: `apps/api/main.py`)
- CampusPulse API → Competitive Intelligence: serves intelligence (evidence: `apps/api/main.py`)
- Data Repository → Database Models: queries models (evidence: `adapters/postgres/repository.py`)
- Data Repository → Student Data Store: reads and writes
- Pipeline Orchestrator → Student Data Store: stores results
