A comprehensive Progressive Web Application (PWA) designed to help users build consistent practice habits and track their progress across various skills and activities. Practice Perfect combines goal setting, session tracking, progress analysis, and motivational features to support your journey toward mastery.
- Flexible Goal Creation: Set up practice goals with custom names, descriptions, and target counts
- Multiple Cadences: Choose from hourly, daily, or weekly practice schedules
- Smart Due Dates: Optional due dates with automatic status tracking
- External Links: Add relevant resources or references to your goals
- Goal Status Tracking: Visual indicators for "In Progress", "Completed", "Past Due", and "Not Started" states
- Session Timer: Built-in timer for tracking practice duration
- Session Completion: Log completed sessions with duration, mood, notes, and location
- Progress Visualization: Real-time progress bars and completion percentages
- Session History: Comprehensive view of all practice sessions with filtering options
- Progress Analysis: Detailed charts and statistics for each goal
- Performance Trends: Track improvement over time with visual graphs
- Session Insights: Analyze practice patterns, duration trends, and mood correlations
- Goal Comparison: Compare progress across multiple goals
- Mobile-First Design: Fully responsive interface optimized for mobile devices
- Drag & Drop Reordering: Custom sort goals by dragging them into your preferred order
- Multiple Sort Options: View goals by newest first, oldest first, or custom order
- PWA Support: Install as a native app on mobile devices with offline capabilities
- Real-time Updates: Instant synchronization across devices
- AI-Powered Encouragement: Personalized motivational messages using OpenAI
- Celebration Effects: Confetti animations for completed goals and milestones
- Progress Celebrations: Visual feedback for achievements and progress milestones
- Helpful Hints: Contextual guidance for new users
- Secure Authentication: Email/password authentication via Supabase
- Profile Management: Update personal information and preferences
- Password Management: Change passwords and reset forgotten passwords
- Account Deletion: Option to permanently delete account and data
- React 19 with TypeScript for type-safe development
- React Router for client-side routing
- Tailwind CSS for utility-first styling
- Recharts for data visualization and analytics
- Supabase for authentication, database, and real-time features
- OpenAI API for AI-generated motivational messages
- PostgreSQL database with Row Level Security (RLS)
- Vite for fast development and optimized builds
- PWA Support with Workbox for offline functionality
- TypeScript for enhanced development experience
- ESLint for code quality and consistency
- date-fns for date manipulation and formatting
- canvas-confetti for celebration animations
- workbox-window for service worker management
- Node.js (v16 or higher)
- npm or yarn package manager
- Supabase account and project
- OpenAI API key
-
Clone the repository
git clone https://github.com/dlarmitage/practiceperfect.git cd practiceperfect -
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Fill in your environment variables:
VITE_SUPABASE_URL=your_supabase_project_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key VITE_OPENAI_API_KEY=your_openai_api_key
-
Set up the database
- Create a new Supabase project
- Run the SQL commands from
src/db/schema.sqlin your Supabase SQL editor - Set up Row Level Security policies as defined in the schema
-
Start the development server
npm run dev
-
Open your browser Navigate to
http://localhost:5173
CREATE TABLE goals (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID NOT NULL REFERENCES auth.users(id) ON DELETE CASCADE,
name TEXT NOT NULL,
description TEXT,
count INTEGER DEFAULT 0,
target_count INTEGER DEFAULT 1,
practice_cadence TEXT NOT NULL CHECK (practice_cadence IN ('hourly', 'daily', 'weekly')),
start_date TIMESTAMP WITH TIME ZONE NOT NULL,
due_date TIMESTAMP WITH TIME ZONE,
external_link TEXT,
is_active BOOLEAN DEFAULT true,
sort_order INTEGER DEFAULT 0,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);CREATE TABLE sessions (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID NOT NULL REFERENCES auth.users(id) ON DELETE CASCADE,
goal_id UUID NOT NULL REFERENCES goals(id) ON DELETE CASCADE,
session_date TIMESTAMP WITH TIME ZONE DEFAULT now(),
duration INTEGER,
mood TEXT,
notes TEXT,
location TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);src/
βββ components/ # Reusable UI components
β βββ GoalButton.tsx # Individual goal display and interaction
β βββ GoalForm.tsx # Goal creation and editing
β βββ SessionTimer.tsx # Practice session timer
β βββ Analysis.tsx # Progress analytics and charts
β βββ ... # Other UI components
βββ pages/ # Main application pages
β βββ Home.tsx # Dashboard with goals overview
β βββ Sessions.tsx # Session history and management
β βββ Analysis.tsx # Detailed progress analysis
β βββ ... # Other pages
βββ context/ # React context providers
β βββ AuthContext.tsx # Authentication state management
β βββ GoalContext.tsx # Goals data management
β βββ SessionContext.tsx # Sessions data management
βββ services/ # API and external service integrations
β βββ supabase.ts # Supabase client and queries
β βββ openai.ts # OpenAI API integration
βββ utils/ # Utility functions and helpers
βββ types/ # TypeScript type definitions
βββ db/ # Database schema and migrations
Practice Perfect is a full-featured Progressive Web Application with:
- Offline Support: Continue using the app without internet connection
- App Installation: Install on mobile devices like a native app
- Push Notifications: Get reminders for practice sessions (coming soon)
- Background Sync: Sync data when connection is restored
- Responsive Design: Optimized for all screen sizes
- Touch-friendly interface optimized for mobile devices
- Responsive layout that adapts to different screen sizes
- Smooth animations and transitions
- Keyboard navigation support
- Screen reader compatibility
- High contrast mode support
- Focus management for better usability
- Loading states and progress indicators
- Success and error notifications
- Hover and active states for interactive elements
- Celebration animations for achievements
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- TypeScript for type safety
- ESLint for code linting
- Prettier for code formatting
- Consistent naming conventions
npm run buildThe built files will be in the dist directory, ready for deployment to:
- Vercel
- Netlify
- Firebase Hosting
- Any static hosting service
Make sure to set the following environment variables in your production environment:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEYVITE_OPENAI_API_KEY
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Supabase for the excellent backend-as-a-service platform
- OpenAI for AI-powered motivational features
- Tailwind CSS for the utility-first CSS framework
- React team for the amazing frontend framework
- Vite for the fast build tool and development experience
For support, please open an issue in the GitHub repository or contact the development team.
Practice Perfect - Building better habits, one session at a time. π―