@eventcatalog/create-eventcatalog 3.0.9 → 3.0.11
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.
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/templates/amazon-api-gateway/eventcatalog.config.js +3 -0
- package/templates/asyncapi/eventcatalog.config.js +3 -0
- package/templates/confluent/eventcatalog.config.js +3 -0
- package/templates/default/domains/Orders/entities/CartItem/index.mdx +121 -0
- package/templates/default/domains/Orders/entities/Customer/index.mdx +57 -0
- package/templates/default/domains/Orders/entities/Order/index.mdx +96 -0
- package/templates/default/domains/Orders/entities/OrderItem/index.mdx +59 -0
- package/templates/default/domains/Orders/entities/ShoppingCart/index.mdx +148 -0
- package/templates/default/domains/Orders/index.mdx +13 -0
- package/templates/default/domains/Payment/entities/Address/index.mdx +162 -0
- package/templates/default/domains/Payment/entities/Invoice/index.mdx +89 -0
- package/templates/default/domains/Payment/entities/Payment/index.mdx +137 -0
- package/templates/default/domains/Payment/entities/PaymentMethod/index.mdx +77 -0
- package/templates/default/domains/Payment/entities/Transaction/index.mdx +77 -0
- package/templates/default/domains/Payment/index.mdx +17 -1
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/index.mdx +48 -0
- package/templates/default/domains/Payment/services/FraudDetectionService/events/FraudCheckCompleted/schema.json +44 -0
- package/templates/default/domains/Payment/services/FraudDetectionService/index.mdx +59 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/index.mdx +72 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/commands/ProcessPayment/schema.json +58 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/index.mdx +60 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/events/PaymentFailed/schema.json +68 -0
- package/templates/default/domains/Payment/services/PaymentGatewayService/index.mdx +78 -0
- package/templates/default/domains/ProductCatalog/entities/Category/index.mdx +124 -0
- package/templates/default/domains/ProductCatalog/entities/Inventory/index.mdx +116 -0
- package/templates/default/domains/ProductCatalog/entities/Product/index.mdx +115 -0
- package/templates/default/domains/ProductCatalog/entities/Review/index.mdx +154 -0
- package/templates/default/domains/ProductCatalog/index.mdx +74 -0
- package/templates/default/domains/Subscriptions/entities/BillingProfile/index.mdx +68 -0
- package/templates/default/domains/Subscriptions/entities/SubscriptionPeriod/index.mdx +73 -0
- package/templates/default/domains/Subscriptions/index.mdx +13 -2
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/index.mdx +60 -0
- package/templates/default/domains/Subscriptions/services/BillingService/events/SubscriptionPaymentDue/schema.json +54 -0
- package/templates/default/domains/Subscriptions/services/BillingService/index.mdx +86 -0
- package/templates/default/domains/Subscriptions/services/PlanManagementService/index.mdx +93 -0
- package/templates/default/eventcatalog.config.js +3 -0
- package/templates/empty/eventcatalog.config.js +3 -0
- package/templates/eventbridge/eventcatalog.config.js +3 -0
- package/templates/openapi/eventcatalog.config.js +3 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: BillingService
|
|
3
|
+
version: 0.0.1
|
|
4
|
+
name: Billing Service
|
|
5
|
+
summary: Manages billing cycles, invoice generation, and payment scheduling for subscriptions
|
|
6
|
+
tags:
|
|
7
|
+
- billing
|
|
8
|
+
- subscriptions
|
|
9
|
+
- invoicing
|
|
10
|
+
repository:
|
|
11
|
+
url: https://github.com/eventcatalog/billing-service
|
|
12
|
+
receives:
|
|
13
|
+
- id: SubscriptionCreated
|
|
14
|
+
version: 0.0.1
|
|
15
|
+
- id: SubscriptionUpdated
|
|
16
|
+
version: 0.0.1
|
|
17
|
+
- id: PaymentProcessed
|
|
18
|
+
version: 0.0.1
|
|
19
|
+
- id: PaymentFailed
|
|
20
|
+
version: 0.0.1
|
|
21
|
+
sends:
|
|
22
|
+
- id: InvoiceGenerated
|
|
23
|
+
version: 0.0.1
|
|
24
|
+
- id: SubscriptionPaymentDue
|
|
25
|
+
version: 0.0.1
|
|
26
|
+
- id: BillingCycleCompleted
|
|
27
|
+
version: 0.0.1
|
|
28
|
+
- id: ProcessPayment
|
|
29
|
+
version: 0.0.1
|
|
30
|
+
owners:
|
|
31
|
+
- billingTeam
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
import Footer from '@catalog/components/footer.astro'
|
|
35
|
+
|
|
36
|
+
## Overview
|
|
37
|
+
|
|
38
|
+
The Billing Service is responsible for managing all billing-related operations for subscriptions. It calculates billing cycles, generates invoices, and coordinates with payment services to ensure timely payment collection.
|
|
39
|
+
|
|
40
|
+
## Key Features
|
|
41
|
+
|
|
42
|
+
- **Billing Cycle Management**: Handles daily, weekly, monthly, quarterly, and annual billing cycles
|
|
43
|
+
- **Invoice Generation**: Creates detailed invoices with line items and tax calculations
|
|
44
|
+
- **Payment Scheduling**: Schedules recurring payments based on billing cycles
|
|
45
|
+
- **Proration**: Calculates prorated charges for mid-cycle changes
|
|
46
|
+
- **Dunning Management**: Handles failed payment retry logic
|
|
47
|
+
|
|
48
|
+
## API Endpoints
|
|
49
|
+
|
|
50
|
+
### REST API
|
|
51
|
+
- `GET /api/billing/invoice/{subscriptionId}` - Get current invoice
|
|
52
|
+
- `GET /api/billing/history/{subscriptionId}` - Get billing history
|
|
53
|
+
- `POST /api/billing/preview` - Preview upcoming charges
|
|
54
|
+
- `PUT /api/billing/retry/{invoiceId}` - Retry failed payment
|
|
55
|
+
|
|
56
|
+
## Billing Cycle States
|
|
57
|
+
|
|
58
|
+
```mermaid
|
|
59
|
+
stateDiagram-v2
|
|
60
|
+
[*] --> Scheduled
|
|
61
|
+
Scheduled --> Processing
|
|
62
|
+
Processing --> Paid
|
|
63
|
+
Processing --> Failed
|
|
64
|
+
Failed --> Retrying
|
|
65
|
+
Retrying --> Paid
|
|
66
|
+
Retrying --> Suspended
|
|
67
|
+
Paid --> [*]
|
|
68
|
+
Suspended --> [*]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Configuration
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
billing_service:
|
|
75
|
+
cycles:
|
|
76
|
+
- daily
|
|
77
|
+
- weekly
|
|
78
|
+
- monthly
|
|
79
|
+
- quarterly
|
|
80
|
+
- annual
|
|
81
|
+
retry_attempts: 3
|
|
82
|
+
retry_interval_days: [1, 3, 7]
|
|
83
|
+
invoice_generation_lead_days: 7
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
<Footer />
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: PlanManagementService
|
|
3
|
+
version: 0.0.1
|
|
4
|
+
name: Plan Management Service
|
|
5
|
+
summary: Manages subscription plans, features, pricing tiers, and plan migrations
|
|
6
|
+
tags:
|
|
7
|
+
- plans
|
|
8
|
+
- pricing
|
|
9
|
+
- subscriptions
|
|
10
|
+
repository:
|
|
11
|
+
url: https://github.com/eventcatalog/plan-management-service
|
|
12
|
+
receives:
|
|
13
|
+
- id: CreatePlan
|
|
14
|
+
version: 0.0.1
|
|
15
|
+
- id: UpdatePlan
|
|
16
|
+
version: 0.0.1
|
|
17
|
+
- id: MigratePlan
|
|
18
|
+
version: 0.0.1
|
|
19
|
+
sends:
|
|
20
|
+
- id: PlanCreated
|
|
21
|
+
version: 0.0.1
|
|
22
|
+
- id: PlanUpdated
|
|
23
|
+
version: 0.0.1
|
|
24
|
+
- id: PlanMigrationCompleted
|
|
25
|
+
version: 0.0.1
|
|
26
|
+
- id: FeatureAccessChanged
|
|
27
|
+
version: 0.0.1
|
|
28
|
+
owners:
|
|
29
|
+
- productTeam
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
import Footer from '@catalog/components/footer.astro'
|
|
33
|
+
|
|
34
|
+
## Overview
|
|
35
|
+
|
|
36
|
+
The Plan Management Service handles the definition and management of subscription plans, including pricing, features, and plan migrations. It serves as the source of truth for what features and limits apply to each subscription tier.
|
|
37
|
+
|
|
38
|
+
## Key Features
|
|
39
|
+
|
|
40
|
+
- **Plan Definition**: Create and manage subscription plans with different tiers
|
|
41
|
+
- **Feature Flags**: Control feature access based on subscription plans
|
|
42
|
+
- **Usage Limits**: Define and enforce usage limits per plan
|
|
43
|
+
- **Plan Migration**: Handle upgrades and downgrades between plans
|
|
44
|
+
- **Pricing Management**: Manage pricing, discounts, and promotional offers
|
|
45
|
+
|
|
46
|
+
## Supported Plan Types
|
|
47
|
+
|
|
48
|
+
### Basic Plan
|
|
49
|
+
- Essential features
|
|
50
|
+
- Limited usage quotas
|
|
51
|
+
- Email support
|
|
52
|
+
|
|
53
|
+
### Professional Plan
|
|
54
|
+
- All Basic features
|
|
55
|
+
- Higher usage quotas
|
|
56
|
+
- Priority support
|
|
57
|
+
- Advanced analytics
|
|
58
|
+
|
|
59
|
+
### Enterprise Plan
|
|
60
|
+
- All Professional features
|
|
61
|
+
- Unlimited usage
|
|
62
|
+
- Dedicated support
|
|
63
|
+
- Custom integrations
|
|
64
|
+
- SLA guarantees
|
|
65
|
+
|
|
66
|
+
## API Endpoints
|
|
67
|
+
|
|
68
|
+
### REST API
|
|
69
|
+
- `GET /api/plans` - List all available plans
|
|
70
|
+
- `GET /api/plans/{planId}` - Get plan details
|
|
71
|
+
- `POST /api/plans` - Create new plan
|
|
72
|
+
- `PUT /api/plans/{planId}` - Update plan
|
|
73
|
+
- `POST /api/plans/migrate` - Migrate subscription to different plan
|
|
74
|
+
|
|
75
|
+
## Plan Structure
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"id": "pro-monthly",
|
|
80
|
+
"name": "Professional Monthly",
|
|
81
|
+
"price": 49.99,
|
|
82
|
+
"currency": "USD",
|
|
83
|
+
"interval": "monthly",
|
|
84
|
+
"features": {
|
|
85
|
+
"api_calls": 10000,
|
|
86
|
+
"storage_gb": 100,
|
|
87
|
+
"team_members": 10,
|
|
88
|
+
"priority_support": true
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
<Footer />
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
organizationName: '<organizationName>',
|
|
6
6
|
homepageLink: 'https://eventcatalog.dev/',
|
|
7
7
|
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
8
|
+
// Supports static or server. Static renders a static site, server renders a server side rendered site
|
|
9
|
+
// large catalogs may benefit from server side rendering
|
|
10
|
+
output: 'static',
|
|
8
11
|
// By default set to false, add true to get urls ending in /
|
|
9
12
|
trailingSlash: false,
|
|
10
13
|
// Change to make the base url of the site different, by default https://{website}.com/docs,
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
organizationName: '<organizationName>',
|
|
6
6
|
homepageLink: 'https://eventcatalog.dev/',
|
|
7
7
|
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
8
|
+
// Supports static or server. Static renders a static site, server renders a server side rendered site
|
|
9
|
+
// large catalogs may benefit from server side rendering
|
|
10
|
+
output: 'static',
|
|
8
11
|
// By default set to false, add true to get urls ending in /
|
|
9
12
|
trailingSlash: false,
|
|
10
13
|
// Change to make the base url of the site different, by default https://{website}.com/docs,
|
|
@@ -5,6 +5,9 @@ export default {
|
|
|
5
5
|
organizationName: '<organizationName>',
|
|
6
6
|
homepageLink: 'https://eventcatalog.dev/',
|
|
7
7
|
editUrl: 'https://github.com/boyney123/eventcatalog-demo/edit/master',
|
|
8
|
+
// Supports static or server. Static renders a static site, server renders a server side rendered site
|
|
9
|
+
// large catalogs may benefit from server side rendering
|
|
10
|
+
output: 'static',
|
|
8
11
|
// By default set to false, add true to get urls ending in /
|
|
9
12
|
trailingSlash: false,
|
|
10
13
|
// Change to make the base url of the site different, by default https://{website}.com/docs,
|
|
@@ -10,6 +10,9 @@ export default {
|
|
|
10
10
|
organizationName: '<organizationName>',
|
|
11
11
|
homepageLink: "https://eventcatalog.dev/",
|
|
12
12
|
editUrl: "https://github.com/boyney123/eventcatalog-demo/edit/master",
|
|
13
|
+
// Supports static or server. Static renders a static site, server renders a server side rendered site
|
|
14
|
+
// large catalogs may benefit from server side rendering
|
|
15
|
+
output: 'static',
|
|
13
16
|
// By default set to false, add true to get urls ending in /
|
|
14
17
|
trailingSlash: false,
|
|
15
18
|
// Change to make the base url of the site different, by default https://{website}.com/docs,
|