A modern productivity application that combines Pomodoro timer functionality with intelligent distraction blocking and comprehensive analytics.
- Pomodoro Timer: Customizable work and break intervals (25/5/15 minutes default)
- Distraction Blocker: Block websites and applications during focus sessions
- Session Analytics: Track productivity patterns, focus time, and interruptions
- User Authentication: Secure email/password authentication with JWT
- Dark/Light Mode: Beautiful responsive UI with theme switching
- Real-time Updates: Live timer updates and session tracking
- NestJS: Node.js framework for building scalable server-side applications
- PostgreSQL: Robust relational database for data persistence
- TypeORM: Object-relational mapping for database operations
- JWT: JSON Web Tokens for secure authentication
- Swagger: API documentation and testing interface
- Next.js 14: React framework with App Router
- Tailwind CSS: Utility-first CSS framework for styling
- shadcn/ui: High-quality, accessible UI components
- Radix UI: Unstyled, accessible UI primitives
- Lucide React: Beautiful, customizable icons
- next-themes: Dark/light mode support
- Node.js 18+
- PostgreSQL 12+
- npm or yarn
-
Install dependencies
# Install backend dependencies cd backend npm install # Install frontend dependencies cd ../frontend npm install
-
Set up the database
# Create PostgreSQL database createdb focusflow # The application will automatically create tables on first run
-
Start the applications
Option 1: Start both applications simultaneously
# From the root directory npm install npm run devOption 2: Start applications separately
# Terminal 1 - Backend cd backend npm run start:dev # Terminal 2 - Frontend cd frontend npm run dev
- Sign Up/Sign In: Create an account or sign in with existing credentials
- Set Timer: Choose between work sessions (25 min) or breaks (5/15 min)
- Start Focus Session: Click start to begin your Pomodoro session
- Block Distractions: Configure websites/apps to block during work sessions
- Track Progress: View analytics and session history in the dashboard
FocusFlow/
├── backend/ # NestJS backend application
│ ├── src/
│ │ ├── auth/ # Authentication module
│ │ ├── user/ # User management
│ │ ├── timer/ # Timer functionality
│ │ ├── session/ # Session tracking
│ │ ├── blocklist/ # Distraction blocking
│ │ ├── analytics/ # Analytics and reporting
│ │ └── notification/ # Notifications
│ └── package.json
├── frontend/ # Next.js frontend application
│ ├── app/ # App Router pages
│ ├── components/ # Reusable UI components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions
│ └── package.json
├── env.example # Environment variables template
└── README.md
cd backend
npm run start:dev # Start in development mode
npm run test # Run unit tests
npm run build # Build for productioncd frontend
npm run dev # Start development server
npm run build # Build for production
npm run lint # Run ESLint- Customizable Pomodoro intervals
- Work/break session management
- Session state persistence
- Website/application blocking during active sessions
- User-configurable blocklists
- Automatic activation during work sessions
- Automatic session tracking
- Interruption and completion logging
- Manual session abort with reasons
- Daily/weekly Pomodoro statistics
- Focus time tracking
- Productivity trend analysis
- Session completion rates
- JWT-based authentication
- Secure password hashing with bcrypt
- Protected API endpoints
- User session management
- Responsive Design: Works seamlessly on desktop and mobile
- Dark/Light Mode: Automatic theme detection with manual override
- Glassmorphism Effects: Modern, translucent UI elements
- Smooth Animations: Engaging transitions and micro-interactions
- Accessibility: WCAG compliant components from Radix UI
- Real-time distraction blocking implementation
- Advanced analytics with charts and graphs
- Team collaboration features
- Mobile application
- Browser extension for distraction blocking
- Integration with calendar applications
- Customizable notification sounds
- Export/import session data
- 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.
- NestJS for the robust backend framework
- Next.js for the powerful React framework
- shadcn/ui for the beautiful UI components
- Tailwind CSS for the utility-first styling
- Radix UI for accessible UI primitives