@meridianjs/meridian 0.1.31 → 0.1.32

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 +107 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # @meridianjs/meridian
2
+
3
+ The default MeridianJS plugin. Provides all core domain modules, API routes, workflows, event subscribers, and link definitions out of the box. Adding this single plugin to your config gives you a fully functional project management backend.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @meridianjs/meridian
9
+ ```
10
+
11
+ ## Configuration
12
+
13
+ ```typescript
14
+ // meridian.config.ts
15
+ import { defineConfig } from "@meridianjs/framework"
16
+
17
+ export default defineConfig({
18
+ projectConfig: {
19
+ databaseUrl: process.env.DATABASE_URL!,
20
+ jwtSecret: process.env.JWT_SECRET!,
21
+ httpPort: 9000,
22
+ },
23
+ modules: [
24
+ { resolve: "@meridianjs/event-bus-local" }, // swap for event-bus-redis in production
25
+ { resolve: "@meridianjs/job-queue-local" }, // swap for job-queue-redis in production
26
+ ],
27
+ plugins: [
28
+ { resolve: "@meridianjs/meridian" },
29
+ ],
30
+ })
31
+ ```
32
+
33
+ You do **not** need to list the 14 core domain modules individually — the plugin loads them all automatically.
34
+
35
+ ## What's Included
36
+
37
+ ### Core Domain Modules (auto-loaded)
38
+
39
+ | Module | Service Token | Description |
40
+ |---|---|---|
41
+ | `@meridianjs/user` | `userModuleService` | Users, teams, sessions |
42
+ | `@meridianjs/workspace` | `workspaceModuleService` | Multi-tenant workspaces |
43
+ | `@meridianjs/auth` | `authModuleService` | JWT register / login / OAuth |
44
+ | `@meridianjs/project` | `projectModuleService` | Projects, labels, milestones, statuses |
45
+ | `@meridianjs/issue` | `issueModuleService` | Issues, comments, attachments, time logs |
46
+ | `@meridianjs/sprint` | `sprintModuleService` | Sprints / cycles |
47
+ | `@meridianjs/activity` | `activityModuleService` | Audit log |
48
+ | `@meridianjs/notification` | `notificationModuleService` | In-app notifications |
49
+ | `@meridianjs/invitation` | `invitationModuleService` | Workspace invitation tokens |
50
+ | `@meridianjs/workspace-member` | `workspaceMemberModuleService` | Workspace membership + roles |
51
+ | `@meridianjs/team-member` | `teamMemberModuleService` | Team membership |
52
+ | `@meridianjs/project-member` | `projectMemberModuleService` | Project-level access control |
53
+ | `@meridianjs/app-role` | `appRoleModuleService` | Custom RBAC roles with permission arrays |
54
+ | `@meridianjs/org-calendar` | `orgCalendarModuleService` | Working days, holidays, Gantt support |
55
+
56
+ ### API Routes
57
+
58
+ All routes are mounted automatically. Selected highlights:
59
+
60
+ | Method | Path | Description |
61
+ |---|---|---|
62
+ | `POST` | `/auth/register` | Create account, return JWT |
63
+ | `POST` | `/auth/login` | Authenticate, return JWT |
64
+ | `GET/POST` | `/admin/workspaces` | List / create workspaces |
65
+ | `GET/POST` | `/admin/projects` | List / create projects |
66
+ | `GET/POST` | `/admin/projects/:id/issues` | List / create issues |
67
+ | `GET/POST` | `/admin/projects/:id/sprints` | Manage sprints |
68
+ | `POST` | `/admin/projects/:id/issues/:issueId/comments` | Add comment |
69
+ | `GET/POST` | `/admin/workspaces/:id/members` | Workspace membership |
70
+ | `GET/POST` | `/admin/workspaces/:id/teams` | Team management |
71
+ | `GET/POST` | `/admin/workspaces/:id/invitations` | Invite users |
72
+ | `GET/POST` | `/admin/roles` | Custom RBAC role management |
73
+
74
+ ### Workflows
75
+
76
+ All mutation routes run through saga workflows with automatic compensation:
77
+
78
+ - `createProjectWorkflow` — creates project + seeds default statuses
79
+ - `createIssueWorkflow` — creates issue + records activity + emits event
80
+ - `updateIssueStatusWorkflow` — updates status + emits `issue.status_changed`
81
+ - `assignIssueWorkflow` — assigns user + emits `issue.assigned`
82
+ - `completeSprintWorkflow` — completes sprint + moves incomplete issues to backlog
83
+
84
+ ### Domain Events
85
+
86
+ | Event | Emitted by |
87
+ |---|---|
88
+ | `project.created` | `createProjectWorkflow` |
89
+ | `issue.created` | `createIssueWorkflow` |
90
+ | `issue.status_changed` | `updateIssueStatusWorkflow` |
91
+ | `issue.assigned` | `assignIssueWorkflow` |
92
+ | `sprint.completed` | `completeSprintWorkflow` |
93
+ | `comment.created` | Comment creation route |
94
+
95
+ ## Extending
96
+
97
+ Disable specific subscribers if you want to handle events yourself:
98
+
99
+ ```typescript
100
+ { resolve: "@meridianjs/meridian", disableSubscribers: ["issue.created"] }
101
+ ```
102
+
103
+ Add your own routes, subscribers, and jobs alongside the plugin by placing files in your project's `src/api/`, `src/subscribers/`, and `src/jobs/` directories.
104
+
105
+ ## License
106
+
107
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridianjs/meridian",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "Default API routes, workflows, links, and subscribers for Meridian applications",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",