How sakthirithan/teamskrypton works
Purpose and Entry Points
Krypton is a role-aware team/workspace management application spanning collaboration, productivity tracking, project-based learning (PBL), monitoring, and administration. The browser client starts at src/main.tsx, composes routing/application state in src/App.tsx, and is packaged as a Vite web app with an Android Capacitor shell (capacitor.config.ts, android/app/src/main/java/com/teamskrypton/app/MainActivity.java).
Client Shell, Session, and Access Control
Authentication and session state form the primary application boundary: unauthenticated users enter the auth screens; authenticated users receive role- and mode-dependent navigation, dashboards, and workspace capabilities. Shared layout provides desktop/mobile navigation, command access, loading, offline, and refresh behavior.
• src/hooks/useAuth.tsx
• src/pages/Auth.tsx
• src/components/layout/GlobalScrollLayout.tsx
Roles and application modes are centralized client concerns and drive feature visibility across leadership, team-member, guest, and administrative flows.
• src/lib/roles.ts
• src/hooks/useAppMode.tsx
• src/components/mode/ModeSwitch.tsx
Grouping Workspace and Team Operations
The grouping area is the main operational workspace: members work with goals/targets, daily entries, habits, sessions, notes, communities, todos, points, skills, and leaderboards. A layout/sidebar boundary organizes these distinct views while hooks encapsulate their backend reads, writes, and subscriptions.
• src/components/grouping/GroupingLayout.tsx
• src/pages/GroupingHome.tsx
• src/hooks/useGroupingTargets.tsx
Role-specific dashboards convert the same workspace data into operational views for captains, strategists, team managers, leadership, and members; task CRUD and assignment are surfaced here.
• src/components/dashboard/CommandCenter.tsx
• src/components/dashboard/TaskCRUD.tsx
• src/components/dashboard/LeadershipDashboard.tsx
Monitoring and Alert Automation
Centralized monitoring is a distinct workflow for tracking member status, configuring targets and alert rules, running daily surveys, reviewing history, and applying manual lead/AP changes. It combines interactive monitoring UI with backend-generated reminder and scheduled-alert processing.
• src/pages/CentralizedMonitoring.tsx
• src/components/monitoring/DailySurveyCommandCenter.tsx
• src/hooks/useCentralizedMonitoring.ts
Notification delivery is a cross-cutting output of monitoring, polls, and team activity. Client views compose and display notifications; privileged server functions send in-app, email, and push messages.
• src/components/notifications/NotificationComposer.tsx
• supabase/functions/send-notification/index.ts
• supabase/functions/evaluate-daily-reminders/index.ts
PBL, Messaging, and Engagement Domains
PBL is a parallel workspace domain with project lifecycle, task boards, milestones, documentation, staffing, timelines, and analytics.
• src/components/pbl/PBLLayout.tsx
• src/pages/PBLProjects.tsx
• src/pages/ProjectDetail.tsx
Team engagement features include polls, group messaging, skill development/challenges, points, and member-facing notifications. These are separate UI domains but share authenticated Supabase data and role enforcement.
• src/components/messenger/MessengerConversation.tsx
• src/components/polls/PollsPanel.tsx
• src/components/grouping/SkillQuestDashboard.tsx
Backend, Data Boundary, and Integrations
Supabase supplies the application backend: the generated client/types are the frontend data boundary; SQL migrations define the evolving schema, indexes, realtime behavior, and row-level-security policies. Edge Functions handle operations that should not rely on direct client privileges, including user lifecycle changes, poll side effects, Google Sheets retrieval, AI skill suggestions, and notification dispatch.
• src/integrations/supabase/client.ts
• src/integrations/supabase/types.ts
• supabase/migrations/20260814_monitoring_and_surveys.sql
External service boundaries include Google Sheets via supabase/functions/fetch-google-sheet/index.ts, notification email/push delivery via server functions, and an AI-backed skills suggestion endpoint (supabase/functions/suggest-skills/index.ts).
Deployment and Native Delivery
The frontend is configured for web deployment with redirect support and Vercel configuration, while the Android project embeds the built web client through Capacitor. PWA assets support installability; native push/deep-link behavior is mediated by client utilities and Capacitor runtime configuration.
• vercel.json
• public/manifest.json
• src/lib/push.ts
Main entry points: roles.ts Roles and modes · client.ts Supabase client · App.tsx Application shell · MessengerConversation.tsx Messaging and engagement
Components 20
Browser client
- Vite entry
src/main.tsx - Application shell
src/App.tsx - Session boundary · Controls authenticated application access.
src/hooks/useAuth.tsx - Authentication screens
src/pages/Auth.tsx - Global layout · Provides navigation, offline, loading, and refresh behavior.
src/components/layout/GlobalScrollLayout.tsx - Roles and modes · Determines navigation and feature visibility.
src/lib/roles.ts
Workspace domains
- Grouping workspace · Goals, daily work, habits, sessions, and team engagement views.
src/components/grouping/GroupingLayout.tsx - Grouping data · Reads, writes, and subscribes to targets.
src/hooks/useGroupingTargets.tsx - Role dashboards · Role-specific team views and task assignment.
src/components/dashboard/CommandCenter.tsx - Central monitoring · Tracks status, targets, alerts, surveys, and history.
src/pages/CentralizedMonitoring.tsx - PBL workspace · Projects, boards, milestones, staffing, and analytics.
src/components/pbl/PBLLayout.tsx - Messaging and engagement · Messaging, polls, skills, points, and notifications.
src/components/messenger/MessengerConversation.tsx
Supabase backend
- Supabase client
src/integrations/supabase/client.ts - Schema and RLS · Defines data model, realtime behavior, indexes, and access policies.
supabase/migrations/20260814_monitoring_and_surveys.sql - Reminder evaluation · Runs scheduled monitoring reminder and alert processing.
supabase/functions/evaluate-daily-reminders/index.ts - Notification dispatch · Sends in-app, email, and push notifications.
supabase/functions/send-notification/index.ts - Privileged integrations · Google Sheets retrieval and AI skill suggestions.
supabase/functions/fetch-google-sheet/index.ts
Delivery
- Web deployment · Hosts the web client with redirect support.
vercel.json - PWA and push · Installability and native push/deep-link mediation.
src/lib/push.ts - Android shell · Embeds the built web application.
android/app/src/main/java/com/teamskrypton/app/MainActivity.java
Connections 24
- Vite entry → Application shell: boots
- Application shell → Session boundary: establishes session
- Session boundary → Authentication screens: unauthenticated
- Session boundary → Global layout: authenticated
- Global layout → Roles and modes: applies access state
- Roles and modes → Grouping workspace: enables workspace
- Roles and modes → Role dashboards: selects views
- Roles and modes → Central monitoring: guards workflow
- Roles and modes → PBL workspace: guards workflow
- Roles and modes → Messaging and engagement: guards features
- Grouping workspace → Grouping data: uses
- Grouping data → Supabase client: data access
- Role dashboards → Supabase client: tasks and workspace data
- Central monitoring → Supabase client: monitoring data
- PBL workspace → Supabase client: project data
- Messaging and engagement → Supabase client: messages, polls, skills
- Supabase client → Schema and RLS: queries under RLS
- Central monitoring → Reminder evaluation: configures rules
- Reminder evaluation → Notification dispatch: triggers delivery
- Messaging and engagement → Notification dispatch: activity notifications
- Messaging and engagement → Privileged integrations: AI and Sheets requests
- Application shell → Web deployment: deployed as web app
- Application shell → PWA and push: uses push runtime
- Web deployment → Android shell: web bundle embedded by