A modern, full-stack web application for task management, productivity tracking, and social collaboration. Built with React, Vite, and Supabase.
π Live Site: https://productivi-tea.netlify.app/
- Task Management: Create, track, and organize tasks with due dates and priorities
- Dashboard: Centralized hub with task overview, focus tracking, and activity summary
- Deadline Reminders: Automatic notifications for tasks due within 24 hours, with persistent state
- Activity Panel: Real-time tracking of task sessions and productivity metrics
- Inbox: Unified notification center for task reminders, nudges, and friend requests
- Friend System: Connect with other users, send/receive friend requests with toggle functionality
- Friend Sidebar: Browse friend activity, view friend profiles and sessions
- Activity Tracking: Share work sessions and see friend activity in real-time
- Settings Management: Customize notification preferences with persistent localStorage + Supabase synchronization
- Session Tracking: Monitor productivity sessions and time spent on tasks
- Status Indicator: Set online status (working, on break, idle, offline)
- Framework: React 19.2.0 with React Router 7.13.1
- Build Tool: Vite with rolldown-vite 7.2.5
- Styling: MUI 7.3.8, Emotion CSS-in-JS
- UI Components: FontAwesome icons, Lucide React icons
- Data Visualization: Recharts 3.8.1
- Linting: ESLint 9.39.1
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Real-time: Supabase Realtime subscriptions
- Bundle Optimization: Manual Vite chunk splitting (react-vendor, charts-vendor, supabase-vendor, ui-vendor)
- Code Splitting: Lazy-loaded Dashboard component
- Caching: Optimized vendor chunks for browser cache reuse
- Node.js 18+ and npm 9+
- Supabase account with configured PostgreSQL database
- Clone the repository:
git clone <repository-url>
cd react-appp- Install dependencies:
npm install- Configure environment variables:
Create a
.env.localfile with:
VITE_SUPABASE_URL=<your-supabase-url>
VITE_SUPABASE_ANON_KEY=<your-supabase-anon-key>
- Start development server:
npm run devThe app will be available at http://localhost:5173
| Command | Description |
|---|---|
npm run dev |
Start development server with HMR |
npm run build |
Build optimized production bundle |
npm run lint |
Run ESLint to check code quality (0 errors/warnings) |
npm run test |
Run lint as deployment gate |
npm run preview |
Preview production build locally |
- HMR (Hot Module Replacement) enabled for instant feedback
- Strict ESLint rules configured for code quality
- All linting checks pass with zero errors/warnings
- Async-wrapped effect calls to prevent setState-in-effect issues
src/
βββ pages/ # Route-level components
β βββ dashboard.jsx # Main app hub (task mgmt, reminders, nudges)
β βββ inbox.jsx # Unified notification center
β βββ settings.jsx # User preferences & profile
β βββ FriendSidebar.jsx # Friend discovery & management
β βββ overview.jsx # Stats, focus tracking, time breakdown
β βββ activitypanel.jsx # Session and activity tracking
β βββ log-in.jsx # Authentication
β βββ signup.jsx # Account creation
β βββ ... # Additional pages
βββ hooks/
β βββ useAppData.js # Shared data fetching hook
βββ lib/
β βββ supabase.js # Supabase client configuration
βββ App.jsx # Main app component
βββ main.jsx # React entry point
βββ assets/ # Images, fonts, static files
- localStorage + Supabase: Notification preferences persist locally for instant feedback, synced to Supabase
- React Context + Props: Simple, predictable state flow through component hierarchy
- useAppData Hook: Centralized async data fetching with schema-safe fallbacks
- Query Fallbacks: Graceful degradation when schema columns missing (e.g., due_time field)
- Periodic Polling: 60-second refresh intervals for inbox notifications
- Dual-layer Persistence: localStorage immediate sync + Supabase best-effort background sync
- CSS Pseudo-elements: Unread notification indicators using ::before accent stripes
- Modal Dialogs: Deadline reminders as non-blocking popups with "Mark as Read" and "Open Inbox" actions
- Friend Toggle: Same button for request/unrequest with intelligent state detection
- Vendor Chunk Splitting: 5 isolated vendor chunks reduce entry bundle to ~24 kB, dashboard to ~112 kB
- Lazy Loading: Dashboard component loaded on demand
- Route-based Code Splitting: Separate bundles for auth pages vs. app pages
This application has been thoroughly audited and optimized for production:
- β All ESLint checks pass (0 errors, 0 warnings)
- β Production build validated and optimized
- β Notification system fully functional (persistent, scheduled, modal alerts)
- β Friend system toggleable and reliable
- β Bundle performance optimized with vendor chunk splitting
- β Database queries include schema-safe fallbacks
- β All runtime functions defined and tested
- β localStorage + Supabase persistence working
- Configure production Supabase environment variables
- Run
npm run testto verify lint gate passes - Run
npm run buildto generate optimized bundle - Deploy build output to hosting platform (Vercel, Netlify, etc.)
- Verify deadline reminders pop up within 24 hours of task due date
- Test friend request toggle functionality
- Confirm notification preference persistence across page reloads
- Check that task
due_timeis set and within 24 hours - Verify localStorage key:
${username}_taskReminderRead - Confirm inbox refresh is running (60-second intervals)
- Ensure localStorage is enabled in browser
- Verify Supabase
notification_settingstable exists - Check username-prefixed localStorage keys are readable
- Confirm friendships table relationships (user_id β friend_id directionality)
- Friend unrequest uses same button as request (checks existing friendship status)
- Outgoing friend requests can be canceled by pressing request button again
Key tables referenced by this application:
tasks: Task definitions with due datessessions: Work session trackingfriendships: User relationships (with status: pending, accepted)notification_settings: User notification preferencestask_reminders: Deadline reminder tracking
When making changes:
- Run
npm run lintbefore committing to ensure code quality - Test all notification features work as expected
- Verify friend system toggles correctly
- Check localStorage persistence for settings
[Add license information here]
For issues or questions, please contact the development team or create an issue in the repository.