How kevcav575/envirogest.mx works
EnviroGest MX is an environmental compliance workspace for client companies and their consultants, with administrative oversight. The user flow is role-based sign-in, then project work: clients complete an environmental questionnaire, review generated permits and their details, track schedules and alerts, and maintain ISO 14001 progress; consultants and administrators manage projects and users. The browser store excerpt shows project data persisted locally, while a separate Express service provides server-side user authentication and management. Several page modules are indexed but unsampled, so their internal calls are not inferred.
Main entry points: useAppStore.ts App state actions · router.tsx Role routes · workspace Project workspace pages · AdminHomePage.tsx Admin console
Components 28
App entry and access
- React app
src/App.tsx - Role routes
src/router.tsx - Role guard
src/guards/AuthGuard.tsx - Sign-in page
src/pages/auth/AuthPage.tsx
Compliance workspace
- Project workspace pages
src/pages/workspace - Environmental diagnosis
src/pages/workspace/QuestionnairePage.tsx - Permit catalog
src/constants/tramites.ts - Permit generation
src/lib/utils.ts - Project dashboard
src/pages/workspace/DashboardPage.tsx - Permit details
src/pages/workspace/TramiteDetailPage.tsx - Compliance schedule
src/pages/workspace/CronogramaPage.tsx - Project alerts
src/pages/workspace/AlertasPage.tsx - ISO 14001 tracking
src/pages/workspace/ISO14001Page.tsx
People and oversight
- Admin console
src/pages/admin/AdminHomePage.tsx - Consultant console
src/pages/consultant/ConsultantHomePage.tsx - Consultant project panel
src/pages/workspace/ConsultorPanelPage.tsx
Application state
- App state actions
src/store/useAppStore.ts - Browser project storage
src/services/localStorage.service.ts - Storage contract
src/services/storage.interface.ts
User service
- Auth API client
src/services/auth.service.ts - REST storage adapter
src/services/api.service.ts - Express routes
server/src/index.ts - Authentication routes
server/src/routes/auth.ts - User management routes
server/src/routes/users.ts - JWT middleware
server/src/middleware/auth.ts - JSON user store
server/src/db/store.ts
Other components
- Workspace user
- Google Calendar
Connections 36
- Workspace user → React app: uses
- React app → Role routes: renders
src/App.tsx - Role routes → Sign-in page: routes to
src/router.tsx - Role routes → Role guard: guards routes
src/router.tsx - Role routes → Admin console: routes to
src/router.tsx - Role routes → Consultant console: routes to
src/router.tsx - Role routes → Project workspace pages: routes to
src/router.tsx - Role guard → App state actions: reads session
src/guards/AuthGuard.tsx - Sign-in page → App state actions: submits credentials
src/pages/auth/AuthPage.tsx - Environmental diagnosis → App state actions: updates answers
src/pages/workspace/QuestionnairePage.tsx - Permit generation → Permit catalog: filters catalog
src/lib/utils.ts - Environmental diagnosis → Permit generation: generates permits
src/pages/workspace/QuestionnairePage.tsx - Project workspace pages → Project dashboard: includes
- Project workspace pages → Permit details: includes
- Project workspace pages → Compliance schedule: includes
- Project workspace pages → Project alerts: includes
- Project workspace pages → ISO 14001 tracking: includes
- Project dashboard → App state actions: reads project
src/pages/workspace/DashboardPage.tsx - Permit details → App state actions: updates permit
src/pages/workspace/TramiteDetailPage.tsx - Compliance schedule → App state actions: reads project
src/pages/workspace/CronogramaPage.tsx - Project alerts → App state actions: reads project
src/pages/workspace/AlertasPage.tsx - Admin console → App state actions: manages records
src/pages/admin/AdminHomePage.tsx - Admin console → Browser project storage: saves meeting
src/pages/admin/AdminHomePage.tsx - Consultant project panel → App state actions: manages projects
src/pages/workspace/ConsultorPanelPage.tsx - App state actions → Browser project storage: persists data
src/store/useAppStore.ts - Browser project storage → Storage contract: implements
src/services/localStorage.service.ts - App state actions → Auth API client: delegates auth
src/store/useAppStore.ts - Auth API client → Express routes: calls API
- REST storage adapter → Storage contract: implements
src/services/api.service.ts - Express routes → Authentication routes: mounts routes
server/src/index.ts - Express routes → User management routes: mounts routes
server/src/index.ts - Authentication routes → JSON user store: reads and writes
server/src/routes/auth.ts - User management routes → JSON user store: reads and writes
server/src/routes/users.ts - Authentication routes → JWT middleware: uses guard
server/src/routes/auth.ts - User management routes → JWT middleware: uses guard
server/src/routes/users.ts - Admin console → Google Calendar: opens meeting link
src/pages/admin/AdminHomePage.tsx