# akzhol-asan/aleksei_ architecture

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

- Interactive diagram: https://gitdiagram.com/akzhol-asan/aleksei_
- Repository: https://github.com/akzhol-asan/aleksei_

## Overview

This is a React timetable editor: users view a weekly grid and unassigned sections, then drag lessons or sections into time slots and edit lesson assignments. Schedule data is loaded into a Zustand store; selectors prepare display items, while drop-planning and validation check conflicts before schedule changes. The source index also identifies sidebar, drag-and-drop, and lesson-editing modules as core. The README describes only a Vite template, so product behavior comes from the source excerpts and index; some UI-to-handler details are not shown.

Main entry points: [`src/widgets/schedule-grid/ScheduleGrid.tsx`](https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/schedule-grid/ScheduleGrid.tsx) (Schedule Grid), [`src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/ScheduleDndProvider.tsx) (Drag Provider), [`src/entities/schedule/model/scheduleStore.ts`](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/scheduleStore.ts) (Schedule Store), [`src/pages/main-page/MainPage.tsx`](https://github.com/akzhol-asan/aleksei_/blob/main/src/pages/main-page/MainPage.tsx) (Main Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_main["Main Page<br/>[MainPage.tsx]"]
  node_header["Header<br/>[Header.tsx]"]
  node_grid["Schedule Grid<br/>[ScheduleGrid.tsx]"]
  node_sidebar["Section Sidebar<br/>[SideBar.tsx]"]
  node_lessoncard["Lesson Card<br/>[LessonCard.tsx]"]
  node_sectioncard["Section Card<br/>[SectionCard.tsx]"]
end

subgraph group_schedule["Schedule State"]
  node_store[("Schedule Store<br/>[scheduleStore.ts]")]
  node_fetch["Schedule Loader"]
  node_mock["Mock Schedule Data"]
  node_selectors["Schedule Selectors<br/>[selectors.ts]"]
end

subgraph group_dnd["Drag And Drop"]
  node_dndprovider["Drag Provider"]
  node_draggablelesson["Draggable Lesson"]
  node_draggablesection["Draggable Section"]
  node_droppable["Droppable Slot<br/>[DroppableSlot.tsx]"]
  node_unassigned["Unassigned Zone"]
  node_conflicts["Drop Conflicts"]
  node_sectionplan["Section Drop Plan<br/>[planSectionDrop.ts]"]
end

subgraph group_editing["Lesson Editing"]
  node_validate["Drop Validator<br/>[validateDrop.ts]"]
  node_editor["Lesson Editor<br/>[LessonEditor.tsx]"]
  node_editoptions["Edit Options<br/>[getEditOptions.ts]"]
end

subgraph group_domain["Schedule Domain"]
  node_scheduledata["Schedule Data Types<br/>[types.ts]"]
  node_timetable["Time Types<br/>[types.ts]"]
  node_lesson["Lesson Types<br/>[types.ts]"]
  node_section["Section Types<br/>[types.ts]"]
end

node_user(("User"))

node_user -.->|"uses"| node_main
node_main -->|"renders"| node_header
node_main -->|"renders"| node_grid
node_main -->|"renders"| node_sidebar
node_main -->|"wraps content"| node_dndprovider
node_grid -->|"reads state"| node_store
node_grid -->|"groups lessons"| node_selectors
node_grid -->|"renders slots"| node_droppable
node_grid -->|"renders lessons"| node_draggablelesson
node_grid -->|"wraps lessons"| node_editor
node_sidebar -->|"selects sections"| node_selectors
node_sidebar -->|"reads state"| node_store
node_sidebar -->|"renders zone"| node_unassigned
node_sidebar -->|"renders sections"| node_draggablesection
node_store -->|"loads data"| node_fetch
node_fetch -->|"reads schedule"| node_mock
node_dndprovider -->|"updates schedule"| node_store
node_dndprovider -->|"checks drops"| node_conflicts
node_dndprovider -->|"plans section drop"| node_sectionplan
node_dndprovider -->|"renders lesson"| node_lessoncard
node_dndprovider -->|"renders section"| node_sectioncard
node_draggablelesson -->|"renders"| node_lessoncard
node_draggablesection -->|"renders"| node_sectioncard
node_droppable -->|"selects lessons"| node_selectors
node_droppable -->|"reads and updates"| node_store
node_droppable -->|"checks drop"| node_conflicts
node_editor -->|"updates lesson"| node_store
node_editor -->|"gets options"| node_editoptions
node_editoptions -->|"validates choices"| node_validate
node_conflicts -->|"validates candidate"| node_validate
node_conflicts -->|"uses section plan"| node_sectionplan
node_sectionplan -->|"checks conflicts"| node_validate

click node_main "https://github.com/akzhol-asan/aleksei_/blob/main/src/pages/main-page/MainPage.tsx"
click node_header "https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/header/Header.tsx"
click node_grid "https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/schedule-grid/ScheduleGrid.tsx"
click node_sidebar "https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/side-bar/SideBar.tsx"
click node_store "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/scheduleStore.ts"
click node_fetch "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/api/fetchScheduleData.ts"
click node_mock "https://github.com/akzhol-asan/aleksei_/blob/main/src/shared/api/mock-data/schedule-mock-data.json"
click node_selectors "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/selectors.ts"
click node_scheduledata "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/types.ts"
click node_timetable "https://github.com/akzhol-asan/aleksei_/blob/main/src/shared/model/schedule/types.ts"
click node_lesson "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/lesson/model/types.ts"
click node_section "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/section/model/types.ts"
click node_lessoncard "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/lesson/ui/LessonCard.tsx"
click node_sectioncard "https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/section/ui/SectionCard.tsx"
click node_dndprovider "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/ScheduleDndProvider.tsx"
click node_draggablelesson "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/DraggableLesson.tsx"
click node_draggablesection "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/DraggableSection.tsx"
click node_droppable "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/DroppableSlot.tsx"
click node_unassigned "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/UnassignedDropZone.tsx"
click node_conflicts "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/model/getDropConflicts.ts"
click node_sectionplan "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/model/planSectionDrop.ts"
click node_validate "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/validate-drop/model/validateDrop.ts"
click node_editor "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/edit-lesson/ui/LessonEditor.tsx"
click node_editoptions "https://github.com/akzhol-asan/aleksei_/blob/main/src/features/edit-lesson/model/getEditOptions.ts"

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_main,node_header,node_grid,node_sidebar,node_lessoncard,node_sectioncard,node_user toneBlue
class node_store,node_fetch,node_mock,node_selectors toneAmber
class node_dndprovider,node_draggablelesson,node_draggablesection,node_droppable,node_unassigned,node_conflicts,node_sectionplan toneMint
class node_validate,node_editor,node_editoptions toneRose
class node_scheduledata,node_timetable,node_lesson,node_section toneIndigo
```

## Components

### Application UI

- [Main Page](https://github.com/akzhol-asan/aleksei_/blob/main/src/pages/main-page/MainPage.tsx): `src/pages/main-page/MainPage.tsx`
- [Header](https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/header/Header.tsx): `src/widgets/header/Header.tsx`
- [Schedule Grid](https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/schedule-grid/ScheduleGrid.tsx): `src/widgets/schedule-grid/ScheduleGrid.tsx`
- [Section Sidebar](https://github.com/akzhol-asan/aleksei_/blob/main/src/widgets/side-bar/SideBar.tsx): `src/widgets/side-bar/SideBar.tsx`
- [Lesson Card](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/lesson/ui/LessonCard.tsx): `src/entities/lesson/ui/LessonCard.tsx`
- [Section Card](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/section/ui/SectionCard.tsx): `src/entities/section/ui/SectionCard.tsx`

### Schedule State

- [Schedule Store](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/scheduleStore.ts): `src/entities/schedule/model/scheduleStore.ts`
- [Schedule Loader](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/api/fetchScheduleData.ts): `src/entities/schedule/api/fetchScheduleData.ts`
- [Mock Schedule Data](https://github.com/akzhol-asan/aleksei_/blob/main/src/shared/api/mock-data/schedule-mock-data.json): `src/shared/api/mock-data/schedule-mock-data.json`
- [Schedule Selectors](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/selectors.ts): `src/entities/schedule/model/selectors.ts`

### Drag And Drop

- [Drag Provider](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/ScheduleDndProvider.tsx): `src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`
- [Draggable Lesson](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/DraggableLesson.tsx): `src/features/schedule-dnd/ui/DraggableLesson.tsx`
- [Draggable Section](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/DraggableSection.tsx): `src/features/schedule-dnd/ui/DraggableSection.tsx`
- [Droppable Slot](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/DroppableSlot.tsx): `src/features/schedule-dnd/ui/DroppableSlot.tsx`
- [Unassigned Zone](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/ui/UnassignedDropZone.tsx): `src/features/schedule-dnd/ui/UnassignedDropZone.tsx`
- [Drop Conflicts](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/model/getDropConflicts.ts): `src/features/schedule-dnd/model/getDropConflicts.ts`
- [Section Drop Plan](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/schedule-dnd/model/planSectionDrop.ts): `src/features/schedule-dnd/model/planSectionDrop.ts`

### Lesson Editing

- [Drop Validator](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/validate-drop/model/validateDrop.ts): `src/features/validate-drop/model/validateDrop.ts`
- [Lesson Editor](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/edit-lesson/ui/LessonEditor.tsx): `src/features/edit-lesson/ui/LessonEditor.tsx`
- [Edit Options](https://github.com/akzhol-asan/aleksei_/blob/main/src/features/edit-lesson/model/getEditOptions.ts): `src/features/edit-lesson/model/getEditOptions.ts`

### Schedule Domain

- [Schedule Data Types](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/schedule/model/types.ts): `src/entities/schedule/model/types.ts`
- [Time Types](https://github.com/akzhol-asan/aleksei_/blob/main/src/shared/model/schedule/types.ts): `src/shared/model/schedule/types.ts`
- [Lesson Types](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/lesson/model/types.ts): `src/entities/lesson/model/types.ts`
- [Section Types](https://github.com/akzhol-asan/aleksei_/blob/main/src/entities/section/model/types.ts): `src/entities/section/model/types.ts`

### Other components

- **User**

## Connections

- User → Main Page: uses
- Main Page → Header: renders (evidence: `src/pages/main-page/MainPage.tsx`)
- Main Page → Schedule Grid: renders (evidence: `src/pages/main-page/MainPage.tsx`)
- Main Page → Section Sidebar: renders (evidence: `src/pages/main-page/MainPage.tsx`)
- Main Page → Drag Provider: wraps content (evidence: `src/pages/main-page/MainPage.tsx`)
- Schedule Grid → Schedule Store: reads state (evidence: `src/widgets/schedule-grid/ScheduleGrid.tsx`)
- Schedule Grid → Schedule Selectors: groups lessons (evidence: `src/widgets/schedule-grid/ScheduleGrid.tsx`)
- Schedule Grid → Droppable Slot: renders slots (evidence: `src/widgets/schedule-grid/ScheduleGrid.tsx`)
- Schedule Grid → Draggable Lesson: renders lessons (evidence: `src/widgets/schedule-grid/ScheduleGrid.tsx`)
- Schedule Grid → Lesson Editor: wraps lessons (evidence: `src/widgets/schedule-grid/ScheduleGrid.tsx`)
- Section Sidebar → Schedule Selectors: selects sections (evidence: `src/widgets/side-bar/SideBar.tsx`)
- Section Sidebar → Schedule Store: reads state (evidence: `src/widgets/side-bar/SideBar.tsx`)
- Section Sidebar → Unassigned Zone: renders zone (evidence: `src/widgets/side-bar/SideBar.tsx`)
- Section Sidebar → Draggable Section: renders sections (evidence: `src/widgets/side-bar/SideBar.tsx`)
- Schedule Store → Schedule Loader: loads data (evidence: `src/entities/schedule/model/scheduleStore.ts`)
- Schedule Loader → Mock Schedule Data: reads schedule (evidence: `src/entities/schedule/api/fetchScheduleData.ts`)
- Drag Provider → Schedule Store: updates schedule (evidence: `src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`)
- Drag Provider → Drop Conflicts: checks drops (evidence: `src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`)
- Drag Provider → Section Drop Plan: plans section drop (evidence: `src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`)
- Drag Provider → Lesson Card: renders lesson (evidence: `src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`)
- Drag Provider → Section Card: renders section (evidence: `src/features/schedule-dnd/ui/ScheduleDndProvider.tsx`)
- Draggable Lesson → Lesson Card: renders (evidence: `src/features/schedule-dnd/ui/DraggableLesson.tsx`)
- Draggable Section → Section Card: renders (evidence: `src/features/schedule-dnd/ui/DraggableSection.tsx`)
- Droppable Slot → Schedule Selectors: selects lessons (evidence: `src/features/schedule-dnd/ui/DroppableSlot.tsx`)
- Droppable Slot → Schedule Store: reads and updates (evidence: `src/features/schedule-dnd/ui/DroppableSlot.tsx`)
- Droppable Slot → Drop Conflicts: checks drop (evidence: `src/features/schedule-dnd/ui/DroppableSlot.tsx`)
- Lesson Editor → Schedule Store: updates lesson (evidence: `src/features/edit-lesson/ui/LessonEditor.tsx`)
- Lesson Editor → Edit Options: gets options (evidence: `src/features/edit-lesson/ui/LessonEditor.tsx`)
- Edit Options → Drop Validator: validates choices (evidence: `src/features/edit-lesson/model/getEditOptions.ts`)
- Drop Conflicts → Drop Validator: validates candidate (evidence: `src/features/schedule-dnd/model/getDropConflicts.ts`)
- Drop Conflicts → Section Drop Plan: uses section plan (evidence: `src/features/schedule-dnd/model/getDropConflicts.ts`)
- Section Drop Plan → Drop Validator: checks conflicts (evidence: `src/features/schedule-dnd/model/planSectionDrop.ts`)
