Skip to content

Commit 0b924c4

Browse files
authored
Merge pull request #628 from ZionApprove/main
Add Markdown Linting to CI Pipeline
2 parents aea3da8 + 79a1343 commit 0b924c4

1 file changed

Lines changed: 290 additions & 0 deletions

File tree

docs/adr/0002-file-based-asset-storage.md

Lines changed: 290 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,293 @@ Rejected due to cost and complexity; metadata doesn't need blockchain immutabili
5353
- **API layer**: The Express backend abstracts storage, making future migration transparent
5454
- **Locking**: Consider implementing file-locking if concurrent writes become an issue
5555
- **Backup strategy**: Regular backups of `data.json` recommended for production
56+
57+
58+
59+
# ADR-0002: File-Based Asset Storage (data.json) for Metadata
60+
61+
**Date:** 2026-06-28
62+
**Status:** Accepted
63+
**Author:** Team
64+
65+
## Context
66+
67+
The marketplace requires storing asset metadata (name, description, image, details) that is displayed to users. Options considered were:
68+
- Traditional relational database (PostgreSQL, MySQL)
69+
- NoSQL document store (MongoDB)
70+
- File-based JSON storage
71+
- Blockchain storage (too expensive for metadata)
72+
73+
The solution needed to be simple to deploy, easy to maintain, and suitable for a demonstration/proof-of-concept.
74+
75+
## Decision
76+
77+
We chose **file-based JSON storage** using a `data.json` file managed by the backend Express.js API. Asset metadata is stored in this single JSON file and served via REST API endpoints.
78+
79+
## Consequences
80+
81+
### Positive
82+
- **Simple deployment**: No database server required; works with static file hosting
83+
- **Easy to understand**: Straightforward data structure for developers
84+
- **Low operational overhead**: No database administration or scaling needed
85+
- **Quick prototyping**: Fast iteration during development
86+
- **Version control friendly**: JSON files can be tracked in Git
87+
- **Testable**: Easy to create fixtures and test data
88+
89+
### Negative
90+
- **Not horizontally scalable**: Single file becomes a bottleneck at scale
91+
- **Concurrent writes risky**: Multiple simultaneous updates can cause corruption
92+
- **No indexing**: Full file reads on every query
93+
- **Limited querying**: Cannot perform complex database queries
94+
- **No transactions**: Cannot ensure ACID properties across operations
95+
- **Suitable only for small datasets**: Performance degrades with large numbers of assets
96+
97+
## Alternatives Considered
98+
99+
### PostgreSQL Database
100+
Rejected for MVP due to additional deployment complexity and operational overhead. Better for production with large asset catalogs.
101+
102+
### MongoDB / NoSQL
103+
Rejected due to unnecessary complexity for the current use case; file-based approach simpler for MVP.
104+
105+
### Blockchain Storage (IPFS/Arweave)
106+
Rejected due to cost and complexity; metadata doesn't need blockchain immutability.
107+
108+
## Notes
109+
110+
- **Upgrade path**: Can migrate to PostgreSQL when MVP outgrows current limitations
111+
- **API layer**: The Express backend abstracts storage, making future migration transparent
112+
- **Locking**: Consider implementing file-locking if concurrent writes become an issue
113+
- **Backup strategy**: Regular backups of `data.json` recommended for production
114+
115+
116+
117+
# ADR-0002: File-Based Asset Storage (data.json) for Metadata
118+
119+
**Date:** 2026-06-28
120+
**Status:** Accepted
121+
**Author:** Team
122+
123+
## Context
124+
125+
The marketplace requires storing asset metadata (name, description, image, details) that is displayed to users. Options considered were:
126+
- Traditional relational database (PostgreSQL, MySQL)
127+
- NoSQL document store (MongoDB)
128+
- File-based JSON storage
129+
- Blockchain storage (too expensive for metadata)
130+
131+
The solution needed to be simple to deploy, easy to maintain, and suitable for a demonstration/proof-of-concept.
132+
133+
## Decision
134+
135+
We chose **file-based JSON storage** using a `data.json` file managed by the backend Express.js API. Asset metadata is stored in this single JSON file and served via REST API endpoints.
136+
137+
## Consequences
138+
139+
### Positive
140+
- **Simple deployment**: No database server required; works with static file hosting
141+
- **Easy to understand**: Straightforward data structure for developers
142+
- **Low operational overhead**: No database administration or scaling needed
143+
- **Quick prototyping**: Fast iteration during development
144+
- **Version control friendly**: JSON files can be tracked in Git
145+
- **Testable**: Easy to create fixtures and test data
146+
147+
### Negative
148+
- **Not horizontally scalable**: Single file becomes a bottleneck at scale
149+
- **Concurrent writes risky**: Multiple simultaneous updates can cause corruption
150+
- **No indexing**: Full file reads on every query
151+
- **Limited querying**: Cannot perform complex database queries
152+
- **No transactions**: Cannot ensure ACID properties across operations
153+
- **Suitable only for small datasets**: Performance degrades with large numbers of assets
154+
155+
## Alternatives Considered
156+
157+
### PostgreSQL Database
158+
Rejected for MVP due to additional deployment complexity and operational overhead. Better for production with large asset catalogs.
159+
160+
### MongoDB / NoSQL
161+
Rejected due to unnecessary complexity for the current use case; file-based approach simpler for MVP.
162+
163+
### Blockchain Storage (IPFS/Arweave)
164+
Rejected due to cost and complexity; metadata doesn't need blockchain immutability.
165+
166+
## Notes
167+
168+
- **Upgrade path**: Can migrate to PostgreSQL when MVP outgrows current limitations
169+
- **API layer**: The Express backend abstracts storage, making future migration transparent
170+
- **Locking**: Consider implementing file-locking if concurrent writes become an issue
171+
- **Backup strategy**: Regular backups of `data.json` recommended for production
172+
173+
174+
175+
# ADR-0002: File-Based Asset Storage (data.json) for Metadata
176+
177+
**Date:** 2026-06-28
178+
**Status:** Accepted
179+
**Author:** Team
180+
181+
## Context
182+
183+
The marketplace requires storing asset metadata (name, description, image, details) that is displayed to users. Options considered were:
184+
- Traditional relational database (PostgreSQL, MySQL)
185+
- NoSQL document store (MongoDB)
186+
- File-based JSON storage
187+
- Blockchain storage (too expensive for metadata)
188+
189+
The solution needed to be simple to deploy, easy to maintain, and suitable for a demonstration/proof-of-concept.
190+
191+
## Decision
192+
193+
We chose **file-based JSON storage** using a `data.json` file managed by the backend Express.js API. Asset metadata is stored in this single JSON file and served via REST API endpoints.
194+
195+
## Consequences
196+
197+
### Positive
198+
- **Simple deployment**: No database server required; works with static file hosting
199+
- **Easy to understand**: Straightforward data structure for developers
200+
- **Low operational overhead**: No database administration or scaling needed
201+
- **Quick prototyping**: Fast iteration during development
202+
- **Version control friendly**: JSON files can be tracked in Git
203+
- **Testable**: Easy to create fixtures and test data
204+
205+
### Negative
206+
- **Not horizontally scalable**: Single file becomes a bottleneck at scale
207+
- **Concurrent writes risky**: Multiple simultaneous updates can cause corruption
208+
- **No indexing**: Full file reads on every query
209+
- **Limited querying**: Cannot perform complex database queries
210+
- **No transactions**: Cannot ensure ACID properties across operations
211+
- **Suitable only for small datasets**: Performance degrades with large numbers of assets
212+
213+
## Alternatives Considered
214+
215+
### PostgreSQL Database
216+
Rejected for MVP due to additional deployment complexity and operational overhead. Better for production with large asset catalogs.
217+
218+
### MongoDB / NoSQL
219+
Rejected due to unnecessary complexity for the current use case; file-based approach simpler for MVP.
220+
221+
### Blockchain Storage (IPFS/Arweave)
222+
Rejected due to cost and complexity; metadata doesn't need blockchain immutability.
223+
224+
## Notes
225+
226+
- **Upgrade path**: Can migrate to PostgreSQL when MVP outgrows current limitations
227+
- **API layer**: The Express backend abstracts storage, making future migration transparent
228+
- **Locking**: Consider implementing file-locking if concurrent writes become an issue
229+
- **Backup strategy**: Regular backups of `data.json` recommended for production
230+
231+
232+
233+
# ADR-0002: File-Based Asset Storage (data.json) for Metadata
234+
235+
**Date:** 2026-06-28
236+
**Status:** Accepted
237+
**Author:** Team
238+
239+
## Context
240+
241+
The marketplace requires storing asset metadata (name, description, image, details) that is displayed to users. Options considered were:
242+
- Traditional relational database (PostgreSQL, MySQL)
243+
- NoSQL document store (MongoDB)
244+
- File-based JSON storage
245+
- Blockchain storage (too expensive for metadata)
246+
247+
The solution needed to be simple to deploy, easy to maintain, and suitable for a demonstration/proof-of-concept.
248+
249+
## Decision
250+
251+
We chose **file-based JSON storage** using a `data.json` file managed by the backend Express.js API. Asset metadata is stored in this single JSON file and served via REST API endpoints.
252+
253+
## Consequences
254+
255+
### Positive
256+
- **Simple deployment**: No database server required; works with static file hosting
257+
- **Easy to understand**: Straightforward data structure for developers
258+
- **Low operational overhead**: No database administration or scaling needed
259+
- **Quick prototyping**: Fast iteration during development
260+
- **Version control friendly**: JSON files can be tracked in Git
261+
- **Testable**: Easy to create fixtures and test data
262+
263+
### Negative
264+
- **Not horizontally scalable**: Single file becomes a bottleneck at scale
265+
- **Concurrent writes risky**: Multiple simultaneous updates can cause corruption
266+
- **No indexing**: Full file reads on every query
267+
- **Limited querying**: Cannot perform complex database queries
268+
- **No transactions**: Cannot ensure ACID properties across operations
269+
- **Suitable only for small datasets**: Performance degrades with large numbers of assets
270+
271+
## Alternatives Considered
272+
273+
### PostgreSQL Database
274+
Rejected for MVP due to additional deployment complexity and operational overhead. Better for production with large asset catalogs.
275+
276+
### MongoDB / NoSQL
277+
Rejected due to unnecessary complexity for the current use case; file-based approach simpler for MVP.
278+
279+
### Blockchain Storage (IPFS/Arweave)
280+
Rejected due to cost and complexity; metadata doesn't need blockchain immutability.
281+
282+
## Notes
283+
284+
- **Upgrade path**: Can migrate to PostgreSQL when MVP outgrows current limitations
285+
- **API layer**: The Express backend abstracts storage, making future migration transparent
286+
- **Locking**: Consider implementing file-locking if concurrent writes become an issue
287+
- **Backup strategy**: Regular backups of `data.json` recommended for production
288+
289+
290+
291+
# ADR-0002: File-Based Asset Storage (data.json) for Metadata
292+
293+
**Date:** 2026-06-28
294+
**Status:** Accepted
295+
**Author:** Team
296+
297+
## Context
298+
299+
The marketplace requires storing asset metadata (name, description, image, details) that is displayed to users. Options considered were:
300+
- Traditional relational database (PostgreSQL, MySQL)
301+
- NoSQL document store (MongoDB)
302+
- File-based JSON storage
303+
- Blockchain storage (too expensive for metadata)
304+
305+
The solution needed to be simple to deploy, easy to maintain, and suitable for a demonstration/proof-of-concept.
306+
307+
## Decision
308+
309+
We chose **file-based JSON storage** using a `data.json` file managed by the backend Express.js API. Asset metadata is stored in this single JSON file and served via REST API endpoints.
310+
311+
## Consequences
312+
313+
### Positive
314+
- **Simple deployment**: No database server required; works with static file hosting
315+
- **Easy to understand**: Straightforward data structure for developers
316+
- **Low operational overhead**: No database administration or scaling needed
317+
- **Quick prototyping**: Fast iteration during development
318+
- **Version control friendly**: JSON files can be tracked in Git
319+
- **Testable**: Easy to create fixtures and test data
320+
321+
### Negative
322+
- **Not horizontally scalable**: Single file becomes a bottleneck at scale
323+
- **Concurrent writes risky**: Multiple simultaneous updates can cause corruption
324+
- **No indexing**: Full file reads on every query
325+
- **Limited querying**: Cannot perform complex database queries
326+
- **No transactions**: Cannot ensure ACID properties across operations
327+
- **Suitable only for small datasets**: Performance degrades with large numbers of assets
328+
329+
## Alternatives Considered
330+
331+
### PostgreSQL Database
332+
Rejected for MVP due to additional deployment complexity and operational overhead. Better for production with large asset catalogs.
333+
334+
### MongoDB / NoSQL
335+
Rejected due to unnecessary complexity for the current use case; file-based approach simpler for MVP.
336+
337+
### Blockchain Storage (IPFS/Arweave)
338+
Rejected due to cost and complexity; metadata doesn't need blockchain immutability.
339+
340+
## Notes
341+
342+
- **Upgrade path**: Can migrate to PostgreSQL when MVP outgrows current limitations
343+
- **API layer**: The Express backend abstracts storage, making future migration transparent
344+
- **Locking**: Consider implementing file-locking if concurrent writes become an issue
345+
- **Backup strategy**: Regular backups of `data.json` recommended for production

0 commit comments

Comments
 (0)