create-living-architecture 1.0.7 → 1.1.0

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/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "create-living-architecture",
3
- "version": "1.0.7",
4
- "description": "Scaffold a Living Architecture project with gravitational code organization",
3
+ "version": "1.1.0",
4
+ "description": "Scaffold a Living Architecture project with pluggable R0-R5 layers",
5
5
  "main": "index.js",
6
6
  "bin": {
7
7
  "create-living-architecture": "index.js"
8
8
  },
9
9
  "files": [
10
10
  "index.js",
11
- "templates/"
11
+ "template/"
12
12
  ],
13
13
  "scripts": {
14
14
  "test": "echo \"No tests yet\" && exit 0"
@@ -20,7 +20,9 @@
20
20
  "clean-architecture",
21
21
  "git-hooks",
22
22
  "scaffolding",
23
- "gravitational-design"
23
+ "gravitational-design",
24
+ "r0-r5",
25
+ "pluggable-layers"
24
26
  ],
25
27
  "author": "Demos Ra",
26
28
  "license": "MIT",
@@ -1,53 +0,0 @@
1
- # Living Architecture System Context
2
-
3
- This project uses dependency gravity for code organization.
4
-
5
- ## Rules for AI Code Generation
6
-
7
- When generating code, place files by dependency weight:
8
-
9
- **R1 • Domain** (`src/domain/`)
10
- - Pure business logic
11
- - Zero external dependencies
12
- - Entities, value objects, domain services
13
- - If it defines WHAT the system does → R1
14
-
15
- **R2 • Database** (`src/database/`)
16
- - Data persistence only
17
- - Can import from R1
18
- - Repositories, DAOs, migrations
19
- - If it stores/retrieves data → R2
20
-
21
- **R3 • API** (`src/api/`)
22
- - Application orchestration
23
- - Can import from R1, R2
24
- - HTTP routes, GraphQL resolvers, use cases
25
- - If it coordinates business flows → R3
26
-
27
- **R4 • Integrations** (`src/integrations/`)
28
- - External system adapters
29
- - Can import from all layers
30
- - UI components, third-party APIs, message queues
31
- - If it adapts external systems → R4
32
-
33
- ## Commit Format
34
- ```
35
- Layer: Description [R#/C#]
36
- ```
37
-
38
- Examples:
39
- ```
40
- Domain: Add user entity [R1/C2]
41
- Database: Add user repository [R2/C2]
42
- API: Add registration endpoint [R3/C2]
43
- Integrations: Add email service [R4/C2]
44
- ```
45
-
46
- ## Quick Decision Tree
47
-
48
- - Pure logic, no dependencies? → R1
49
- - Just database operations? → R2
50
- - Coordinates multiple things? → R3
51
- - Talks to outside world? → R4
52
-
53
- Git hooks validate on commit.
@@ -1,56 +0,0 @@
1
- # Architecture
2
-
3
- This project uses [Living Architecture](https://github.com/demos-ra/living-architecture).
4
-
5
- Code organized by dependency gravity - heavy (pure logic) sinks to bottom, light (adapters) floats to top.
6
-
7
- ## Layers
8
-
9
- **R1 • Domain** (heaviest - zero dependencies)
10
- - Core business logic
11
- - Entities, value objects, domain services
12
- - No framework dependencies
13
-
14
- **R2 • Database** (depends on domain only)
15
- - Data persistence
16
- - Repositories, DAOs
17
- - Database adapters
18
-
19
- **R3 • API** (orchestrates domain + database)
20
- - Application services
21
- - Use cases, workflows
22
- - Business process coordination
23
-
24
- **R4 • Integrations** (lightest - adapts everything)
25
- - External system adapters
26
- - UI/presentation layer
27
- - Third-party services
28
- - HTTP, GraphQL, message queues
29
-
30
- ## Dependency Rules
31
-
32
- Dependencies flow down only:
33
- ```
34
- R4 → R3 → R2 → R1
35
- ```
36
-
37
- - R1 imports nothing
38
- - R2 imports only R1
39
- - R3 imports R1, R2
40
- - R4 imports all
41
-
42
- Violations caught by git hooks.
43
-
44
- ## Benefits
45
-
46
- **Swap layers independently:**
47
- - Change database? Only R2 affected
48
- - Change UI framework? Only R4 affected
49
- - Core business logic never touched
50
-
51
- **Git history = architecture:**
52
- ```bash
53
- git log --oneline
54
- ```
55
-
56
- Shows which layer each change affected.
@@ -1,28 +0,0 @@
1
- # Starter Template
2
-
3
- Example Living Architecture project structure.
4
-
5
- ## Structure
6
-
7
- ```
8
- src/
9
- domain/ R1 - Zero dependencies
10
- database/ R2 - Depends on domain
11
- api/ R3 - Orchestrates
12
- integrations/ R4 - External systems + UI
13
- ```
14
-
15
- ## Usage
16
-
17
- ```bash
18
- npx create-living-architecture my-project
19
- ```
20
-
21
- ## Commit Examples
22
-
23
- ```
24
- Domain: Add user entity [R1/C2]
25
- Database: Add user repository [R2/C2]
26
- API: Add registration endpoint [R3/C2]
27
- Integrations: Add SendGrid email [R4/C2]
28
- ```
@@ -1,13 +0,0 @@
1
- # API Layer (R3)
2
-
3
- Depends on: Domain (R1), Database (R2)
4
-
5
- ## Examples
6
- - REST endpoints
7
- - GraphQL resolvers
8
- - Request handlers
9
- - Response formatting
10
-
11
- ## Rules
12
- Can import from: R1, R2
13
- Cannot import from: R4
@@ -1,13 +0,0 @@
1
- # Database Layer (R2)
2
-
3
- Depends on: Domain (R1)
4
-
5
- ## Examples
6
- - User repository
7
- - Order repository
8
- - Database connections
9
- - Migrations
10
-
11
- ## Rules
12
- Can import from: R1
13
- Cannot import from: R3, R4
@@ -1,12 +0,0 @@
1
- # Domain Layer (R1)
2
-
3
- Zero dependencies. Core business logic.
4
-
5
- ## Examples
6
- - User entity
7
- - Order entity
8
- - Value objects
9
- - Business rules
10
-
11
- ## Rules
12
- Cannot import from: Database (R2), API (R3), Integrations (R4)
@@ -1,13 +0,0 @@
1
- # Integrations Layer (R4)
2
-
3
- Depends on: All layers
4
-
5
- ## Examples
6
- - SendGrid email
7
- - Stripe payments
8
- - Auth0 authentication
9
- - React/Vue UI components
10
-
11
- ## Rules
12
- Can import from: R1, R2, R3
13
- External systems and UI live here
File without changes
File without changes
File without changes
File without changes
File without changes