Skip to content

zienshang/taskflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 TaskFlow

Hệ thống quản lý công việc tuyển dụng nội bộ

Python FastAPI MongoDB JWT Docker Security

Admin giao task · HR nộp CV · Theo dõi hoa hồng · Hỗ trợ qua ticket


📸 Dashboard

Dashboard


✨ Tính năng nổi bật

🔐 Phân quyền Admin / HR Leader / HR
📋 Giao task Rich text editor, file đính kèm, hoa hồng, deadline
📄 Nộp CV PDF/DOCX, đánh giá ứng viên
💰 Thanh toán Yêu cầu → phê duyệt → xác nhận (kèm ảnh chuyển khoản)
🎫 Ticket Hỗ trợ nội bộ với comment thread
📊 Dashboard Theo dõi HR realtime, thống kê
📝 Audit log Mọi thao tác đều được ghi lại

🚦 Quick Start

docker compose -f taskflow/docker-compose.yml up -d

Mở http://localhost:8000 — tài khoản admin được tạo tự động khi chạy lần đầu.


🛠 Tech Stack

Layer Công nghệ
🔙 Backend Python 3.12+, FastAPI
🗄 Database MongoDB 7.x
🎨 Frontend Vanilla JS SPA (zero framework)
🔑 Auth JWT + bcrypt
🐳 Deploy Docker Compose

🔒 Security

Biện pháp Chi tiết
🔑 Authentication JWT (HS256, 8h expiry) + OAuth2 Bearer
🔐 Password bcrypt hashing (via passlib)
🚦 Rate Limiting SQLite sliding-window — login (10/IP·60s), password (5/user·300s), ticket, upload
🛡 Headers CSP · X-Frame-Options: DENY · X-Content-Type-Options: nosniff · Referrer-Policy · Permissions-Policy
🌐 CORS Whitelist origins, methods (GET,POST,PUT,DELETE), headers (Authorization, Content-Type)
📋 RBAC 3 roles: admin, hr_leader, hr — scoped API với dependency guards
🧹 XSS Prevention HTML sanitizer (nh3) trên task description
📎 File Upload Chặn extension lạ + giới hạn kích thước + serve qua JWT
🧪 Input Validation Pydantic với min_length/max_length/regex/Enum
🚫 API Schema Tắt Swagger/ReDoc/OpenAPI ở production
🛠 Startup Warnings Cảnh báo nếu SECRET_KEY mặc định / ALLOWED_ORIGINS*

🖼 Screenshots

Dashboard Login
Dashboard Login
Drop Task Ticket
Drop Task Ticket

📁 Cấu trúc

.
├── build.js               # Build & obfuscation (Node.js)
├── screenshots/           # Hình ảnh dự án
└── taskflow/
    ├── main.py            # FastAPI entry point
    ├── core/              # Auth, config, database, rate limiter
    ├── models/            # Pydantic schemas
    ├── routers/           # 8 API modules
    ├── static/            # Frontend SPA (HTML + CSS + 13 JS)
    ├── Dockerfile
    └── docker-compose.yml

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors