Plan Smarter, Vacation Better
PTOBuddy is an intelligent holiday planning application that optimizes your vacation days using AI-powered algorithms. It analyzes your corporate holiday calendar and personal preferences to suggest the most efficient leave combinations, helping you maximize your time off.
- Smart AI Planning: Get up to 40% more vacation days with optimized leave planning
- Corporate Calendar Integration: Upload and sync with your company's holiday calendar
- Long Weekend Optimization: Automatically detect opportunities for extended weekends
- Multiple Plan Generation: Create different plans based on various constraints
- Excel Template Support: Easy data import/export functionality
- NOT IN MVP : Leave Balance Tracking: Monitor vacation and sick leave usage
- Java 17 with Spring Boot 3.x
- Spring Security 6 for authentication
- Spring Data JPA with Hibernate
- PostgreSQL database
- Maven for dependency management
- React 18 with TypeScript
- Tailwind CSS for styling
- React Router for navigation
- Axios for API communication
erDiagram
COMPANY {
bigint id PK
varchar companyName
int annualLeaveEntitlement
int sickLeaveEntitlement
timestamp createdAt
}
USER {
bigint id PK
varchar firstName
varchar lastName
varchar email UK
varchar phoneNumber
varchar passwordHash
int currentYearUsedVacation
int currentYearUsedSick
timestamp createdAt
timestamp modifiedAt
bigint company_id FK
}
PTO_PLAN {
bigint id PK
varchar planName
int maxConsecutiveDays
date planningStartDate
date planningEndDate
varchar preferredMonths
timestamp createdAt
timestamp modifiedAt
bigint user_id FK
}
PLANNED_LEAVE {
bigint id PK
date startDate
date endDate
int dayCount
enum leaveType "SICK, VACATION"
enum leaveStatus "SUGGESTED, CONFIRMED, REJECTED"
varchar reason
timestamp createdAt
timestamp modifiedAt
bigint pto_plan_id FK
}
CORPORATE_HOLIDAY {
bigint id PK
date holidayDate
varchar holidayName
varchar description
boolean isOptional
bigint company_id FK
}
COMPANY ||--o{ USER : "employs"
COMPANY ||--o{ CORPORATE_HOLIDAY : "has"
USER ||--o{ PTO_PLAN : "creates"
PTO_PLAN ||--o{ PLANNED_LEAVE : "contains"
- Company has many Users and Corporate Holidays
- User can create multiple PTO Plans
- Each PTO Plan contains multiple Planned Leaves
βββββββββββββββββββ
β Login Form β
β β
β β’ Email β
β β’ Password β
β β’ Remember Me β
β β’ Social Login β
βββββββββββββββββββ
Users can download an Excel template and fill in details like:
Holiday Details:
- Date
- Description
- Optional (Yes/No)
Leave Configuration:
- Number of optional holidays available (e.g., "Out of 4, you can take any 2")
- Available Annual Leaves:
- Sick Leave Count
- Vacation Leave Count (Earned + Casual)
- Remaining Leaves:
- Sick Leave Remaining
- Vacation Leave Remaining
Excel file upload functionality
Form Required Fields (PLANNED):
- Corporate Holiday Calendar (from downloaded template)
- Start Date for Holiday Planning
- End Date for Holiday Planning
- βοΈ Checkbox: "Default to current year end"
- Max Consecutive Days for long weekend optimization
- βοΈ Checkbox: "Include vacation leaves only"
| Date | Holiday Name | Description | Optional |
|------------|----------------|-----------------------|----------|
| 2024-01-26 | Republic Day | National Holiday | No |
| 2024-03-08 | Holi | Festival of Colors | No |
| 2024-03-29 | Good Friday | Christian Holiday | Yes |
| 2024-08-15 | Independence | National Holiday | No |
| 2024-08-27 | Independence | Ganesh Chaturthi | Yes |
Optional Holidays That can be Taken: 1 (Out of 2 available, you can take any 1)
Leave Balances:
- Annual Sick Leave: 12 days
- Annual Vacation Leave: 20 days (15 Earned + 5 Casual)
- Used Sick Leave: 3 days
- Used Vacation Leave: 8 days
- Remaining Sick Leave: 9 days
- Remaining Vacation Leave: 12 days
ptobuddy/
βββ backend/
β βββ src/main/java/com/ptobuddy/
β β βββ config/ # Security & DB config
β β βββ controller/ # REST endpoints
β β βββ service/ # Business logic
β β βββ repository/ # Data access layer
β β βββ model/ # JPA entities
β β βββ dto/ # Data transfer objects
β β βββ util/ # Helper utilities
β βββ src/main/resources/
β β βββ application.yml
β β βββ db/migration/ # Database scripts
β βββ pom.xml
βββ frontend/
β βββ src/
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ services/ # API calls
β β βββ utils/ # Helper functions
β β βββ styles/ # CSS files
β βββ public/
β βββ package.json
βββ README.md
POST /api/auth/login- User loginPOST /api/auth/register- User registrationPOST /api/auth/logout- User logout
GET /api/users/profile- Get user profilePUT /api/users/profile- Update user profileGET /api/users/leave-balance- Get leave balance
POST /api/plans- Create new PTO planGET /api/plans- Get user's PTO plansGET /api/plans/{id}- Get specific plan detailsPUT /api/plans/{id}- Update planDELETE /api/plans/{id}- Delete plan
GET /api/templates/download- Download Excel templatePOST /api/holidays/upload- Upload corporate calendarPOST /api/plans/{id}/export- Export plan to Excel/PDF
GET /api/holidays- Get company holidaysPOST /api/holidays- Add new holiday (admin)PUT /api/holidays/{id}- Update holiday (admin)
The smart planning algorithm considers:
- Corporate holidays and long weekends
- User's remaining leave balance
- Maximum consecutive days constraint
- Preferred months selection
- Weekend bridging opportunities
- Team coordination (future feature)
- Database design
- Entity relationships
- Basic authentication
- Excel upload/download
- Basic optimization algorithm
- Simple UI
- Advanced optimization (Leave Balance from last year in consideration)
- PDF export functionality
- Email notifications
- Team coordination features
- Google Calendar sync
- Chrome extension
- Advanced analytics
- Thanks to all corporate employees struggling with leave planning
- Inspired by the need for smarter work-life balance
- Built with β€οΈ for the Indian IT community
PTOBuddy - Because your vacation deserves better planning! ποΈ