How gokul-nygenx/crm-tool works
This is a web CRM for a professional-services practice. Users sign in, review a financial-year dashboard, and manage client relationships, service packages, compliance work, renewals, invoices, and collections. The Zustand store coordinates CRM records and synchronizes them through the Supabase data layer; authentication also uses Supabase. The tree and excerpts establish the product areas, but do not expose every page-to-store connection, so those links are omitted where unverified.
Main entry points: AuthContext.tsx Authentication · page.tsx Sign in · route.ts OTP dispatch · supabaseData.ts Supabase data access
Components 27
Access and Shell
- Sign in
src/app/login/page.tsx - Authentication
src/context/AuthContext.tsx - OTP dispatch
src/app/api/send-otp/route.ts - Application shell
src/components/AppShell.tsx - Dashboard
src/app/page.tsx - Global search
src/components/GlobalSearchModal.tsx
Client Relationships
- Client directory
src/app/clients/page.tsx - Lead tracking
src/app/leads/page.tsx - Collaborations
src/app/collaborations/page.tsx
Service Operations
- Service catalog
src/app/services/page.tsx - Sub-services
src/app/sub-services/page.tsx - Required documents
src/app/required-docs/page.tsx - Client services
src/app/service-clients/page.tsx - Renewals
src/app/renewals/page.tsx - Due dates
src/app/due-dates/page.tsx - Automations
src/app/automations/page.tsx
Finance and Workspace
- Invoices
src/app/invoice/page.tsx - Banking
src/app/banking/page.tsx - Drafts
src/app/drafts/page.tsx - Subscription
src/app/subscription/page.tsx - Workspace settings
src/app/settings/page.tsx
State and Integrations
- CRM state
src/lib/store.ts - Supabase data access
src/lib/supabaseData.ts - Supabase
src/lib/supabase.ts
Other components
- Practice user
- SMTP email
- Resend API
Connections 30
- Practice user → Sign in: signs in
- Sign in → Authentication: uses auth
- Authentication → Supabase: checks session
- Authentication → Supabase data access: resolves identity
- Authentication → Supabase: upserts profile
- Sign in → OTP dispatch: requests code
- OTP dispatch → SMTP email: sends email
- OTP dispatch → Resend API: sends email
- Practice user → Dashboard: views workspace
- Dashboard → Application shell: renders within
- Client directory → Application shell: renders within
- Invoices → Application shell: renders within
- Sub-services → CRM state: reads and updates
- CRM state → Supabase data access: fetches and syncs
- Supabase data access → Supabase: reads and writes
- Practice user → Client directory: manages clients
- Practice user → Lead tracking: tracks leads
- Practice user → Collaborations: manages partners
- Practice user → Service catalog: configures services
- Practice user → Required documents: tracks documents
- Practice user → Client services: assigns services
- Practice user → Renewals: tracks renewals
- Practice user → Due dates: reviews deadlines
- Practice user → Automations: configures workflows
- Practice user → Invoices: creates invoices
- Practice user → Banking: reviews banking
- Practice user → Drafts: manages drafts
- Practice user → Subscription: manages subscription
- Practice user → Workspace settings: configures workspace
- Practice user → Global search: searches records