-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogress.yaml
More file actions
762 lines (687 loc) · 28.8 KB
/
progress.yaml
File metadata and controls
762 lines (687 loc) · 28.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
# Assignment Progress
# Single source of truth for task tracker assignment status
project:
name: "Lightweight Project Task Tracker"
phase: "Phase 5 Complete - Testing & Polish"
completion_percentage: 100
last_updated: "2025-12-04"
version: "1.0.0"
assignment_requirements:
data_models:
- task: "Create Project model (name, description)"
status: "completed"
file: "app/models/project.rb"
tests: "spec/models/project_spec.rb"
- task: "Create Task model (title, description, status, priority, due_date)"
status: "completed"
file: "app/models/task.rb"
tests: "spec/models/task_spec.rb"
- task: "Add Task validations (status, priority)"
status: "completed"
- task: "Add Project validations (name uniqueness)"
status: "completed"
business_logic:
- task: "Implement Task#overdue? method"
status: "completed"
file: "app/models/task.rb"
tests: "spec/models/task_spec.rb (3+ test cases)"
- task: "Implement Task.with_status scope"
status: "completed"
- task: "Implement Task.overdue scope"
status: "completed"
- task: "Implement Task.sorted_by scope (priority_desc, due_date_asc)"
status: "completed"
project_ui:
- task: "Projects index page (list all projects)"
status: "completed"
route: "GET /projects"
view: "app/views/projects/index.html.erb"
- task: "Show project with task counts"
status: "completed"
details: "Total tasks and incomplete tasks count"
- task: "Project show page with tasks table"
status: "completed"
route: "GET /projects/:id"
view: "app/views/projects/show.html.erb"
- task: "New/Edit project forms"
status: "completed"
- task: "Delete project functionality"
status: "completed"
task_ui:
- task: "Task table with title, status, priority, due_date"
status: "completed"
view: "app/views/projects/show.html.erb"
- task: "Overdue badge in task table"
status: "completed"
details: "Show 'Overdue' when past due and not done"
- task: "New/Edit task forms"
status: "completed"
view: "app/views/tasks/new.html.erb, edit.html.erb"
- task: "Task form validations and error messages"
status: "completed"
- task: "View/Edit/Delete task actions"
status: "completed"
filtering_sorting:
- task: "Status filter (All, Todo, In Progress, Done)"
status: "completed"
route: "/projects/:id?status=todo"
implementation: "Use Task.with_status scope"
- task: "Sort by priority (high to low)"
status: "completed"
route: "/projects/:id?sort=priority_desc"
implementation: "Use Task.sorted_by scope"
- task: "Sort by due date (soonest to latest)"
status: "completed"
route: "/projects/:id?sort=due_date_asc"
implementation: "Use Task.sorted_by scope"
- task: "Combine filter + sort"
status: "completed"
details: "Apply both status filter and sorting together"
json_api:
- task: "API endpoint GET /api/projects/:project_id/tasks"
status: "completed"
controller: "app/controllers/api/tasks_controller.rb"
route: "GET /api/projects/:project_id/tasks"
- task: "API returns JSON with overdue field"
status: "completed"
details: "Include computed overdue boolean in response"
- task: "API status filter (status=todo)"
status: "completed"
example: "/api/projects/1/tasks?status=todo"
- task: "API overdue filter (overdue=true)"
status: "completed"
example: "/api/projects/1/tasks?overdue=true"
- task: "API combines filters"
status: "completed"
example: "/api/projects/1/tasks?status=in_progress&overdue=true"
testing:
- task: "Task model validation tests"
status: "completed"
file: "spec/models/task_spec.rb"
details: "Test status, priority, title, project presence"
- task: "Task#overdue? method tests (3+ cases)"
status: "completed"
cases: "Future date, past not done, past done"
- task: "Task scope tests (with_status, overdue, sorted_by)"
status: "completed"
- task: "API endpoint returns JSON test"
status: "completed"
file: "spec/requests/api/tasks_spec.rb"
- task: "API status filter test"
status: "completed"
- task: "API overdue filter test"
status: "completed"
models:
implemented:
- name: "Project"
file: "app/models/project.rb"
attributes:
- "name (string, required, unique)"
- "description (text, optional)"
associations:
- "has_many :tasks, dependent: :destroy"
validations:
- "validates :name, presence: true, uniqueness: true"
- name: "Task"
file: "app/models/task.rb"
attributes:
- "project_id (references Project)"
- "title (string, required)"
- "description (text, optional)"
- "status (string, required: todo/in_progress/done)"
- "due_date (date, optional)"
- "priority (integer, required: 1-5)"
associations:
- "belongs_to :project"
validations:
- "validates :title, presence: true"
- "validates :status, inclusion: { in: %w[todo in_progress done] }"
- "validates :priority, numericality: { in: 1..5 }"
scopes:
- "with_status(status)"
- "overdue"
- "sorted_by(param)"
methods:
- "overdue?"
planned:
[]
controllers:
implemented:
- name: "ProjectsController"
file: "app/controllers/projects_controller.rb"
actions: ["index", "show", "new", "create", "edit", "update", "destroy"]
notes: "Full CRUD with includes to prevent N+1 queries"
- name: "TasksController"
file: "app/controllers/tasks_controller.rb"
actions: ["new", "create", "edit", "update", "destroy"]
notes: "Nested under projects"
- name: "Api::TasksController"
file: "app/controllers/api/tasks_controller.rb"
actions: ["index"]
notes: "Returns JSON with status and overdue filtering"
planned:
[]
routes:
implemented:
web:
- "root 'projects#index'"
- "resources :projects do"
- " resources :tasks, only: [:new, :create, :edit, :update, :destroy]"
- "end"
api:
- "namespace :api do"
- " resources :projects, only: [] do"
- " resources :tasks, only: [:index]"
- " end"
- "end"
planned:
[]
testing:
coverage:
overall: 0
models: 0
requests: 0
test_files:
planned:
- "spec/models/project_spec.rb"
- "spec/models/task_spec.rb"
- "spec/requests/api/tasks_spec.rb"
performance:
optimizations:
- task: "Prevent N+1 queries in projects index"
solution: "Use includes(:tasks) or left_joins with count"
status: "not_started"
setup_checklist:
- task: "Create Rails app with PostgreSQL"
status: "completed"
command: "rails new task-tracker --database=postgresql"
- task: "Setup RSpec"
status: "completed"
command: "rails g rspec:install"
- task: "Setup CI workflow"
status: "completed"
details: "Configured GitHub Actions with security scans, linting, and tests"
- task: "Fix CI database setup"
status: "completed"
details: "Changed from db:schema:load to db:migrate to handle missing schema.rb"
- task: "Generate Project model"
status: "completed"
command: "rails g model Project name:string description:text"
- task: "Generate Task model"
status: "completed"
command: "rails g model Task project:references title:string description:text status:string due_date:date priority:integer"
- task: "Run migrations"
status: "completed"
command: "rails db:migrate"
submission_checklist:
- item: "Project and Task models with validations"
status: "completed"
- item: "CRUD for both models"
status: "completed"
- item: "Task filtering by status"
status: "completed"
notes: "Fully implemented with dropdown UI"
- item: "Task sorting by priority/due_date"
status: "completed"
notes: "Fully implemented with dropdown UI"
- item: "Overdue detection in UI"
status: "completed"
notes: "Red badges display on overdue tasks"
- item: "JSON API endpoint with filtering"
status: "completed"
- item: "Model tests (validations, overdue?, scopes)"
status: "completed"
- item: "Request tests (API filtering)"
status: "completed"
- item: "README with setup and API examples"
status: "completed"
- item: "Clean RESTful code"
status: "completed"
next_actions:
immediate:
- "Assignment complete! All requirements met."
- "Ready for submission"
optional:
- "Consider additional enhancements (see optional_enhancements section)"
- "Deploy to production environment if desired"
completed:
- "Create Rails app with PostgreSQL database"
- "Setup RSpec testing framework"
- "Configure CI workflow with GitHub Actions"
- "Fix CI database setup (db:migrate instead of db:schema:load)"
- "Generate and implement Project and Task models"
- "Add model validations and associations"
- "Implement Task#overdue? method and scopes"
- "Write comprehensive model tests (all passing)"
- "Generate ProjectsController with views"
- "Generate TasksController with views"
- "Generate Api::TasksController"
- "Configure RESTful routes"
- "Implement ProjectsController CRUD actions"
- "Implement TasksController CRUD actions"
- "Implement API TasksController#index with filtering"
- "Write comprehensive request tests (all passing)"
- "Create seed data for development and testing"
- "Build application layout with navigation and flash messages"
- "Create projects index view with table"
- "Create project show view with tasks table"
- "Implement status filtering UI with dropdown"
- "Implement sorting UI with dropdown"
- "Add overdue badge to task display"
- "Create project form partial for new/edit"
- "Create task form partial with all fields"
- "Add comprehensive CSS styling"
- "Test all UI workflows successfully"
blockers:
[]
notes:
- "No authentication required for this assignment"
- "Focus on core functionality and test coverage"
- "Keep UI simple - no fancy CSS required"
- "Use scopes to keep controllers lean"
- "Priority 1 = highest, 5 = lowest"
- "Overdue badge only when due_date < today AND status != 'done'"
implementation_plan:
overview: "Complete implementation in 5 phases: Setup, Models, Controllers & Routes, Views & UI, Testing & Polish"
phase_1_foundation:
name: "Phase 1: Project Setup & Database"
status: "completed"
estimated_duration: "Setup phase"
steps:
- step: 1
action: "Verify Rails app structure and dependencies"
command: "bundle install"
validation: "Gemfile.lock exists, all gems installed"
- step: 2
action: "Setup PostgreSQL database"
command: "rails db:create"
validation: "Database created successfully"
- step: 3
action: "Configure RSpec testing framework"
commands:
- "Add rspec-rails, factory_bot_rails, shoulda-matchers to Gemfile"
- "bundle install"
- "rails generate rspec:install"
validation: "spec/ directory created with rails_helper.rb and spec_helper.rb"
- step: 4
action: "Configure shoulda-matchers for cleaner tests"
file: "spec/rails_helper.rb"
validation: "Shoulda::Matchers configured in rails_helper.rb"
phase_2_models:
name: "Phase 2: Data Models & Business Logic"
status: "completed"
estimated_duration: "Core models phase"
dependencies: ["phase_1_foundation"]
steps:
- step: 1
action: "Generate Project model with migration"
command: "rails generate model Project name:string description:text"
files_created:
- "app/models/project.rb"
- "db/migrate/TIMESTAMP_create_projects.rb"
- "spec/models/project_spec.rb"
validation: "Migration file and model created"
- step: 2
action: "Generate Task model with migration"
command: "rails generate model Task project:references title:string description:text status:string due_date:date priority:integer"
files_created:
- "app/models/task.rb"
- "db/migrate/TIMESTAMP_create_tasks.rb"
- "spec/models/task_spec.rb"
validation: "Migration file and model created with foreign key"
- step: 3
action: "Add NOT NULL constraints and defaults to migrations"
files:
- "db/migrate/TIMESTAMP_create_tasks.rb"
changes:
- "Add null: false to title, status, priority columns"
- "Add default: 'todo' to status"
validation: "Migrations have proper constraints"
- step: 4
action: "Run migrations to create database tables"
command: "rails db:migrate"
validation: "schema.rb updated with projects and tasks tables"
- step: 5
action: "Implement Project model validations and associations"
file: "app/models/project.rb"
implementation:
- "has_many :tasks, dependent: :destroy"
- "validates :name, presence: true, uniqueness: true"
validation: "Project model complete with associations and validations"
- step: 6
action: "Implement Task model validations and associations"
file: "app/models/task.rb"
implementation:
- "belongs_to :project"
- "validates :title, presence: true"
- "validates :status, presence: true, inclusion: { in: %w[todo in_progress done] }"
- "validates :priority, presence: true, numericality: { only_integer: true, in: 1..5 }"
validation: "Task model has all required validations"
- step: 7
action: "Implement Task scopes for filtering and sorting"
file: "app/models/task.rb"
implementation:
- "scope :with_status - filter by status parameter"
- "scope :overdue - find tasks with due_date < today AND status != 'done'"
- "scope :sorted_by - handle priority_desc and due_date_asc sorting"
validation: "All three scopes implemented correctly"
- step: 8
action: "Implement Task#overdue? instance method"
file: "app/models/task.rb"
implementation: "Return true if due_date.present? && due_date < Date.today && status != 'done'"
validation: "Method handles all edge cases (nil date, future date, done status)"
- step: 9
action: "Create FactoryBot factories for testing"
files:
- "spec/factories/projects.rb"
- "spec/factories/tasks.rb"
validation: "Factories defined with valid default attributes"
- step: 10
action: "Write comprehensive model tests"
files:
- "spec/models/project_spec.rb - validations and associations"
- "spec/models/task_spec.rb - validations, associations, scopes, overdue? method"
validation: "All model tests passing with good coverage"
- step: 11
action: "Run model tests to verify implementation"
command: "bundle exec rspec spec/models"
validation: "All model tests pass (green)"
phase_3_controllers_routes:
name: "Phase 3: Controllers & Routes"
status: "completed"
estimated_duration: "Controllers and routing phase"
dependencies: ["phase_2_models"]
steps:
- step: 1
action: "Generate ProjectsController"
command: "rails generate controller Projects index show new edit"
files_created:
- "app/controllers/projects_controller.rb"
- "app/views/projects/index.html.erb"
- "app/views/projects/show.html.erb"
- "app/views/projects/new.html.erb"
- "app/views/projects/edit.html.erb"
validation: "Controller and view files created"
- step: 2
action: "Implement ProjectsController CRUD actions"
file: "app/controllers/projects_controller.rb"
actions:
- "index - list all projects with task counts (use includes to prevent N+1)"
- "show - display project with filtered/sorted tasks"
- "new - initialize new project"
- "create - save new project with validations"
- "edit - load project for editing"
- "update - save project updates"
- "destroy - delete project and associated tasks"
validation: "All 7 RESTful actions implemented"
- step: 3
action: "Generate TasksController"
command: "rails generate controller Tasks new edit"
files_created:
- "app/controllers/tasks_controller.rb"
- "app/views/tasks/new.html.erb"
- "app/views/tasks/edit.html.erb"
validation: "Controller and view files created"
- step: 4
action: "Implement TasksController CRUD actions"
file: "app/controllers/tasks_controller.rb"
actions:
- "new - initialize new task for project"
- "create - save new task"
- "edit - load task for editing"
- "update - save task updates"
- "destroy - delete task"
validation: "All task actions implemented (nested under project)"
- step: 5
action: "Generate API TasksController"
command: "mkdir -p app/controllers/api && rails generate controller Api::Tasks index"
files_created:
- "app/controllers/api/tasks_controller.rb"
validation: "API controller created in api namespace"
- step: 6
action: "Implement API TasksController#index"
file: "app/controllers/api/tasks_controller.rb"
implementation:
- "Find project by params[:project_id]"
- "Apply with_status scope if status param present"
- "Apply overdue scope if overdue=true param present"
- "Return JSON with id, title, status, priority, due_date, overdue fields"
validation: "API returns properly formatted JSON with computed fields"
- step: 7
action: "Configure RESTful routes"
file: "config/routes.rb"
implementation:
- "resources :projects with nested resources :tasks"
- "namespace :api with projects/:project_id/tasks route"
- "Set root to projects#index"
validation: "rails routes shows all expected routes"
- step: 8
action: "Verify routes are configured correctly"
command: "rails routes | grep -E '(projects|tasks)'"
validation: "All web and API routes present"
phase_4_views_ui:
name: "Phase 4: Views & User Interface"
status: "completed"
estimated_duration: "UI implementation phase"
dependencies: ["phase_3_controllers_routes"]
steps:
- step: 1
action: "Create application layout with basic styling"
file: "app/views/layouts/application.html.erb"
implementation:
- "Add flash message display area"
- "Add basic navigation structure"
- "Include minimal CSS for readability"
validation: "Layout renders properly with flash messages"
- step: 2
action: "Build projects index view"
file: "app/views/projects/index.html.erb"
features:
- "Page title and 'New Project' button"
- "Table listing all projects"
- "Show project name with link to show page"
- "Display total task count and incomplete task count"
- "Edit and Delete links for each project"
validation: "Index page displays all projects with task counts"
- step: 3
action: "Build project show view"
file: "app/views/projects/show.html.erb"
features:
- "Display project name and description"
- "Status filter form (All, Todo, In Progress, Done)"
- "Sort dropdown (Priority high→low, Due Date soonest→latest)"
- "Tasks table with columns: title, status, priority, due_date, actions"
- "Overdue badge (red/orange indicator) when task.overdue?"
- "Link to add new task"
- "Edit and Delete links for each task"
validation: "Show page displays filtered/sorted tasks with overdue badges"
- step: 4
action: "Create project form partial"
file: "app/views/projects/_form.html.erb"
features:
- "Error message display if validation fails"
- "Name field (required)"
- "Description textarea (optional)"
- "Submit button"
validation: "Form works in both new and edit views"
- step: 5
action: "Build new project view"
file: "app/views/projects/new.html.erb"
implementation: "Render form partial with 'Create Project' heading"
validation: "New project form renders and submits correctly"
- step: 6
action: "Build edit project view"
file: "app/views/projects/edit.html.erb"
implementation: "Render form partial with 'Edit Project' heading"
validation: "Edit project form renders and updates correctly"
- step: 7
action: "Create task form partial"
file: "app/views/tasks/_form.html.erb"
features:
- "Error message display"
- "Title field (required)"
- "Description textarea (optional)"
- "Status dropdown (Todo, In Progress, Done)"
- "Priority dropdown (1-5)"
- "Due date field (date picker)"
- "Submit button"
validation: "Form validates and saves task correctly"
- step: 8
action: "Build new task view"
file: "app/views/tasks/new.html.erb"
implementation: "Render form partial with breadcrumb to parent project"
validation: "New task form creates task under correct project"
- step: 9
action: "Build edit task view"
file: "app/views/tasks/edit.html.erb"
implementation: "Render form partial with breadcrumb and task title"
validation: "Edit task form updates task correctly"
- step: 10
action: "Add basic CSS styling"
file: "app/assets/stylesheets/application.css"
features:
- "Table styling (borders, padding, hover effects)"
- "Form styling (field spacing, button styling)"
- "Overdue badge styling (red background, white text)"
- "Flash message styling (success green, error red)"
- "Basic layout spacing and typography"
validation: "UI is clean and readable (not fancy, just functional)"
- step: 11
action: "Test all UI workflows manually"
workflows:
- "Create, edit, delete project"
- "Create, edit, delete task"
- "Filter tasks by status"
- "Sort tasks by priority and due date"
- "Verify overdue badge appears correctly"
validation: "All CRUD operations work through UI"
phase_5_testing_polish:
name: "Phase 5: Testing & Polish"
status: "completed"
estimated_duration: "Testing and finalization phase"
dependencies: ["phase_4_views_ui"]
steps:
- step: 1
action: "Write API request tests"
file: "spec/requests/api/tasks_spec.rb"
test_cases:
- "GET /api/projects/:project_id/tasks returns JSON array"
- "Response includes all required fields (id, title, status, priority, due_date, overdue)"
- "Status filter works (?status=todo returns only todo tasks)"
- "Overdue filter works (?overdue=true returns only overdue tasks)"
- "Combining filters works (?status=in_progress&overdue=true)"
- "Returns empty array when no tasks match filters"
validation: "All API tests pass"
- step: 2
action: "Run full test suite"
command: "bundle exec rspec"
validation: "All tests pass with good coverage (aim for 90%+ on models)"
- step: 3
action: "Test API endpoints manually with curl or browser"
tests:
- "curl http://localhost:3000/api/projects/1/tasks"
- "curl http://localhost:3000/api/projects/1/tasks?status=todo"
- "curl http://localhost:3000/api/projects/1/tasks?overdue=true"
validation: "API returns proper JSON responses"
- step: 4
action: "Update README.md with setup instructions"
file: "README.md"
sections:
- "Project description and features"
- "Requirements (Ruby 3.3+, Rails 8.0+, PostgreSQL 15+)"
- "Setup instructions (bundle install, db:create, db:migrate)"
- "How to run the application (rails server)"
- "How to run tests (bundle exec rspec)"
- "JSON API documentation with examples"
- "Example API requests and responses"
validation: "README is comprehensive and clear"
- step: 5
action: "Add seed data for demonstration"
file: "db/seeds.rb"
implementation:
- "Create 2-3 sample projects"
- "Create 8-10 tasks with varied statuses, priorities, and due dates"
- "Include some overdue tasks for testing"
command: "rails db:seed"
validation: "Sample data loads successfully"
- step: 6
action: "Review code quality and Rails conventions"
checklist:
- "Controllers are thin (logic in models/scopes)"
- "Strong parameters used in all controllers"
- "Partials used to DRY up views"
- "No N+1 queries (use includes/joins)"
- "RESTful routes followed"
- "Proper error handling and flash messages"
validation: "Code follows Rails best practices"
- step: 7
action: "Final submission checklist review"
items:
- "✓ Project and Task models with validations"
- "✓ CRUD for both models"
- "✓ Task filtering by status"
- "✓ Task sorting by priority/due_date"
- "✓ Overdue detection in UI"
- "✓ JSON API endpoint with filtering"
- "✓ Model tests (validations, overdue?, scopes)"
- "✓ Request tests (API filtering)"
- "✓ README with setup and API examples"
- "✓ Clean RESTful code"
validation: "All assignment requirements met"
- step: 8
action: "Create git commit with completed work"
commands:
- "git add ."
- "git commit -m 'Complete task tracker assignment with all requirements'"
validation: "Clean git history with meaningful commit"
optional_enhancements:
name: "Optional Enhancements (Beyond Requirements)"
note: "Only implement if time permits and core requirements are complete"
ideas:
- "Add task search functionality"
- "Add project categories/tags"
- "Export tasks to CSV"
- "Task completion statistics dashboard"
- "Pagination for large task lists"
- "API pagination and sorting"
- "Task comments or notes"
- "Email notifications for overdue tasks"
development_commands:
setup:
- "bundle install - Install dependencies"
- "rails db:create - Create database"
- "rails db:migrate - Run migrations"
- "rails db:seed - Load sample data"
development:
- "rails server - Start development server (http://localhost:3000)"
- "rails console - Open Rails console for debugging"
- "rails routes - View all routes"
- "rails db:reset - Reset database (drop, create, migrate, seed)"
testing:
- "bundle exec rspec - Run all tests"
- "bundle exec rspec spec/models - Run model tests only"
- "bundle exec rspec spec/requests - Run request tests only"
- "bundle exec rspec spec/models/task_spec.rb:42 - Run specific test at line 42"
debugging:
- "rails db:migrate:status - Check migration status"
- "rails db:rollback - Rollback last migration"
- "rails stats - View project statistics"
key_implementation_notes:
priority_sorting: "Priority 1 = highest, so sort ascending (1, 2, 3, 4, 5)"
due_date_sorting: "Use Arel.sql('due_date IS NULL, due_date ASC') to put NULL dates last"
overdue_logic: "Task is overdue only when: due_date < Date.today AND status != 'done'"
status_values: "Valid statuses are: 'todo', 'in_progress', 'done' (use snake_case)"
scope_design: "Scopes should be chainable and handle nil/blank parameters gracefully"
api_response: "Always include computed 'overdue' boolean in API JSON response"
n_plus_one: "Use includes(:tasks) when loading projects with task counts"
validations: "Test all edge cases: presence, uniqueness, inclusion, numericality"
testing_focus: "Prioritize testing business logic (overdue?, scopes) over CRUD"
success_criteria:
- "All tests pass (bundle exec rspec shows all green)"
- "No N+1 query warnings in development log"
- "All assignment requirements implemented and working"
- "Code follows Rails conventions and style guide"
- "README provides clear setup and API documentation"
- "Application runs without errors on fresh setup"
- "UI is functional and user-friendly (styling is minimal but clean)"
- "API returns proper JSON with all required fields"