A stunning, production-ready Progressive Web App for tracking habits with advanced animations, offline capabilities, and comprehensive analytics. Built with modern web technologies and designed for excellence.
๐ Live Demo โข ๐ Features โข ๐ ๏ธ Installation โข ๐จ Animations โข ๐ฑ PWA Features
|
|
HabitFlow features a comprehensive animation system with 15+ custom animations:
fadeIn
- Smooth entrance animationsslideUp/Down/Left/Right
- Directional slide effectsbounce-gentle
- Subtle bounce animationswiggle
- Playful wiggle effectsfloat
- Floating elements backgroundglow
- Pulsing glow effectsshimmer
- Shimmer loading statesripple
- Button click ripplesheartbeat
- Pulsing heart animationsconfetti
- Celebration effectsstreak-fire
- Streak flame animations
- Ripple Buttons - Material Design inspired click effects
- Confetti Celebrations - Habit completion rewards
- Hover Transformations - Scale and glow effects
- Loading Animations - Multi-layered spinners
- Progress Bars - Animated completion indicators
- IndexedDB Storage - Robust local database
- Service Worker - Background caching
- Offline Analytics - Works without connection
- Data Synchronization - Seamless online/offline
- Add to Home Screen - Native app experience
- Standalone Mode - Full-screen operation
- App Icons - Custom 192x192 & 512x512 icons
- Splash Screen - Branded loading experience
- Browser Notifications - Habit reminders
- Permission Management - User-controlled
- Scheduled Alerts - Time-based reminders
- Instant Feedback - Completion notifications
Node.js 18+ and npm/yarn
# Clone the repository
git clone https://github.com/AyushSingh360/habitflow.git
# Navigate to project directory
cd habitflow
# Install dependencies
npm install
# Start development server
npm run dev
๐ That's it! HabitFlow will be running at http://localhost:5173
Command | Description |
---|---|
npm run dev |
๐ Start development server with hot reload |
npm run build |
๐ฆ Build optimized production bundle |
npm run preview |
๐ Preview production build locally |
npm run lint |
๐ Run ESLint for code quality |
habitflow/
โโโ ๐ public/
โ โโโ manifest.json # PWA manifest
โ โโโ habit-icon-*.png # App icons
โโโ ๐ src/
โ โโโ ๐ components/
โ โ โโโ AnimatedBackground.tsx # Floating animations
โ โ โโโ ConfettiEffect.tsx # Celebration effects
โ โ โโโ RippleButton.tsx # Interactive buttons
โ โ โโโ HabitCard.tsx # Habit display cards
โ โ โโโ HabitForm.tsx # Habit creation form
โ โ โโโ HabitsView.tsx # Main habits interface
โ โ โโโ AnalyticsView.tsx # Charts & statistics
โ โ โโโ SettingsView.tsx # App configuration
โ โ โโโ Header.tsx # Navigation header
โ โโโ ๐ hooks/
โ โ โโโ useHabits.ts # Habit management logic
โ โ โโโ useDarkMode.ts # Theme switching
โ โโโ ๐ utils/
โ โ โโโ database.ts # IndexedDB operations
โ โ โโโ habitStats.ts # Statistics calculations
โ โ โโโ notifications.ts # Push notifications
โ โโโ ๐ types/
โ โ โโโ habit.ts # TypeScript definitions
โ โโโ App.tsx # Main application
โโโ ๐ vite.config.ts # Vite & PWA configuration
โโโ ๐ tailwind.config.js # Tailwind & animations
โโโ ๐ package.json # Dependencies & scripts
- Frontend: React 18 + TypeScript
- Styling: Tailwind CSS + Custom Animations
- Database: IndexedDB (via idb library)
- Charts: Chart.js + React-ChartJS-2
- PWA: Vite-Plugin-PWA + Workbox
- Icons: Lucide React
- Build Tool: Vite
- Date Handling: date-fns
// tailwind.config.js
extend: {
animation: {
'your-animation': 'yourKeyframes 1s ease-in-out infinite',
},
keyframes: {
yourKeyframes: {
'0%': { transform: 'scale(1)' },
'50%': { transform: 'scale(1.1)' },
'100%': { transform: 'scale(1)' },
},
},
}
// src/components/HabitForm.tsx
const CATEGORIES = [
'Your Custom Category',
'Health & Fitness',
// ... existing categories
];
// src/components/HabitForm.tsx
const COLORS = [
'#YourColor',
'#EF4444', // Red
// ... existing colors
];
- Daily Completion Rates - Track daily progress
- Weekly Charts - Bar charts for weekly view
- Monthly Trends - Line charts for long-term trends
- Streak Analytics - Current vs. longest streaks
- Category Performance - Habits by category
- Streak Milestones - Celebrate consistency
- Completion Badges - Perfect day rewards
- Progress Celebrations - Confetti animations
- Motivational Quotes - Daily inspiration
- IndexedDB - All data stored locally
- No Cloud Sync - Complete privacy
- Export/Import - Data portability
- Offline First - Works without internet
- Client-Side Only - No server dependencies
- No Tracking - No analytics or tracking
- Open Source - Transparent codebase
- Self-Hosted - Deploy anywhere
npm run build
# Build the project
npm run build
# Deploy dist folder to Netlify
# Or connect your GitHub repo for auto-deployment
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]
We welcome contributions! Here's how you can help:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch (
git checkout -b feature/amazing-feature
) - ๐พ Commit your changes (
git commit -m 'Add amazing feature'
) - ๐ค Push to the branch (
git push origin feature/amazing-feature
) - ๐ Open a Pull Request
- Use GitHub Issues for bug reports
- Include steps to reproduce
- Provide browser/device information
- Describe the feature in detail
- Explain the use case
- Consider implementation complexity
This project is licensed under the MIT License - see the LICENSE file for details.
- React Team - For the amazing React framework
- Tailwind CSS - For the utility-first CSS framework
- Lucide - For the beautiful icon set
- Chart.js - For the powerful charting library
- Workbox - For PWA capabilities
- Pexels - For high-quality stock images
- ๐ง Email: ayushsingh21109@gmail.com
- ๐ฌ Issues: GitHub Issues
- ๐ฆ Twitter:
- ๐ฌ Discord:
- Habit Templates - Pre-built habit suggestions
- Social Features - Share progress with friends
- Advanced Analytics - ML-powered insights
- Habit Chains - Link related habits
- Custom Themes - User-created color schemes
- Voice Commands - Hands-free habit logging
- Wearable Integration - Smartwatch support
- Cloud Sync - Optional cloud backup
- Team Habits - Collaborative habit tracking
- API Integration - Connect with fitness apps
- Advanced Notifications - Smart reminder system