How ycsarahli/face-cloak-app works
Face Cloak App is a server-rendered web frontend for privacy controls over detected faces in images; the API owns persistence and authorization. A browser user logs in or registers, browses images, and can upload images or manage face assignments. The app also supports Google SSO, account management, image history, and secure sessions. The graph reflects the sampled routing and session code plus README-documented capabilities; unsampled controller and service internals limit confidence about some individual call paths.
Main entry points: app.rb Web app routes · images.rb Image routes · auth.rb Auth routes · services Image services
Components 25
Web routing
- Web app routes
app/controllers/app.rb - Security headers
app/controllers/security.rb
Identity and security
- Auth routes
app/controllers/auth.rb - Auth validation
app/forms/auth.rb - Form helpers
app/forms/form_base.rb - Current session
app/models/current_session.rb - Secure session
app/lib/secure_session.rb - Message encryption
app/lib/secure_message.rb - Google OAuth client
app/services/google_oauth_client.rb - Authentication services
app/services
Image workflows
- Image routes
app/controllers/images.rb - Assignment validation
app/forms/face_assignment.rb - Image services
app/services - Image and face data
app/models/image.rb - Image history
app/models/image_log.rb - Image presentation helpers
app/lib - Face assignment helpers
app/lib/face_assignment_helper.rb
Account workflows
- Account routes
app/controllers/account.rb - Account services
app/services
API integration
- Request signing
app/lib/signed_message.rb - API client
app/services/api_client.rb
Other components
- Browser user
- Face Cloak API
- Google identity
- Rack session store
Connections 27
- Browser user → Web app routes: requests pages
- Web app routes → Auth routes: dispatches routes
app/controllers/auth.rb - Web app routes → Account routes: dispatches routes
app/controllers/account.rb - Web app routes → Image routes: dispatches routes
app/controllers/images.rb - Web app routes → Security headers: configures headers
app/controllers/security.rb - Auth routes → Auth validation: validates credentials
app/controllers/auth.rb - Auth validation → Form helpers: uses shared rules
app/forms/auth.rb - Image routes → Assignment validation: validates assignment
- Auth routes → Current session: sets account
app/controllers/auth.rb - Web app routes → Current session: reads account
app/controllers/app.rb - Current session → Secure session: stores securely
- Secure session → Message encryption: encrypts values
app/lib/secure_session.rb - Auth routes → Google OAuth client: starts OAuth
app/controllers/auth.rb - Google OAuth client → Google identity: exchanges tokens
- Auth routes → Authentication services: authenticates account
app/controllers/auth.rb - Authentication services → API client: sends requests
- Authentication services → Request signing: signs requests
- Account routes → Account services: manages accounts
- Image routes → Image services: handles images
- Web app routes → Image services: lists images
app/controllers/app.rb - Image services → API client: sends requests
- Image services → Image and face data: returns image data
- Image routes → Image history: shows history
- Image routes → Image presentation helpers: renders image details
- Image routes → Face assignment helpers: renders face controls
- API client → Face Cloak API: calls API
- Web app routes → Rack session store: uses Rack sessions