TimeFlow is a sophisticated Java-based desktop application designed for comprehensive timetable management in educational institutions. It provides an intuitive interface for managing courses, departments, users, and detecting scheduling conflicts automatically.
- Multi-user system with role-based access control
- Comprehensive timetable management with drag-and-drop scheduling
- Real-time conflict detection for scheduling overlaps
- Department and course management with hierarchical organization
- User authentication and authorization
- Email notifications for schedule changes and conflicts
- Detailed reporting capabilities
- PostgreSQL database with Hibernate ORM for data persistence
- Modern UI with FlatLaf theme for professional appearance
- Environment-based configuration using dotenv
- Comprehensive logging with SLF4J and Logback
- Password hashing with Spring Security Crypto
- Email integration for notifications
- Backend: Java 16, Hibernate ORM 7.1.0, PostgreSQL
- Frontend: Java Swing with FlatLaf modern theme
- Build Tool: Maven
- Database: PostgreSQL with connection pooling
- Security: Spring Security Crypto for password hashing
- Email: JavaMail API for notifications
TimeFlow/
βββ src/main/java/org/timeflow/
β βββ dao/ # Data Access Objects
β βββ entity/ # Hibernate entities
β βββ service/ # Business logic services
β βββ ui/ # Swing user interface
β βββ util/ # Utility classes
βββ src/main/resources/
β βββ hibernate.cfg.xml # Database configuration
β βββ logback.xml # Logging configuration
βββ pom.xml # Maven configuration
βββ .env.example # Environment variables template
- Java 16 or higher
- Maven 3.6+
- PostgreSQL 12+
- SMTP server access (for email notifications)
# Create PostgreSQL database
createdb timeflow_db
# Create user with permissions
createuser timeflow_user
psql -c "ALTER USER timeflow_user WITH PASSWORD 'admin';"
psql -c "GRANT ALL PRIVILEGES ON DATABASE timeflow_db TO timeflow_user;"Create .env file in project root:
# Email Configuration
[email protected]
EMAIL_PASSWORD=your-app-password
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
# Database (optional - overrides hibernate.cfg.xml)
DB_URL=jdbc:postgresql://localhost:5432/timeflow_db
DB_USERNAME=timeflow_user
DB_PASSWORD=admin# Clone repository
git clone <repository-url>
cd TimeFlow
# Build project
mvn clean compile
# Run application
mvn exec:java -Dexec.mainClass="org.timeflow.Main"User (1) ----< (N) Timetable
User (1) ----< (N) Notification
Department (1) ----< (N) Course
Course (1) ----< (N) Timetable
Semester (1) ----< (N) Course
- Fields: id, username, email, password, role, createdAt, updatedAt
- Roles: ADMIN, FACULTY, STUDENT
- Relationships: One-to-many with Timetable, Notification
- Fields: id, name, code, description, credits, department, semester
- Relationships: Many-to-one with Department, Semester
- Constraints: Unique course code per department
- Fields: id, user, course, dayOfWeek, startTime, endTime, location
- Validation: No overlapping schedules for same user
- Features: Automatic conflict detection
- Fields: id, name, code, description
- Relationships: One-to-many with Course
- Fields: id, name, startDate, endDate, academicYear
- Relationships: One-to-many with Course
Located in src/main/resources/hibernate.cfg.xml:
- Dialect: PostgreSQL10Dialect
- Connection Pool: 10 connections
- DDL: Auto-update schema
- SQL Logging: Enabled for development
- Framework: Logback with SLF4J
- Level: INFO for production, DEBUG for development
- Output: Console and file rotation
- Purpose: User authentication
- Features: Remember me, password recovery
- Security: Password hashing, session management
- Purpose: Central navigation hub
- Features: Quick actions, notifications, user profile
- Access Control: Role-based menu items
- Purpose: Visual timetable management
- Features:
- Drag-and-drop scheduling
- Color-coded courses
- Conflict highlighting
- Print/export functionality
- Purpose: Course CRUD operations
- Features:
- Batch import/export
- Department filtering
- Semester organization
- Prerequisite management
- Purpose: Resolve scheduling conflicts
- Features:
- Automatic detection
- Suggested resolutions
- Manual override options
- Email notifications
- Password Storage: BCrypt hashing with salt
- Session Management: Secure session tokens
- Role-based Access: Granular permissions
- Password Policies: Complexity requirements
- SQL Injection Prevention: Hibernate parameterized queries
- Input Validation: Comprehensive validation framework
- Audit Logging: All changes tracked with user attribution
- Connection Pooling: HikariCP integration
- Query Optimization: Indexed foreign keys
- Lazy Loading: Strategic fetch strategies
- Caching: Second-level cache for reference data
- Lazy Loading: Data loaded on demand
- Pagination: Large datasets paginated
- Background Processing: Long operations in worker threads
- Caching: UI state persistence
# Run unit tests
mvn test
# Run with coverage
mvn test jacoco:report# Run integration tests
mvn verify
# Database integration tests
mvn test -Dtest.profile=integration- User registration and authentication
- Course creation and management
- Timetable scheduling and conflicts
- Email notification delivery
- Report generation
- Database backup and restore
- Database Connectivity: Connection pool monitoring
- Email Service: SMTP connectivity checks
- Disk Space: Log file rotation monitoring
- Memory Usage: JVM heap monitoring
- Database: Daily PostgreSQL dumps
- Configuration: Version controlled .env files
- Logs: Centralized log aggregation
# Update dependencies
mvn versions:display-dependency-updates
# Security scan
mvn dependency-check:check
# Database maintenance
vacuumdb -d timeflow_db -f -v# Check PostgreSQL service
sudo systemctl status postgresql
# Verify database exists
psql -l | grep timeflow_db
# Test connection
psql -h localhost -U timeflow_user -d timeflow_db# Check SMTP configuration
telnet smtp.gmail.com 587
# Verify .env settings
cat .env | grep -E "EMAIL|SMTP"# Clean build
mvn clean
# Force update dependencies
mvn dependency:purge-local-repository
# Check Java version
java -version
mvn -version# Enable debug logging
mvn exec:java -Dexec.mainClass="org.timeflow.Main" -Dlogback.configurationFile=logback-debug.xml# Fork repository
git clone <your-fork-url>
git checkout -b feature/your-feature
# Development build
mvn clean compile exec:java -Dspring.profiles.active=dev
# Run tests
mvn test- Java Format: Google Java Format
- Checkstyle: Maven checkstyle plugin
- SonarQube: Static code analysis
- Create feature branch
- Write tests for new functionality
- Ensure all tests pass
- Update documentation
- Submit pull request with description
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email [email protected] or create an issue in the GitHub repository.