How tis-emman/cognilab-lis works
CogniLab is a laboratory information system for managing users, patients, test requests, specimens, results, quality checks, reports, and billing. Lab staff use dashboard pages to perform these tasks; the pages call shared data-access code, which uses Supabase or demo data. Administration includes user management and audit history. The README is only a generic Next.js starter description, so domain capabilities and links here are based on the source index and sampled excerpts; links between lab stages are not assumed where calls were not shown.
Main entry points: database.ts Data access · authContext.tsx Authentication · supabaseClient.ts Supabase client · page.tsx Sign in
Components 20
Access and navigation
- Sign in
app/login/page.tsx - Authentication
lib/authContext.tsx - Dashboard navigation
components/Sidebar.tsx
Laboratory workflow
- Dashboard overview
app/dashboard/page.tsx - Patient records
app/dashboard/patients/page.tsx - Test requests
app/dashboard/test-request/page.tsx - Specimen tracking
app/dashboard/specimen-tracking/page.tsx - Test results
app/dashboard/results/page.tsx - Quality checks
app/dashboard/quality-checking/page.tsx - Lab reports
app/dashboard/report/page.tsx - Billing
app/dashboard/billing/page.tsx
Administration
- Access history
app/dashboard/history/page.tsx - User profile
app/dashboard/profile/page.tsx - User administration
app/admin/users/page.tsx - Audit log
app/admin/audit-log/page.tsx
Data services
- Data access
lib/database.ts - Demo data
lib/mockData.ts - Supabase client
lib/supabaseClient.ts
Other components
- Lab staff
- Supabase
Connections 21
- Lab staff → Sign in: signs in
app/login/page.tsx - Sign in → Authentication: authenticates through
app/login/page.tsx - Authentication → Supabase client: uses
lib/authContext.tsx - Authentication → Demo data: uses demo users
lib/authContext.tsx - Authentication → Supabase: authenticates with
lib/authContext.tsx - Dashboard navigation → Authentication: reads session
components/Sidebar.tsx - Dashboard overview → Data access: loads data
app/dashboard/page.tsx - Patient records → Data access: reads and updates
app/dashboard/patients/page.tsx - Test requests → Data access: uses
app/dashboard/test-request/page.tsx - Specimen tracking → Data access: loads and records
app/dashboard/specimen-tracking/page.tsx - Test results → Data access: loads and updates
app/dashboard/results/page.tsx - Quality checks → Data access: reads and logs
app/dashboard/quality-checking/page.tsx - Lab reports → Data access: uses
app/dashboard/report/page.tsx - Billing → Data access: uses
app/dashboard/billing/page.tsx - Access history → Data access: uses
app/dashboard/history/page.tsx - User profile → Authentication: reads session
app/dashboard/profile/page.tsx - User administration → Data access: manages users through
app/admin/users/page.tsx - Audit log → Data access: reads logs through
app/admin/audit-log/page.tsx - Data access → Supabase client: queries
lib/database.ts - Data access → Demo data: uses demo records
lib/database.ts - Supabase client → Supabase: connects to
lib/supabaseClient.ts