PUBLIC REPOSITORY /Java
TaskPay
📋 Ứng dụng quản lý công việc & theo dõi lương | Task manager + Salary tracker | Spring Boot 3 + PWA + H2 | Local-first, no login, no cloud
README
<div align="center">
<div align="center">
📋 TaskPay
Ứng dụng quản lý công việc & theo dõi lương — All-in-one Task Manager & Salary Tracker
Không đăng nhập · Không cloud · Không analytics — Dữ liệu hoàn toàn local
</div>
✨ Tính năng
📝 Quản lý công việc (Todo)
| Tính năng | Chi tiết |
|---|---|
| CRUD đầy đủ | Thêm, sửa, xóa, hoàn thành task |
| Tìm kiếm & lọc | Theo hôm nay, sắp tới, quá hạn, đã xong, ưu tiên, danh mục |
| Task fields | Tiêu đề, ghi chú, ngày hạn, giờ nhắc, lặp lại, ưu tiên, danh mục, màu sắc, âm nhắc |
| Calendar view | Xem task theo ngày trong tháng |
💰 Theo dõi lương (Salary Tracker)
| Tính năng | Chi tiết |
|---|---|
| Chấm công | Theo dõi theo tháng: giờ làm, tăng ca, thưởng, nghỉ có/không lương |
| Cài đặt lương | Tiền tệ, lương tháng, công ngày, giờ mặc định, hệ số tăng ca |
| Báo cáo | Tổng kết tháng, so sánh các tháng, copy summary nhanh |
⚙️ Hệ thống
| Tính năng | Chi tiết |
|---|---|
| Đa ngôn ngữ | Tiếng Việt / English |
| Giao diện | Light / Dark / System theme |
| PWA | Cài đặt như app native trên điện thoại / máy tính |
| Local-first | Dữ liệu lưu trong H2 file database, không cần internet |
| Notification | Nhắc nhở task qua browser notification |
🛠️ Tech Stack
Backend
- Java 21
- Spring Boot 3.3.5
- Spring Web (REST API)
- Spring Data JPA
- Bean Validation (JSR-380)
- H2 Database (file-based, local)
Frontend (bundled trong Spring Boot)
- Vanilla HTML5 / CSS3 / JavaScript
- Progressive Web App (PWA)
- Service Worker (offline support)
- Web App Manifest
📁 Cấu trúc dự án
taskpay/
├── build.gradle # Gradle build config
├── settings.gradle
├── gradlew / gradlew.bat # Gradle wrapper
├── src/
│ ├── main/
│ │ ├── java/com/taskpay/
│ │ │ ├── TaskPayApplication.java # Entry point
│ │ │ ├── api/ # API models / DTOs
│ │ │ ├── config/ # CORS, Web config
│ │ │ ├── controller/ # REST controllers
│ │ │ ├── domain/ # JPA entities
│ │ │ ├── repository/ # Spring Data repositories
│ │ │ └── service/ # Business logic
│ │ └── resources/
│ │ ├── application.yml # App configuration
│ │ └── static/ # Frontend PWA files
│ │ ├── index.html
│ │ ├── app.js
│ │ ├── styles.css
│ │ ├── manifest.webmanifest
│ │ └── service-worker.js
│ └── test/
│ └── java/com/taskpay/ # Unit & integration tests
├── data/ # H2 database files (gitignored)
└── README.md
📦 Yêu cầu môi trường
- JDK 21 trở lên — Download OpenJDK 21
- Gradle không bắt buộc — repo đã có Gradle Wrapper sẵn
Kiểm tra Java:
java -version🚀 Chạy local
1. Clone dự án
git clone https://github.com/ilcde/TaskPay.git
cd TaskPay2. Chạy ứng dụng
Windows:
gradlew.bat bootRunmacOS / Linux:
./gradlew bootRun3. Mở trình duyệt
| URL | Mô tả |
|---|---|
http://localhost:8080 | Giao diện chính |
http://localhost:8080/api/health | Health check |
http://localhost:8080/h2-console | H2 Database console |
🔧 Build
Windows:
gradlew.bat clean buildmacOS / Linux:
./gradlew clean buildOutput:
build/libs/taskpay-1.0.0.jarChạy từ JAR:
java -jar build/libs/taskpay-1.0.0.jarĐổi port:
java -jar build/libs/taskpay-1.0.0.jar --server.port=9090🗄️ Database
TaskPay dùng H2 file database — dữ liệu lưu cục bộ, không cần server database riêng.
Kết nối H2 Console tại
http://localhost:8080/h2-console:JDBC URL : jdbc:h2:file:./data/taskpay-db;DB_CLOSE_ON_EXIT=FALSE
User : sa
Password : (để trống)
Reset dữ liệu: Dừng app, xóa thư mục
data/, chạy lại — app sẽ tự seed lại dữ liệu mặc định.📡 API Reference
Base URL:
http://localhost:8080Health
GET /api/health
Tasks
GET /api/tasks
GET /api/tasks?filter=today|upcoming|overdue|completed|priority
POST /api/tasks
PUT /api/tasks/{id}
PATCH /api/tasks/{id}/toggle
DELETE /api/tasks/{id}
DELETE /api/tasks/completed?months=6
Categories
GET /api/categories
POST /api/categories
Settings
GET /api/settings/app
PUT /api/settings/app
GET /api/settings/salary
PUT /api/settings/salary
Work Days
GET /api/work-days?monthKey=2026-06
PUT /api/work-days/{yyyy-MM-dd}
DELETE /api/work-days/{yyyy-MM-dd}
Reports
GET /api/reports/monthly?monthKey=2026-06
🧪 Tests
Windows:
gradlew.bat testmacOS / Linux:
./gradlew test📱 Cài đặt như App (PWA)
Android (Chrome):
- Mở
http://<server-ip>:8080trong Chrome - Menu → "Thêm vào Màn hình chính"
Desktop (Chrome/Edge):
- Mở app trong trình duyệt
- Click icon cài đặt ở thanh địa chỉ → "Install TaskPay"
🤝 Đóng góp
- Fork repo này
- Tạo branch:
git checkout -b feature/ten-tinh-nang - Commit:
git commit -m "Add: mô tả thay đổi" - Push:
git push origin feature/ten-tinh-nang - Tạo Pull Request
📄 License
MIT License — Copyright (c) 2026 ilcde
<div align="center">
Made with ❤️ — ⭐ Nếu thấy hữu ích, hãy star repo này nhé!
</div>