How rakshit096/vehicle_service_tracker works
This is a Rails API for tracking vehicle servicing: registration and odometer records provide the context for service completion, due-target calculation, and alerts. The principal workflow visible in the sampled code validates a vehicle, agent, service type, and reading; resolves due rules; then records the odometer and service transactionally and can resolve a matching alert. Other service modules indicate account, reporting, invoicing, and scheduled-check capabilities. Routes expose only Rails’ health check in the sampled tree, so the public request path and job dispatch wiring are not established.
Main entry points: service_completion_service.rb Service completion · application.rb Rails API · due_service_checker.rb Schedule due checks · boot.rb Boot setup
Components 22
API runtime
- Rails API
config/application.rb - Boot setup
config/boot.rb - Application database
db/schema.rb
Accounts and vehicles
- Vehicle records
app/models/vehicle.rb - Account services
app/services/signup_service.rb - Vehicle registration
app/services/vehicle_registrar.rb
Service lifecycle
- Service completion
app/services/service_completion_service.rb - Rule resolver
app/services/service_rule_resolver.rb - Rule strategies
app/services/stage_strategies/base_strategy.rb - Service records
app/models/service_record.rb - Odometer logs
app/models/odometer_log.rb - Service reports
app/services/service_report_recorder.rb - Invoice recording
app/services/invoice_recorder.rb - Operation result
app/services/service_result.rb
Due checks and alerts
- Schedule due checks
app/services/due_service_checker.rb - Alternate due checks
app/services/due_service_checker_v2.rb - General checks
app/services/general_service_checker.rb - Due-target strategies
app/services/due_target_strategies/model_schedule_strategy.rb - Alert generation
app/services/alert_generator.rb - Alert dismissal
app/services/alert_dismisser.rb - Alert records
app/models/alert.rb
Other components
- API client
Connections 8
- Rails API → Boot setup: requires
config/application.rb - API client → Rails API: API requests
- Service completion → Rule resolver: resolves rules
app/services/service_completion_service.rb - Service completion → Vehicle records: looks up vehicle
app/services/service_completion_service.rb - Service completion → Service records: creates record
app/services/service_completion_service.rb - Service completion → Odometer logs: writes reading
app/services/service_completion_service.rb - Service completion → Alert records: checks and resolves
app/services/service_completion_service.rb - Schedule due checks → Alert generation: generates alerts
app/services/due_service_checker.rb