Repository navigation
Expand file tree
/
Copy pathfeatures.json
More file actions
162 lines (162 loc) · 3.84 KB
/
Copy pathfeatures.json
File metadata and controls
162 lines (162 loc) · 3.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
{
"version": "1.0.0",
"generated": "2025-10-12T22:53:40.256Z",
"features": {
"USER.ITEM.LIST": {
"id": "USER.ITEM.LIST",
"domain": "USER",
"entity": "ITEM",
"operation": "LIST",
"qualifiers": [],
"layers": [
"API"
],
"dependencies": [
"DB.USERS.SCHEMA",
"DB.POSTS.SCHEMA"
],
"implements": [
"GET /api/users endpoint",
"Aggregate posts count per user",
"Order by creation date descending"
],
"files": [
"apps/api/src/routes/users.ts"
],
"tests": [
"Integration: List users with counts"
]
},
"USER.ITEM.READ": {
"id": "USER.ITEM.READ",
"domain": "USER",
"entity": "ITEM",
"operation": "READ",
"qualifiers": [],
"layers": [
"API"
],
"dependencies": [
"DB.USERS.SCHEMA",
"DB.POSTS.SCHEMA"
],
"implements": [
"GET /api/users/:id endpoint",
"Fetch single user with posts count",
"404 if user not found"
],
"files": [
"apps/api/src/routes/users.ts"
],
"tests": [
"Integration: Get user by ID",
"Integration: 404 for non-existent user"
]
},
"USER.ITEM.CREATE": {
"id": "USER.ITEM.CREATE",
"domain": "USER",
"entity": "ITEM",
"operation": "CREATE",
"qualifiers": [],
"layers": [
"API"
],
"dependencies": [
"DB.USERS.SCHEMA"
],
"implements": [
"POST /api/users endpoint",
"Zod validation via middleware",
"Insert user into database",
"Return created user"
],
"files": [
"apps/api/src/routes/users.ts"
],
"tests": [
"Integration: Create valid user",
"Integration: Reject invalid email",
"Integration: Enforce email uniqueness"
]
},
"USER.ITEM.DELETE": {
"id": "USER.ITEM.DELETE",
"domain": "USER",
"entity": "ITEM",
"operation": "DELETE",
"qualifiers": [],
"layers": [
"API"
],
"dependencies": [
"DB.USERS.SCHEMA"
],
"implements": [
"DELETE /api/users/:id endpoint",
"Remove user from database",
"Cascade delete related posts",
"404 if user not found"
],
"files": [
"apps/api/src/routes/users.ts"
],
"tests": [
"Integration: Delete existing user",
"Integration: 404 for non-existent user",
"Integration: Verify cascade delete of posts"
]
},
"DB.POSTS.SCHEMA": {
"id": "DB.POSTS.SCHEMA",
"domain": "DB",
"entity": "POSTS",
"operation": "SCHEMA",
"qualifiers": [],
"layers": [
"DB"
],
"dependencies": [
"DB.USERS.SCHEMA"
],
"implements": [
"Post table with title, content, published status",
"Foreign key to users (author)",
"Cascade delete when user is deleted",
"Indexes on authorId and published status",
"Zod validation schemas"
],
"files": [
"packages/db/src/schema/posts.ts"
],
"tests": [
"Unit: Schema validation",
"Integration: Foreign key constraints"
]
},
"DB.USERS.SCHEMA": {
"id": "DB.USERS.SCHEMA",
"domain": "DB",
"entity": "USERS",
"operation": "SCHEMA",
"qualifiers": [],
"layers": [
"DB"
],
"dependencies": [],
"implements": [
"User table with id, email, name, timestamps",
"Email uniqueness constraint",
"Email index for fast lookups",
"Zod validation schemas"
],
"files": [
"packages/db/src/schema/users.ts"
],
"tests": [
"Unit: Schema validation",
"Integration: Database operations"
]
}
}
}