TaskFlow ek modern project management application hai jo Frappe Framework (Backend) aur Frappe UI (Frontend) par build hai. Iska objective Project Managers ko v16 jaisa sleek interface aur seamless team management provide karna hai.
- Backend: Frappe Framework v15/v16 (Python, MariaDB)
- Frontend: Frappe UI (Vue 3, TailwindCSS, Headless UI)
- Icons: Lucide Icons / Feather Icons
- User Roles:
- Project Manager: Full control (Create Projects/Tasks, Manage Team).
- Team Member: View assigned tasks & Fill Timesheets.
- Viewer: Read-only access to progress.
Humne 3 core DocTypes define kiye hain:
| DocType | Fields Key | Linkages |
|---|---|---|
| Project | project_name, status, manager, end_date |
Primary Master |
| Task | subject, project, assigned_to, priority, status |
Child of Project |
| Timesheet | task, hours, description, user, date |
Log of Task |
Frontend (Frappe UI) ko fast metrics dene ke liye optimized endpoints:
import frappe
from frappe import _
@frappe.whitelist()
def get_manager_dashboard_stats():
"""Project Manager dashboard ke liye single-call stats"""
return {
"active_projects": frappe.db.count("Project", {"status": ["!=", "Completed"]}),
"pending_tasks": frappe.db.count("Task", {"status": ["!=", "Done"]}),
"overdue_tasks": frappe.db.count("Task", {
"status": ["!=", "Done"],
"end_date": ["<", frappe.utils.today()]
})
}
@frappe.whitelist()
def update_task_status(task_name, status):
"""Kanban Drag-n-Drop support ke liye status update API"""
doc = frappe.get_doc("Task", task_name)
doc.status = status
doc.save()
return _("Task updated successfully")Chunki aapne frontend pehle hi initiate kar diya hai, ab hume use v16 style mein map karna hai.
src/resources/index.js (ya main file) mein in resources ko define karein:
import { createListResource, createResource } from "frappe-ui";
// 1. Projects List
export const projectsResource = createListResource({
doctype: "Project",
fields: ["*"],
auto: true,
});
// 2. Dashboard Stats
export const dashboardStats = createResource({
url: "taskflow.api.get_manager_dashboard_stats",
auto: true,
});Frappe v16 style achieve karne ke liye standard components use karein:
- Navigation:
Sidebarcomponent with Lucide icons (Layout.vue). - Dashboard Cards:
statsresource se data binding. - Task List:
ListViewwith customized rows for priority colors.
- Colors: Primary Color (#1F2937 - Dark Gray/Indigo hybrid).
- Typography: Inter font family.
- Cards: * Background:
#FFFFFF - Border:
1px solid #F3F4F6 - Shadow:
shadow-smon rest,shadow-mdon hover.
System automation ke liye hooks ka injection:
# Project complete automatically when tasks are done
doc_events = {
"Task": {
"on_update": "taskflow.api.handle_task_completion"
}
}
# Export custom frontend build to Frappe Desk
app_include_js = "/assets/taskflow/js/taskflow.bundle.js"- Backend Config: Doctypes create karein aur
api.pymein functions likhein. - Role Setup: Role Permissions Manager mein Project Manager ko task/project ka access dein.
- Frontend Binding: initiated frontend folder mein jaakar
createListResourcese Task list display karein. - v16 Styling: Tailwind CSS class
rounded-lg,border-gray-200, aurtext-gray-900ka consistently use karein. - Build:
bench build --app taskflowkarke desk interface ke saath sync karein.
bench starthamesha background mein chalu rakhein.- Frontend ke liye
npm run devuse karein (Vite auto-reload ke liye).- Frappe UI ke components ko customize karne ke liye Tailwind best practice hai.