Changes between Version 1 and Version 2 of SouceVersionControlOrganizationRevised


Ignore:
Timestamp:
01/07/26 19:17:58 (8 days ago)
Author:
214004
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SouceVersionControlOrganizationRevised

    v1 v2  
    1 == SouceVersionControlOrganizationRevised
    2 За Контрола на верзиите на изворниот код користевме Github. Работевме на еден branch.
    3 
    4 == Структура ==
     1= Roadmap FINKI Documentation =
     2
     3----
     4
     5== Version Control ==
     6
     7 * '''Repository:''' GitHub
     8 * '''Branching Strategy:''' Single branch development
     9 * '''Project Root:''' `roadmap_finki/`
     10
     11----
     12
     13== Project Structure ==
     14
     15{{{
    516roadmap_finki/
    6 ├── app/                          # PHP/Laravel код
    7 ├── resources/                     # Frontend (Blade templates)
    8 ├── database/                      # Миграции и seeders
    9 ├── routes/                        # Рутирање
    10 ├── bootstrap/                     # Иницијализација
    11 ├── config/                        # Конфигурација
    12 ├── storage/                       # Датотеки и логови
    13 ├── tests/                         # Тестирање
    14 ├── public/                        # Јавни датотеки (CSS, JS, слики)
    15 └── vendor/                        # Зависности (Composer)
    16 
    17 == Модели ==
    18 Models/
    19 ├── User.php                    # Кориснички профил
    20 │   ├── relationships:
    21 │   │   └── progress()          # HasMany → UserProgress
    22 │   └── methods:
    23 │       └── role(), isAdmin()
    24 
    25 ├── UserProgress.php            # Напредок на корисник (завршени/во прогрес предмети)
    26 │   ├── fillable:
    27 │   │   ├── user_id
    28 │   │   ├── subject_id
    29 │   │   ├── study_program_id
    30 │   │   ├── career_path_id
    31 │   │   ├── status              # 'completed' | 'in_progress'
    32 │   │   └── completed_at
    33 │   └── relationships:
    34 │       ├── user()              # BelongsTo
    35 │       ├── subject()            # BelongsTo
    36 │       ├── studyProgram()       # BelongsTo
    37 │       └── careerPath()         # BelongsTo
    38 
    39 ├── Subject.php                 # Предмет/Курс
    40 │   ├── attributes:
    41 │   │   ├── code                # Уникален код (F23L3W004)
    42 │   │   ├── name                # Англиско име
    43 │   │   ├── name_mk             # Македонско име
    44 │   │   ├── year                # 1-4 година
    45 │   │   ├── semester_type       # 'winter' | 'summer'
    46 │   │   ├── subject_type        # 'mandatory' | 'elective'
    47 │   │   ├── credits             # ECTS кредити
    48 │   │   └── description, instructors, hours
    49 │   ├── relationships:
    50 │   │   ├── prerequisites()     # BelongsToMany (self-referencing)
    51 │   │   ├── requiredBy()        # BelongsToMany (inverse)
    52 │   │   ├── studyPrograms()     # BelongsToMany
    53 │   │   ├── careerPaths()       # BelongsToMany
    54 │   │   └── userProgress()      # HasMany
    55 │   └── methods:
    56 │       ├── getSemesterTypeFromCode()   # Извлече W/S од код
    57 │       ├── hasPrerequisitesMet()       # Проверка на предуслови
    58 │       └── getDisplayName()            # "CODE - NAME"
    59 
    60 ├── StudyProgram.php            # Студиска програма (Computer Science 4-year)
    61 │   ├── attributes:
    62 │   │   ├── name_mk             # Македонско име
    63 │   │   ├── name_en             # Англиско име
    64 │   │   ├── code                # Уникален код
    65 │   │   ├── duration_years      # 1-6 години
    66 │   │   └── cycle               # 'first' | 'second'
    67 │   ├── relationships:
    68 │   │   ├── subjects()          # BelongsToMany
    69 │   │   │   └── pivot: order, type, year, semester_type
    70 │   │   └── userProgress()      # HasMany
    71 │   └── methods:
    72 │       ├── getMandatorySubjects()     # Само задолжителни
    73 │       ├── getElectiveSubjects()      # Само изборни
    74 │       └── getDisplayName()           # "NAME (N години)"
    75 
    76 └── CareerPath.php              # Каријерна патека (Full Stack, Data Science, итн.)
    77     ├── attributes:
    78     │   ├── name                # Име на патека
    79     │   └── description
    80     ├── relationships:
    81     │   └── subjects()          # BelongsToMany
    82     │       └── pivot: career_path_subject
    83     └── methods:
    84         └── getIcon()           # Икона за приказ
    85 
    86 
    87 == Табели во база ==
    88 users
    89 ├── id, name, email, password
     17├── app/                          # PHP/Laravel application code
     18├── resources/                    # Frontend (Blade templates)
     19├── database/                     # Database migrations and seeders
     20├── routes/                       # Application routing
     21├── bootstrap/                    # Application initialization
     22├── config/                       # Configuration files
     23├── storage/                      # File storage and logs
     24├── tests/                        # Test suite
     25├── public/                       # Public assets (CSS, JS, images)
     26└── vendor/                       # Composer dependencies
     27}}}
     28
     29----
     30
     31== Data Models ==
     32
     33=== User.php ===
     34Manages user profiles and authentication.
     35
     36 * '''Relationships:'''
     37   * `progress()` - HasMany → UserProgress
     38 * '''Methods:'''
     39   * `role()` - Returns user role
     40   * `isAdmin()` - Checks admin privileges
     41
     42=== UserProgress.php ===
     43Tracks student progress through subjects (completed/in-progress).
     44
     45 * '''Fillable Attributes:'''
     46   * `user_id` - Foreign key to users table
     47   * `subject_id` - Foreign key to subjects table
     48   * `study_program_id` - Foreign key to study programs
     49   * `career_path_id` - Foreign key to career paths (nullable)
     50   * `status` - Enum: `'completed'` | `'in_progress'`
     51   * `completed_at` - Timestamp (nullable)
     52 * '''Relationships:'''
     53   * `user()` - BelongsTo User
     54   * `subject()` - BelongsTo Subject
     55   * `studyProgram()` - BelongsTo StudyProgram
     56   * `careerPath()` - BelongsTo CareerPath
     57
     58=== Subject.php ===
     59Represents academic subjects/courses.
     60
     61 * '''Attributes:'''
     62   * `code` - Unique identifier (e.g., F23L3W004)
     63   * `name` - English name
     64   * `name_mk` - Macedonian name
     65   * `year` - Academic year (1-4)
     66   * `semester_type` - Enum: `'winter'` | `'summer'`
     67   * `subject_type` - Enum: `'mandatory'` | `'elective'`
     68   * `credits` - ECTS credits
     69   * `description`, `instructors`, `hours` - Additional metadata
     70 * '''Relationships:'''
     71   * `prerequisites()` - BelongsToMany (self-referencing)
     72   * `requiredBy()` - BelongsToMany (inverse prerequisites)
     73   * `studyPrograms()` - BelongsToMany StudyProgram
     74   * `careerPaths()` - BelongsToMany CareerPath
     75   * `userProgress()` - HasMany UserProgress
     76 * '''Methods:'''
     77   * `getSemesterTypeFromCode()` - Extracts W/S from subject code
     78   * `hasPrerequisitesMet()` - Validates prerequisite completion
     79   * `getDisplayName()` - Returns formatted "CODE - NAME"
     80
     81=== StudyProgram.php ===
     82Represents academic study programs (e.g., Computer Science 4-year).
     83
     84 * '''Attributes:'''
     85   * `name_mk` - Macedonian name
     86   * `name_en` - English name
     87   * `code` - Unique identifier
     88   * `duration_years` - Program duration (1-6 years)
     89   * `cycle` - Enum: `'first'` | `'second'`
     90 * '''Relationships:'''
     91   * `subjects()` - BelongsToMany Subject
     92     * Pivot fields: `order`, `type`, `year`, `semester_type`
     93   * `userProgress()` - HasMany UserProgress
     94 * '''Methods:'''
     95   * `getMandatorySubjects()` - Returns only mandatory subjects
     96   * `getElectiveSubjects()` - Returns only elective subjects
     97   * `getDisplayName()` - Returns formatted "NAME (N years)"
     98
     99=== CareerPath.php ===
     100Represents career specialization paths (e.g., Full Stack, Data Science).
     101
     102 * '''Attributes:'''
     103   * `name` - Career path name
     104   * `description` - Detailed description
     105 * '''Relationships:'''
     106   * `subjects()` - BelongsToMany Subject
     107     * Pivot table: `career_path_subject`
     108 * '''Methods:'''
     109   * `getIcon()` - Returns icon for display
     110
     111----
     112
     113== Database Schema ==
     114
     115=== Core Tables ===
     116
     117==== users ====
     118{{{
     119├── id (PK)
     120├── name
     121├── email
     122├── password
    90123├── role (enum: 'admin', 'user')
    91 ├── created_at, updated_at
     124├── created_at
     125├── updated_at
    92126└── → hasMany(user_progress)
    93 
    94 user_progress
    95 ├── id, user_id (FK), subject_id (FK)
    96 ├── study_program_id (FK), career_path_id (FK, nullable)
     127}}}
     128
     129==== subjects ====
     130{{{
     131├── id (PK)
     132├── code (unique)
     133├── name
     134├── name_mk
     135├── year (1-4)
     136├── semester_type (winter/summer)
     137├── subject_type (mandatory/elective)
     138├── credits
     139├── description
     140├── instructors
     141├── hours
     142└── → belongsToMany(subject_prerequisites, study_programs, career_paths)
     143    → hasMany(user_progress)
     144}}}
     145
     146==== study_programs ====
     147{{{
     148├── id (PK)
     149├── code (unique)
     150├── name_mk
     151├── name_en
     152├── duration_years
     153├── cycle (first/second)
     154├── description_mk
     155├── description_en
     156└── → belongsToMany(subjects)
     157    → hasMany(user_progress)
     158}}}
     159
     160==== career_paths ====
     161{{{
     162├── id (PK)
     163├── name
     164├── description
     165└── → belongsToMany(subjects)
     166}}}
     167
     168==== user_progress ====
     169{{{
     170├── id (PK)
     171├── user_id (FK → users)
     172├── subject_id (FK → subjects)
     173├── study_program_id (FK → study_programs)
     174├── career_path_id (FK → career_paths, nullable)
    97175├── status (enum: 'completed', 'in_progress')
    98176├── completed_at (timestamp, nullable)
    99177└── → belongsTo(user, subject, study_program, career_path)
    100 
    101 subjects
    102 ├── id, code (unique), name, name_mk
    103 ├── year (1-4), semester_type, subject_type
    104 ├── credits, description, instructions, hours
    105 └── → belongsToMany(subject_prerequisites)
    106     → belongsToMany(study_programs, career_paths)
    107     → hasMany(user_progress)
    108 
    109 subject_prerequisites
    110 ├── subject_id (FK) → pivot table
    111 └── prerequisite_id (FK)
    112 
    113 study_programs
    114 ├── id, code (unique), name_mk, name_en
    115 ├── duration_years, cycle, description_mk, description_en
    116 └── → belongsToMany(subjects)
    117     → hasMany(user_progress)
    118 
    119 study_program_subject (Pivot Table)
    120 ├── id, study_program_id (FK), subject_id (FK)
     178}}}
     179
     180=== Pivot Tables ===
     181
     182==== subject_prerequisites ====
     183Self-referencing table for subject dependencies.
     184{{{
     185├── subject_id (FK → subjects)
     186└── prerequisite_id (FK → subjects)
     187}}}
     188
     189==== study_program_subject ====
     190Links study programs to subjects with additional metadata.
     191{{{
     192├── id (PK)
     193├── study_program_id (FK → study_programs)
     194├── subject_id (FK → subjects)
    121195├── type (mandatory/elective)
    122 ├── year, semester_type
    123 ├── order, timestamps
    124 
    125 career_paths
    126 ├── id, name, description
    127 └── → belongsToMany(subjects)
    128 
    129 career_path_subject (Pivot Table)
    130 ├── career_path_id (FK)
    131 └── subject_id (FK)
    132 
    133 
    134 == Контролери ==
    135 
    136 Controllers/
    137 ├── RoadmapController.php       # Главна логика за roadmap генерирање
    138 │   ├── create()               # Приказ на форма за создание
    139 │   ├── store()                # Зачувување на избори и генерирање
    140 │   ├── show()                 # Приказ на зачуван roadmap
    141 │   ├── getSubjectsByProgram() # AJAX - предмети по програма
    142 │   ├── generateRoadmap()      # Приватна: сортирана листа
    143 │   └── generateSemesterRoadmap() # Приватна: по години/семестри
    144 
    145 ├── SubjectController.php       # CRUD за предметите (Admin)
    146 │   ├── index()                # Листа со пребарување
    147 │   ├── create()               # Форма за создание
    148 │   ├── store()                # Зачувување на предмет
    149 │   ├── show()                 # Преглед
    150 │   ├── edit()                 # Форма за уредување
    151 │   ├── update()               # Ажурирање
    152 │   └── destroy()              # Бришење
    153 
    154 ├── StudyProgramController.php  # CRUD за студиски програми (Admin)
    155 │   ├── index()                # Листа со пребарување
    156 │   ├── create()               # Форма за создание
    157 │   ├── store()                # Зачувување со предметите
    158 │   ├── show()                 # Преглед со детали
    159 │   ├── edit()                 # Форма за уредување
    160 │   ├── update()               # Ажурирање со предметите
    161 │   └── destroy()              # Бришење
    162 
    163 ├── ProfileController.php       # Корисничкиот профил
    164 │   ├── edit()
    165 │   ├── update()
    166 │   └── destroy()
    167 
    168 └── (Others: AuthController, DashboardController, итн.)
     196├── year
     197├── semester_type
     198├── order
     199└── timestamps
     200}}}
     201
     202==== career_path_subject ====
     203Links career paths to relevant subjects.
     204{{{
     205├── career_path_id (FK → career_paths)
     206└── subject_id (FK → subjects)
     207}}}
     208
     209----
     210
     211== Controllers ==
     212
     213=== RoadmapController.php ===
     214Primary controller for roadmap generation logic.
     215
     216 * `create()` - Display roadmap creation form
     217 * `store()` - Save user selections and generate roadmap
     218 * `show()` - Display generated roadmap
     219 * `getSubjectsByProgram()` - AJAX endpoint for dynamic subject loading
     220 * `generateRoadmap()` - '''Private:''' Generate sorted subject list
     221 * `generateSemesterRoadmap()` - '''Private:''' Organize subjects by year/semester
     222
     223=== SubjectController.php ===
     224Standard resource controller for subject management (Admin only).
     225
     226 * `index()` - List subjects with search functionality
     227 * `create()` - Display subject creation form
     228 * `store()` - Save new subject
     229 * `show()` - Display subject details
     230 * `edit()` - Display subject edit form
     231 * `update()` - Update existing subject
     232 * `destroy()` - Delete subject
     233
     234=== StudyProgramController.php ===
     235Standard resource controller for study program management (Admin only).
     236
     237 * `index()` - List programs with search functionality
     238 * `create()` - Display program creation form
     239 * `store()` - Save new program with subjects
     240 * `show()` - Display program details
     241 * `edit()` - Display program edit form
     242 * `update()` - Update existing program with subjects
     243 * `destroy()` - Delete program
     244
     245=== ProfileController.php ===
     246Manages user profile operations.
     247
     248 * `edit()` - Display profile edit form
     249 * `update()` - Update profile information
     250 * `destroy()` - Delete user account
     251
     252----
    169253
    170254== Middleware ==
    171255
    172 Middleware/
    173 ├── Authenticate.php           # Логирана проверка
    174 ├── Admin.php                  # Админ верификација
    175 └── (Others)
    176 
    177 == Requests  ==
    178 
    179 
    180 Requests/
    181 ├── StoreSubjectRequest.php    # Валидација за Subject create/update
    182 ├── StudyProgramRequest.php    # Валидација за StudyProgram
    183 └── (Others)
     256 * '''Authenticate.php''' - Verifies user authentication
     257 * '''Admin.php''' - Verifies admin privileges for protected routes
     258
     259----
     260
     261== Request Validation ==
     262
     263 * '''StoreSubjectRequest.php''' - Validation rules for subject creation and updates
     264 * '''StudyProgramRequest.php''' - Validation rules for study program operations
     265
     266----
    184267
    185268== Views ==
    186269
    187 views/roadmap/
    188 ├── create.blade.php           # Форма за создание на roadmap
    189 │   ├── Step 1: Избор програма и каријерна патека
    190 │   ├── AJAX: Динамичко вчитување на предмети
    191 │   ├── Step 2: Избор завршени/во прогрес предмети
    192 │   ├── Пребарување предмети
    193 │   ├── Организирани по години
    194 │   └── JavaScript за обработка
    195 
    196 └── show.blade.php             # Приказ на генериран roadmap
    197     ├── Header: Програма и патека
    198     ├── Progress Summary: 4 картички
    199     ├── ECTS Progress Bar: Визуелен напредок
    200     ├── Semester-by-Semester Roadmap:
    201     │   ├── За секоја година:
    202     │   │   ├── Зимски семестар
    203     │   │   └─ Летен семестар
    204     │   └── За секој предмет: готово/блокирано
    205     ├── Препорачани следни чекори:
    206     │   ├─ Готови за запишување (зелено)
    207     │   └─ Блокирани (црвено)
    208     ├── Завршени предмети
    209     └─ Во прогрес предмети
    210 
    211 
    212 
    213 == Рути во апликацијата ==
    214 
    215 
    216 routes/
    217 ├── web.php                    # Главни рути
    218 │   ├── GET / → Welcome
    219 │   ├── GET /dashboard → Dashboard
    220 │   ├── GET /roadmap/create → RoadmapController@create
    221 │   ├── POST /roadmap → RoadmapController@store
    222 │   ├── GET /roadmap → RoadmapController@show
    223 │   ├── GET /api/study-program/{id}/subjects → RoadmapController@getSubjectsByProgram
    224 │   ├── resource /subjects → SubjectController (админ)
    225 │   ├── resource /study-programs → StudyProgramController (админ)
    226 │   └── (Others: profile, auth)
    227 
    228 ├── auth.php                   # Автентицирани рути
    229 │   ├── Регистрирање
    230 │   ├── Логирање
    231 │   ├── Password reset
    232 │   └── Email verification
    233 
    234 
     270=== roadmap/create.blade.php ===
     271Two-step roadmap creation form.
     272
     273'''Step 1: Program and Career Path Selection'''
     274 * Select study program from dropdown
     275 * Select career path (optional)
     276 * AJAX dynamic loading of subjects based on selection
     277
     278'''Step 2: Progress Selection'''
     279 * Mark completed subjects
     280 * Mark in-progress subjects
     281 * Search/filter subjects
     282 * Subjects organized by academic year
     283 * JavaScript for form handling and validation
     284
     285=== roadmap/show.blade.php ===
     286Displays generated personalized roadmap.
     287
     288'''Components:'''
     289 * '''Header''' - Selected program and career path
     290 * '''Progress Summary''' - Four summary cards with statistics
     291 * '''ECTS Progress Bar''' - Visual progress indicator
     292 * '''Semester-by-Semester Roadmap'''
     293   * Organized by academic year
     294   * Winter and summer semesters
     295   * Subject status indicators (completed/blocked/available)
     296 * '''Recommended Next Steps'''
     297   * Available subjects (green) - prerequisites met
     298   * Blocked subjects (red) - prerequisites not met
     299 * '''Completed Subjects List'''
     300 * '''In-Progress Subjects List'''
     301
     302----
     303
     304== Application Routes ==
     305
     306=== web.php ===
     307Main application routes.
     308
     309{{{
     310GET  /                                              → Welcome page
     311GET  /dashboard                                      → User dashboard
     312GET  /roadmap/create                                 → RoadmapController@create
     313POST /roadmap                                        → RoadmapController@store
     314GET  /roadmap                                        → RoadmapController@show
     315GET  /api/study-program/{id}/subjects                → RoadmapController@getSubjectsByProgram
     316}}}
     317
     318'''Admin Routes (require admin middleware):'''
     319{{{
     320resource /subjects                                   → SubjectController
     321resource /study-programs                             → StudyProgramController
     322}}}
     323
     324'''User Routes:'''
     325{{{
     326resource /profile                                    → ProfileController
     327}}}
     328
     329=== auth.php ===
     330Authentication routes.
     331
     332 * User registration
     333 * User login/logout
     334 * Password reset
     335 * Email verification
     336
     337----
     338
     339== Key Features ==
     340
     341 1. '''Prerequisite Tracking''' - Automatic validation of subject prerequisites
     342 2. '''Progress Visualization''' - Visual representation of academic progress
     343 3. '''Career Path Integration''' - Tailored recommendations based on career goals
     344 4. '''ECTS Credit Tracking''' - Monitor credit completion toward degree requirements
     345 5. '''Semester Planning''' - Organized view of subjects by semester
     346 6. '''Admin Dashboard''' - Full CRUD operations for subjects and programs
     347 7. '''AJAX Integration''' - Dynamic form updates without page refresh
     348
     349----
     350
     351== Technical Stack ==
     352
     353 * '''Backend:''' PHP with Laravel framework
     354 * '''Frontend:''' Blade templating engine
     355 * '''Database:''' Relational database (MySQL/PostgreSQL)
     356 * '''JavaScript:''' For dynamic interactions and AJAX
     357 * '''CSS:''' For styling and responsive design
     358
     359----
     360
     361== Access Control ==
     362
     363 * '''Public Access:''' Welcome page, registration, login
     364 * '''Authenticated Users:''' Dashboard, roadmap creation/viewing, profile management
     365 * '''Admin Users:''' All user features plus subject/program management
     366
     367----
     368
     369''For more information, please contact the development team or refer to the project repository.''