How abhinavsaxena2308/taskflow works
1. Overall shape
- TaskFlow is a client-side React 19 single-page app built with Vite.
- The front end owns almost all interaction logic; Supabase provides authentication, persistence, and real-time backend services.
2. Application shell and bootstrap
- src/main.jsx is the entry point that mounts the app and global providers.
- Global styling comes from src/index.css, src/styles/globals.css, Tailwind, and component-level CSS such as src/App.css.
3. Route-level architecture
- The app is organized around pages in src/pages: LandingPage, Login, Signup, Dashboard, and Documentation.
- Legal pages are separate components under src/components/legal, suggesting dedicated routes for privacy and terms.
- ProtectedRoute.jsx acts as the main boundary between public pages and authenticated task management screens.
4. Authentication boundary
- src/contexts/AuthContext.jsx centralizes Supabase session state and exposes login/logout behavior to the UI.
- src/lib/supabaseClient.js is the single integration point for Supabase credentials and API access.
- The auth flow is: public signup/login → session creation in Supabase Auth → protected access to dashboard/task features.
5. Task management subsystem
- The dashboard task experience is decomposed into focused components under src/components/tasks.
- TaskList, TaskCard, TaskModal, AddTask, QuickAddTask, FilterPanel, SortPanel, and SubTaskList together implement CRUD, filtering, sorting, and nested subtasks.
- The README’s priority, due-date, progress, and status features map directly to this subsystem.
6. Data flow for tasks
- Task data likely comes from Supabase tables and is rendered into the dashboard, then updated through task forms/modals.
- src/utils/taskUtils.js and src/utils/filterUtils.js provide the non-UI transformation layer for filtering, sorting, and computed task state.
- src/data/dummyTasks.js serves as local sample data, likely for development or empty-state/demo behavior.
7. Real-time and backend schema
- The project uses Supabase real-time features, so task state is expected to update across sessions without manual refresh.
- schema.sql and the migration files under supabase/migrations define the database shape and access rules.
- The presence of RLS policies and later migrations for priority and progress shows the backend schema is an explicit part of the architecture, not an incidental detail.
8. Global UI and shared components
- src/components/ui contains the reusable design system: buttons, inputs, cards, badges, modal, progress, spinner, skeletons, empty states, and error boundary.
- Toast handling is isolated under src/components/ui/toast, giving the app a consistent notification channel.
- src/components/layout contains the navigation shell and page framing used across authenticated and public views.
9. Theme, responsiveness, and interaction utilities
- ThemeContext.jsx, SharedThemeContext.jsx, and ThemeToggle.jsx implement the dark/light theme boundary.
- useKeyboardShortcuts.js adds app-wide keyboard actions such as quick task creation and tab switching.
- Tailwind and the shared layout components drive the responsive behavior described in the README.
10. Operational and deployment boundary
- vercel.json indicates deployment to static hosting with routing handled at the edge.
- vite.config.js, tailwind.config.js, and postcss.config.js define the build pipeline, styling compilation, and production asset generation.
- public/screenshots is documentation-only content used to present the app, not part of runtime behavior.
11. How the main user flow works
- A user lands on the public marketing page, signs up or logs in, then enters the protected dashboard.
- On the dashboard, the user creates or edits tasks, applies filters/sorts, and tracks subtasks/progress.
- State changes are persisted through Supabase and reflected back into the UI, with theme, toast, and keyboard shortcuts acting as cross-cutting services.
12. Key diagram boundaries to show
- Public vs authenticated routes.
- UI shell vs task domain components.
- Front-end state/contexts vs Supabase auth/database.
- Local transformation utilities vs persisted task records.
- Shared UI primitives vs feature-specific task screens.
Main entry points: App.jsx App shell · TaskList.jsx Task list · Dashboard.jsx Dashboard · supabaseClient.js Supabase client
Components 26
App shell
Entry point, routes, and page-level composition.
- Main entry · Mounts the React app and global providers.
src/main.jsx - App shell · Top-level app composition and route wiring.
src/App.jsx - Landing page · Marketing and first-contact entry screen.
src/pages/LandingPage.jsx - Login · Sign-in screen for existing users.
src/pages/Login.jsx - Signup · Account creation screen for new users.
src/pages/Signup.jsx - Dashboard · Authenticated task workspace entry point.
src/pages/Dashboard.jsx - Docs · Product and usage documentation page.
src/pages/Documentation.jsx - Protected route · Boundary that blocks unauthenticated dashboard access.
src/components/ProtectedRoute.jsx
Auth and backend
Session state and Supabase integration.
- Auth context · Centralizes Supabase session state and auth actions.
src/contexts/AuthContext.jsx - Supabase client · Single integration point for auth and database access.
src/lib/supabaseClient.js - Schema · Defines tables, constraints, and access rules.
schema.sql - Migrations · Evolution of RLS and task fields such as priority and progress.
supabase/migrations
Task workspace
Dashboard task management and local task transforms.
- Task list · Renders the dashboard task collection.
src/components/tasks/TaskList.jsx - Task card · Displays a single task and its state.
src/components/tasks/TaskCard.jsx - Task modal · Create and edit task details in a modal flow.
src/components/tasks/TaskModal.jsx - Task controls · Quick add, add form, filters, and sorting controls.
src/components/tasks/AddTask.jsx - Subtasks · Handles subtask lists and completion structure.
src/components/tasks/SubTaskList.jsx - Task utils · Computes task-derived state and presentation values.
src/utils/taskUtils.js - Filter utils · Implements filtering and sorting helpers.
src/utils/filterUtils.js - Dummy tasks · Local fallback or demo task dataset.
src/data/dummyTasks.js
Shared UI
Reusable layout, design system, and cross-cutting client services.
- Layout · Shared page framing and navigation wrapper.
src/components/layout/Layout.jsx - Navbar · Primary navigation for public and authenticated views.
src/components/layout/Navbar.jsx - UI library · Reusable buttons, inputs, cards, modals, feedback, and empty states.
src/components/ui/index.js - Toast provider · App-wide toast state and delivery channel.
src/components/ui/toast/ToastProvider.jsx - Theme context · Manages light/dark theme state and persistence.
src/contexts/ThemeContext.jsx - Keyboard shortcuts · Global shortcuts for quick actions and navigation.
src/hooks/useKeyboardShortcuts.js
Connections 25
- Main entry → App shell: boots · Entry point mounts the app shell.
- App shell → Landing page: routes to · Public landing route.
- App shell → Login: routes to · Login route.
- App shell → Signup: routes to · Signup route.
- App shell → Dashboard: routes to · Dashboard route.
- App shell → Docs: routes to · Documentation route.
- Dashboard → Protected route: guards · Dashboard access passes through the protected boundary.
- Protected route → Auth context: reads session · Protected access depends on auth state.
- Auth context → Supabase client: uses · Auth context delegates to Supabase client.
- Supabase client → Schema: persists to · Client operates against the defined backend schema.
- Supabase client → Migrations: applies · Migration history shapes backend behavior.
- Dashboard → Task list: renders · Dashboard centers the task collection view.
- Task list → Task card: lists · Task list is composed of task cards.
- Task list → Task modal: edits via · Create and update flow opens the task modal.
- Task list → Task controls: controls · List is driven by add, filter, and sort controls.
- Task card → Subtasks: contains · Task cards can surface nested subtasks.
- Task list → Task utils: derives from · Display state is computed from task utilities.
- Task list → Filter utils: filters with · Filtering and sorting logic is externalized.
- Task list → Dummy tasks: falls back to · Sample data supports local/demo task views.
- App shell → Layout: uses · Routes share a common layout shell.
- Layout → Navbar: includes · Layout frames navigation.
- App shell → UI library: builds from · App screens use shared UI primitives.
- App shell → Toast provider: notifies via · Global toast channel is available across the app.
- App shell → Theme context: themes with · Theme state affects the whole app.
- App shell → Keyboard shortcuts: enhanced by · Keyboard shortcuts extend app-wide interaction.