@meridianjs/project 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +116 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # @meridianjs/project
2
+
3
+ Project module for MeridianJS. Manages projects, labels, milestones, and custom project statuses. The Kanban board columns and issue status fields are driven entirely by `ProjectStatus` records — not hard-coded enums.
4
+
5
+ Auto-loaded by `@meridianjs/meridian` — you do not need to add this to `modules[]` yourself.
6
+
7
+ ## Service: `projectModuleService`
8
+
9
+ ```typescript
10
+ const svc = req.scope.resolve("projectModuleService") as any
11
+ ```
12
+
13
+ ### Auto-generated CRUD
14
+
15
+ ```typescript
16
+ // Projects
17
+ await svc.listProjects(filters?, options?)
18
+ await svc.listAndCountProjects(filters?, options?)
19
+ await svc.retrieveProject(id)
20
+ await svc.createProject(data)
21
+ await svc.updateProject(id, data)
22
+ await svc.deleteProject(id)
23
+
24
+ // Labels
25
+ await svc.listLabels(filters?)
26
+ await svc.createLabel(data)
27
+ await svc.updateLabel(id, data)
28
+ await svc.deleteLabel(id)
29
+
30
+ // Milestones
31
+ await svc.listMilestones(filters?)
32
+ await svc.createMilestone(data)
33
+ await svc.updateMilestone(id, data)
34
+ await svc.deleteMilestone(id)
35
+
36
+ // Project Statuses
37
+ await svc.listProjectStatuses(filters?)
38
+ await svc.retrieveProjectStatus(id)
39
+ await svc.createProjectStatus(data)
40
+ await svc.updateProjectStatus(id, data)
41
+ await svc.deleteProjectStatus(id)
42
+ ```
43
+
44
+ ### Custom Methods
45
+
46
+ ```typescript
47
+ // Find a project by its short identifier (e.g. "SITE", "APP")
48
+ const project = await svc.retrieveProjectByIdentifier("SITE")
49
+
50
+ // Auto-generate an identifier from a project name
51
+ const identifier = svc.generateIdentifier("Website Redesign") // → "WEBS"
52
+
53
+ // List all labels for a project
54
+ const labels = await svc.listLabelsByProject(projectId)
55
+
56
+ // List all statuses for a project, ordered by position
57
+ const statuses = await svc.listStatusesByProject(projectId)
58
+ ```
59
+
60
+ ## Data Models
61
+
62
+ ### Project
63
+
64
+ | Field | Type | Description |
65
+ |---|---|---|
66
+ | `id` | `uuid` | Primary key |
67
+ | `name` | `text` | Project name |
68
+ | `identifier` | `text` | Short uppercase code (e.g. `"SITE"`) |
69
+ | `description` | `text` | Optional description |
70
+ | `color` | `text` | Hex colour for UI |
71
+ | `workspace_id` | `text` | Owning workspace |
72
+ | `status` | `text` | `"active"` \| `"archived"` \| `"paused"` |
73
+ | `visibility` | `text` | `"private"` \| `"public"` \| `"workspace"` |
74
+ | `created_at` | `datetime` | — |
75
+ | `updated_at` | `datetime` | — |
76
+
77
+ ### ProjectStatus
78
+
79
+ Custom Kanban columns. Created automatically by `createProjectWorkflow` with 6 defaults, then fully managed via the statuses API.
80
+
81
+ | Field | Type | Description |
82
+ |---|---|---|
83
+ | `id` | `uuid` | Primary key |
84
+ | `project_id` | `text` | Owning project |
85
+ | `name` | `text` | Display name (e.g. `"In Progress"`) |
86
+ | `key` | `text` | Machine key (e.g. `"in_progress"`) |
87
+ | `color` | `text` | Hex colour for the Kanban column |
88
+ | `category` | `text` | `"backlog"` \| `"unstarted"` \| `"started"` \| `"completed"` \| `"cancelled"` |
89
+ | `position` | `number` | Column order |
90
+
91
+ ### Default Statuses (seeded on project creation)
92
+
93
+ | Name | Key | Category |
94
+ |---|---|---|
95
+ | Backlog | `backlog` | `backlog` |
96
+ | Todo | `todo` | `unstarted` |
97
+ | In Progress | `in_progress` | `started` |
98
+ | In Review | `in_review` | `started` |
99
+ | Done | `done` | `completed` |
100
+ | Cancelled | `cancelled` | `cancelled` |
101
+
102
+ ## API Routes
103
+
104
+ | Method | Path | Description |
105
+ |---|---|---|
106
+ | `GET/POST` | `/admin/projects` | List / create projects |
107
+ | `GET/PUT/DELETE` | `/admin/projects/:id` | Get / update / delete project |
108
+ | `GET/POST` | `/admin/projects/:id/statuses` | List / create custom statuses |
109
+ | `PUT/DELETE` | `/admin/projects/:id/statuses/:statusId` | Update / delete a status |
110
+ | `POST` | `/admin/projects/:id/statuses/reorder` | Reorder columns |
111
+ | `GET/POST` | `/admin/projects/:id/labels` | Manage project labels |
112
+ | `GET/POST` | `/admin/projects/:id/milestones` | Manage milestones |
113
+
114
+ ## License
115
+
116
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridianjs/project",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Meridian project module — Project, Label, Milestone domain models",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",