A comprehensive personal productivity and study manager built with Spring Boot, featuring tasks, projects, notes, resources, real-time focus rooms, friend connections, messaging, and insightful statistics powered by a persistent, editable focus timer.
- 🔐 Authentication - Secure email/password login with BCrypt encryption
- 📋 Task Management - Create, organize, and track tasks with priorities and due dates
- Smart sorting: unfinished by creation time, finished by completion time
- Project association and progress tracking
- 📁 Project Organization - Manage multiple projects with deadlines and status tracking
- 📝 Rich Notes System - Create notes with categories, tags, and multiple formats
- Support for TEXT, CHECKLIST, CODE, DRAWING, AUDIO, and IMAGE notes
- Color coding and pinning functionality
- 📚 Resource Library - Upload and organize files, links, and documents
- 👥 Social Features - Connect with friends, send friend requests, and direct messaging
- 🏠 Focus Rooms - Real-time collaborative focus sessions with WebSocket support
- ⏱️ Smart Focus Timer - Persistent timer with customizable duration
- Double-click to edit time, persists across navigation
- Automatic time tracking and statistics
- 📊 Productivity Analytics - Comprehensive statistics and insights
- Focus time tracking, task completion rates, productivity percentages
- Daily streaks and weekly summaries
- Backend: Java 17, Spring Boot 3.5
- Security: Spring Security with BCrypt
- Database: MySQL 8+ with Spring Data JPA
- Frontend: Thymeleaf templates with Bootstrap 5
- Real-time: WebSocket (STOMP) with SockJS
- Build Tool: Maven
- Java 17+ (Download here)
- MySQL 8.0+ (Download here)
- Git (Download here)
-
Clone the repository
git clone https://github.com/YOUR_USERNAME/focusflow.git cd focusflow -
Set up the database
# Create database mysql -u root -p CREATE DATABASE focusflow; # Import schema mysql -u root -p focusflow < focusflow_schema.sql
-
Configure the application
# Copy and edit configuration cp src/main/resources/application.properties.example src/main/resources/application.propertiesUpdate
src/main/resources/application.properties:spring.datasource.url=jdbc:mysql://localhost:3306/focusflow spring.datasource.username=your_mysql_username spring.datasource.password=your_mysql_password
-
Run the application
# Using Maven wrapper ./mvnw spring-boot:run # Or build and run JAR ./mvnw clean package java -jar target/focusflow-0.0.1-SNAPSHOT.jar
-
Access the application
- Open your browser and go to
http://localhost:8080 - Register a new account or login
- Open your browser and go to
# Using Docker Compose (if available)
docker-compose up -d mysql
./mvnw spring-boot:run- Authentication:
/register,/login,/logout - Main App:
/dashboard,/tasks,/projects,/notes,/resources,/focus-room,/stats,/friends,/messages - API:
POST /api/stats/focuswith{ "elapsedSeconds": number }(CSRF ignored)
The application uses the provided focusflow_schema.sql file to create all necessary tables and relationships. Key entities include:
- Users with authentication and profile management
- Tasks & Projects for productivity tracking
- Notes & Categories for rich content management
- Resources for file and link organization
- Focus Rooms & Sessions for collaborative work
- Messages & Friends for social features
- Statistics for analytics and insights
- Development:
spring.jpa.hibernate.ddl-auto=update(auto-creates tables) - Production:
spring.jpa.hibernate.ddl-auto=validate(validates existing schema) - File Uploads: Configurable max file size (default: 50MB)
- Security: BCrypt password encryption with Spring Security
src/main/java/com/focusflow/
├── config/ # Security, WebSocket, File Upload configuration
├── controller/ # REST endpoints and web controllers
├── model/ # JPA entities and data models
├── repository/ # Data access layer
└── service/ # Business logic layer
src/main/resources/
├── templates/ # Thymeleaf HTML templates
├── static/ # CSS, JS, images
└── application.properties.example # Configuration template
# Development
./mvnw spring-boot:run
# Production build
./mvnw clean package
java -jar target/focusflow-0.0.1-SNAPSHOT.jar
# Run tests
./mvnw test- Timer Persistence: Uses localStorage + absolute timestamps
- Statistics: Focus time floored to minutes, task completion tracking
- Real-time Features: WebSocket for focus room collaboration
- File Management: Secure upload handling with type validation
- Social Features: Friend requests, messaging, and user discovery
- 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
- Java 17+
- MySQL 8.0+
- Maven 3.6+ (or use included Maven wrapper)
- Database Connection: Ensure MySQL is running and credentials are correct
- Port Conflicts: Change
server.portin application.properties if 8080 is in use - File Uploads: Check
uploads/directory permissions - WebSocket Issues: Ensure no proxy is blocking WebSocket connections
- Check the Issues page
- Review the application logs for detailed error messages
- Ensure all prerequisites are properly installed
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Spring Boot and Spring Security
- UI components from Bootstrap 5
- Real-time features powered by WebSocket and SockJS