How thav/freehub works
Freehub is a multi-tenant Rails application for community bike shops to manage members and track shop visits. Users enter through organization-scoped routes, then staff manage people, visits, services, notes, and tags; reporting actions query shop activity and offer HTML, XML, or CSV results. Authentication and organization management support this workflow. The graph includes the documented tagging and reporting capabilities and the indexed calendar and drag-and-drop client modules; unsampled controller behavior and links between those client modules and screens are not asserted.
Main entry points: routes.rb Rails routes · reports_controller.rb Report actions · visits_controller.rb Visit actions · service.rb Service records
Components 25
Request and access
- Rails routes
config/routes.rb - Application controller
app/controllers/application_controller.rb - Authentication
lib/authenticated_system.rb - Session actions
app/controllers/sessions_controller.rb - Organization actions
app/controllers/organizations_controller.rb - User actions
app/controllers/users_controller.rb - User records
app/models/user.rb
People and membership
- Organization records
app/models/organization.rb - People actions
app/controllers/people_controller.rb - Person records
app/models/person.rb
Shop activity
- Visit actions
app/controllers/visits_controller.rb - Visit records
app/models/visit.rb - Service actions
app/controllers/services_controller.rb - Service records
app/models/service.rb - Service types
app/models/service_type.rb - Note actions
app/controllers/notes_controller.rb - Notes
app/models/note.rb - Tag assignments
app/controllers/taggings_controller.rb - Tag lookup
app/controllers/tags_controller.rb
Reports and summaries
- Report actions
app/controllers/reports_controller.rb - Visit summaries
app/models/visits_summary.rb
Browser interface
- Date calendar
public/javascripts/calendar_date_select/calendar_date_select.js - Drag and drop
public/javascripts/dragdrop.js - Tag controls
public/javascripts/tags.jquery.js
Other components
- Shop staff
Connections 23
- Shop staff → Rails routes: sends requests
- Rails routes → Organization actions: routes organization
config/routes.rb - Rails routes → User actions: routes users
config/routes.rb - Rails routes → Session actions: routes sessions
config/routes.rb - Rails routes → People actions: routes people
config/routes.rb - Rails routes → Visit actions: routes visits
config/routes.rb - Rails routes → Service actions: routes services
config/routes.rb - Rails routes → Note actions: routes notes
config/routes.rb - Rails routes → Tag assignments: routes taggings
config/routes.rb - Rails routes → Tag lookup: routes tags
config/routes.rb - Rails routes → Report actions: routes reports
config/routes.rb - Visit actions → Visit records: creates and updates
app/controllers/visits_controller.rb - Visit actions → Notes: creates notes
app/controllers/visits_controller.rb - Report actions → Visit records: queries visits
app/controllers/reports_controller.rb - Report actions → Service records: queries services
app/controllers/reports_controller.rb - Report actions → Service types: loads types
app/controllers/reports_controller.rb - Report actions → Person records: queries people
app/controllers/reports_controller.rb - Report actions → Visit summaries: builds summary
app/controllers/reports_controller.rb - Authentication → User records: authenticates users
lib/authenticated_system.rb - User actions → User records: creates and finds
app/controllers/users_controller.rb - Service records → Notes: associates note
app/models/service.rb - Service records → Person records: belongs to
app/models/service.rb - Tag controls → Tag assignments: sends tag requests
public/javascripts/tags.jquery.js