How fahad09belal/apbnmessageportal works
The tree suggests a web-based squad message portal, with account-deletion endpoints and a service worker for push notifications. The main page and database schema are present but not excerpted, and the README is empty, so the portal’s message workflow and schema details cannot be mapped reliably. The account endpoints verify sessions with Supabase Auth; admin deletion additionally checks a profile’s role and ban status. Deleting an account is documented to cascade to messages. Edges show only relationships evidenced by excerpts.
Main entry points: sw.js Push service worker · delete-account/index.ts Delete own account · admin-delete-user/index.ts Admin user deletion · schema.sql Profiles and messages
Components 9
Portal
- Web portal
index.html
Account management
- Delete own account
supabase/functions/delete-account/index.ts - Admin user deletion
supabase/functions/admin-delete-user/index.ts - Profiles and messages
supabase/schema.sql
Notifications
- Push service worker
sw.js
Other components
- Portal user
- Supabase Auth
- Push server
- Browser notifications
Connections 8
- Delete own account → Supabase Auth: validates and deletes
supabase/functions/delete-account/index.ts - Admin user deletion → Supabase Auth: validates and deletes
supabase/functions/admin-delete-user/index.ts - Admin user deletion → Profiles and messages: checks admin role
supabase/functions/admin-delete-user/index.ts - Delete own account → Profiles and messages: deletion cascades
supabase/functions/delete-account/index.ts - Push server → Push service worker: sends push
- Push service worker → Browser notifications: shows notification
sw.js - Browser notifications → Push service worker: clicks notification
sw.js - Push service worker → Web portal: focuses or opens
sw.js