How sanchitasan/atomquest_frontend works
1. Overall shape
- This is a React single-page application built with Vite. The repo is a frontend client, not a backend service.
- The architecture is centered on route-based pages, a shared layout, and a small API client layer that talks to an external backend.
2. Primary user flows
- The app appears to support an auth + role-based performance management workflow: users can land on a public marketing page, sign up or log in, then access dashboards and operational pages for goals, check-ins, reports, and audits.
- The presence of separate dashboard pages for Admin, Manager, and Employee indicates the UI is segmented by role rather than being one generic dashboard.
3. Routing and access control
- src/routes/ProtectedRoute.jsx is the key boundary for authenticated access.
- Public pages include Landing, Login, and Signup; protected pages include dashboard and workbench views such as Goals, Checkins, Reports, AuditLogs, and the role-specific dashboard pages.
- This suggests the router is the main control point for deciding what can be seen before and after authentication.
4. Layout and navigation shell
- src/layouts/MainLayout.jsx and src/components/Sidebar.jsx provide the persistent app chrome.
- The sidebar is likely the main navigation structure for authenticated users, while the layout wraps page content and keeps navigation consistent across the internal app.
- This is an important architectural boundary: page components render business content, while the layout handles cross-cutting navigation structure.
5. API layer as backend integration boundary
- The src/api folder is a clean separation point for external communication.
- There are dedicated clients for authApi, goalApi, checkinApi, reportApi, and auditApi, with shared configuration in config.js.
- This implies the frontend communicates with a backend over HTTP and keeps endpoint-specific logic isolated by domain.
6. Domain modules reflected in the UI
- The app is organized around several functional domains:
- Authentication: Login, Signup, authApi
- Goals/KPIs: Goals, AssignKPI, AssignedKPI, SharedGoalOverview, goalApi
- Check-ins: Checkins, checkinApi
- Reports: Reports, reportApi
- Auditing: AuditLogs, auditApi
- This structure suggests the backend data model likely revolves around users, goals/KPIs, review activity, and reporting events.
7. Dashboard subsystem
- src/pages/dashboard contains role-specific dashboards: AdminDashboard, ManagerDashboard, and EmployeeDashboard.
- Supporting components in src/components/dashboard include MetricCard, GoalProgressCard, ActivityTimeline, and SectionHeader.
- This indicates the dashboards are composed from reusable analytical widgets rather than being monolithic pages.
8. Data presentation pattern
- The dashboard components suggest the UI is oriented around summary metrics, progress tracking, and recent activity.
- ActivityTimeline and GoalProgressCard imply a workflow where user actions and goal status are shown over time, which is likely fed by backend API responses.
- SectionHeader and MetricCard point to a consistent design system for internal views.
9. State and business logic distribution
- Most business logic likely lives inside page components, with reusable visual components kept in components/.
- src/utils/managerReviewHistory.js is a notable utility module, likely used to derive or format review-history data for manager views.
- This suggests the app keeps some client-side transformation logic, but the source of truth remains the backend APIs.
10. Styling and UI system
- The repo includes tailwind.config.js, src/index.css, and src/App.css, so styling is probably a mix of Tailwind CSS utilities and app-level CSS.
- The UI architecture is therefore component-driven, with styling distributed across utility classes and a small number of global styles.
11. Build/runtime boundary
- vite.config.js, index.html, and src/main.jsx define the standard Vite React bootstrap path.
- The app runs as a browser-delivered frontend bundle, with Vite handling local development and production builds.
- eslint.config.js indicates static linting is part of the development workflow.
12. What an architecture diagram should show
- A good diagram would place the browser SPA at the center, with:
- public routes on one side,
- authenticated/role-based routes behind ProtectedRoute,
- a shared MainLayout + Sidebar shell around internal pages,
- and a separate API layer connecting to backend services for auth, goals, check-ins, reports, and audits.
- The dashboard subsystem should be shown as a reusable presentation layer feeding on API data, not as a separate service.
Main entry points: App.jsx App · ManagerDashboard.jsx Manager dashboard · goalApi.js Goal API · config.js API config
Components 30
Routing
Route gating and page composition
- App · Top-level app wiring for routes, layout, and global UI.
src/App.jsx - Protected route · Restricts access to authenticated sections.
src/routes/ProtectedRoute.jsx
Shell
Persistent layout and navigation chrome
- Main layout · Wraps authenticated pages with shared structure.
src/layouts/MainLayout.jsx - Sidebar · Primary navigation for internal users.
src/components/Sidebar.jsx
Public pages
Unauthenticated entry pages
Workflows
Authenticated business pages
- Goals · Goal and KPI management page.
src/pages/Goals.jsx - Assign KPI · Page for assigning KPIs.
src/pages/AssignKPI.jsx - Assigned KPI · Page showing assigned KPIs.
src/pages/AssignedKPI.jsx - Shared goals · Overview of shared goal status.
src/pages/SharedGoalOverview.jsx - Check-ins · Check-in workflow page.
src/pages/Checkins.jsx - Reports · Reporting and analytics page.
src/pages/Reports.jsx - Audit logs · Audit and traceability page.
src/pages/AuditLogs.jsx
Dashboards
Role-specific dashboard pages
- Dashboard · Entry page that likely redirects into role-specific dashboards.
src/pages/Dashboard.jsx - Admin dashboard · Admin-focused summary and controls.
src/pages/dashboard/AdminDashboard.jsx - Manager dashboard · Manager-focused summary and team views.
src/pages/dashboard/ManagerDashboard.jsx - Employee dashboard · Employee-focused summary and personal views.
src/pages/dashboard/EmployeeDashboard.jsx
Dashboard UI
Reusable dashboard presentation components
- Metric card · Reusable KPI summary card.
src/components/dashboard/MetricCard.jsx - Goal progress · Reusable progress visualization for goals.
src/components/dashboard/GoalProgressCard.jsx - Activity timeline · Reusable recent activity view.
src/components/dashboard/ActivityTimeline.jsx - Section header · Reusable section title and framing component.
src/components/dashboard/SectionHeader.jsx
API layer
HTTP client boundary to backend domains
- Goal API · HTTP client for goals, KPI assignment, and shared goal data.
src/api/goalApi.js - Check-in API · HTTP client for check-in operations.
src/api/checkinApi.js - Report API · HTTP client for reporting data.
src/api/reportApi.js - Audit API · HTTP client for audit log data.
src/api/auditApi.js - Auth API · HTTP client for authentication and session flow.
src/api/authApi.js - API config · Shared API base configuration.
src/api/config.js
Other components
- Review history · Client-side helper for manager review history shaping.
src/utils/managerReviewHistory.js
Connections 32
- main.jsx → App: boots · Browser entry mounts the React app.
- App → Landing: public route · App exposes the public landing page.
- App → Login: public route · App exposes login.
- App → Signup: public route · App exposes signup.
- App → Protected route: guards · Authenticated routes flow through the access boundary.
- Protected route → Main layout: wraps · Protected content is rendered inside the shared shell.
- Main layout → Sidebar: contains · Layout includes persistent navigation.
- App → Dashboard: route · App routes authenticated users to the dashboard entry.
- Dashboard → Admin dashboard: role view · Dashboard entry can lead to admin view.
- Dashboard → Manager dashboard: role view · Dashboard entry can lead to manager view.
- Dashboard → Employee dashboard: role view · Dashboard entry can lead to employee view.
- Admin dashboard → Metric card: uses · Admin dashboards compose summary cards.
- Manager dashboard → Metric card: uses · Manager dashboards compose summary cards.
- Employee dashboard → Metric card: uses · Employee dashboards compose summary cards.
- Admin dashboard → Goal progress: uses · Dashboard progress widgets visualize goals.
- Manager dashboard → Activity timeline: uses · Manager dashboard shows recent activity.
- Manager dashboard → Section header: uses · Dashboard sections are framed consistently.
- Goals → Goal API: reads/writes · Goals page talks to the goal domain client.
- Assign KPI → Goal API: reads/writes · KPI assignment uses goal API.
- Assigned KPI → Goal API: reads · Assigned KPIs are fetched from the goal API.
- Shared goals → Goal API: reads · Shared goal view uses goal API data.
- Check-ins → Check-in API: reads/writes · Check-ins page talks to check-in API.
- Reports → Report API: reads · Reports page pulls reporting data.
- Audit logs → Audit API: reads · Audit logs page pulls audit data.
- Login → Auth API: auth · Login uses authentication API.
- Signup → Auth API: auth · Signup uses authentication API.
- Auth API → API config: configures · Auth client uses shared HTTP configuration.
- Goal API → API config: configures · Goal client uses shared HTTP configuration.
- Check-in API → API config: configures · Check-in client uses shared HTTP configuration.
- Report API → API config: configures · Report client uses shared HTTP configuration.
- Audit API → API config: configures · Audit client uses shared HTTP configuration.
- Manager dashboard → Review history: derives · Manager view likely formats review-history data locally.