How mazt08/maze_bank works
Maze Bank is a Next.js banking demo centered on account registration/login, authenticated balance and transaction views, and atomic transfers. The graph follows the documented server-only Firestore boundary and includes analytics, profile, admin, notifications, and chatbot capabilities. Some branches are documented by the README or source index but their implementation details were not excerpted; those relationships are omitted where callers are not evidenced.
Main entry points: auth.ts Auth and sessions · firestore.ts Banking data helpers · AuthForm.tsx Login and registration · page.tsx Account dashboard
Components 25
Identity and sessions
- Login and registration
components/AuthForm.tsx - Auth and sessions
actions/auth.ts - Route protection
middleware.ts - Profile management
components/ProfileClient.tsx
Accounts and transfers
- Account dashboard
app/dashboard/page.tsx - Transfer form
components/TransferForm.tsx - Transfer processing
actions/transfer.ts - Transaction history
app/transactions/page.tsx - Spending analytics
app/analytics/page.tsx - Analytics charts
components/Analytics.tsx
Banking experience
- Authenticated shell
components/Layout.tsx
Administration and engagement
- Admin console
app/admin/page.tsx - User management
components/AdminDashboardClient.tsx - Admin actions
actions/admin.ts - Notification actions
actions/notifications.ts - Notification bell
components/NotificationBell.tsx - Chatbot actions
actions/chat.ts - MazeBot widget
components/MazeBot.tsx
Firebase services
- Banking data helpers
lib/firestore.ts - Firebase Admin SDK
lib/firebase-admin.ts - Firebase client auth
lib/firebase-client.ts - Firestore
- Firebase Authentication
Other components
- Bank customer
- Bank administrator
Connections 36
- Bank customer → Login and registration: signs in
components/AuthForm.tsx - Login and registration → Firebase client auth: authenticates with
components/AuthForm.tsx - Login and registration → Auth and sessions: sets session
components/AuthForm.tsx - Login and registration → Auth and sessions: registers account
components/AuthForm.tsx - Auth and sessions → Firebase Admin SDK: verifies token
actions/auth.ts - Auth and sessions → Banking data helpers: creates user
actions/auth.ts - Firebase client auth → Firebase Authentication: authenticates
lib/firebase-client.ts - Route protection → Bank customer: checks session
- Bank customer → Account dashboard: views account
README.md - Account dashboard → Auth and sessions: reads session
app/dashboard/page.tsx - Account dashboard → Banking data helpers: loads account and activity
app/dashboard/page.tsx - Account dashboard → Authenticated shell: renders within
app/dashboard/page.tsx - Bank customer → Transfer form: initiates transfer
README.md - Transfer form → Transfer processing: submits transfer
components/TransferForm.tsx - Transfer processing → Banking data helpers: moves funds atomically
README.md - Transfer processing → Notification actions: triggers notice
actions/transfer.ts - Bank customer → Transaction history: reviews activity
README.md - Transaction history → Auth and sessions: reads session
app/transactions/page.tsx - Transaction history → Banking data helpers: loads transactions
app/transactions/page.tsx - Bank customer → Spending analytics: views insights
README.md - Spending analytics → Analytics charts: passes analytics data
app/analytics/page.tsx - Spending analytics → Firestore: queries transaction data
app/analytics/page.tsx - Bank customer → Profile management: manages profile
README.md - Profile management → Auth and sessions: updates display name
components/ProfileClient.tsx - Bank administrator → Admin console: manages accounts
README.md - Admin console → User management: renders admin tools
app/admin/page.tsx - User management → Admin actions: requests user operations
components/AdminDashboardClient.tsx - Admin actions → Banking data helpers: reads and updates users
actions/admin.ts - Authenticated shell → Auth and sessions: signs out
components/Layout.tsx - Authenticated shell → Notification bell: renders bell
components/Layout.tsx - Authenticated shell → MazeBot widget: renders chatbot
components/Layout.tsx - Notification bell → Notification actions: loads notifications
components/NotificationBell.tsx - MazeBot widget → Chatbot actions: sends chat requests
components/MazeBot.tsx - Banking data helpers → Firebase Admin SDK: uses
lib/firestore.ts - Firebase Admin SDK → Firestore: reads and writes
lib/firebase-admin.ts - Firebase Admin SDK → Firebase Authentication: verifies sessions
lib/firebase-admin.ts