Skip to content

Commit 40ca5b1

Browse files
committed
docs(README): refine Data API description for clarity and conciseness
- Restructured the explanation of Unified Endpoint Design and Registry-Based Architecture - Introduced concepts of Unified Data Gateway and Metadata-Driven Engine - Enhanced clarity on advantage points and development process
1 parent 48ba99b commit 40ca5b1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ Click on any category to explore.
5656
<summary><strong>📦 Dynamic Content & Data API</strong></summary>
5757

5858
### ⚙️ Generic & Extensible Data API
59-
- **Unified Endpoint Design:** A single, powerful set of RESTful endpoints (`/api/v1/data`) handles all CRUD operations for every data model in the system, driven by a `?model=` query parameter.
60-
- **Registry-Based Architecture:** The API's extensibility is powered by two core components:
61-
- **`ModelRegistry`**: Maps a model name (e.g., `"headline"`) to a `ModelConfig` that defines its metadata: how to deserialize it from JSON, how to extract its ID, and the specific authorization rules for every action (Create, Read, Update, Delete).
62-
- **`DataOperationRegistry`**: Maps the same model name to the concrete functions that perform the CRUD operations, connecting the generic route to the specific `DataRepository<T>` for that model.
63-
> **Your Advantage:** This architecture is incredibly easy to maintain and extend. Adding new data types is as simple as updating two registry files, making development fast, consistent, and requiring minimal code.
59+
- **Unified Data Gateway:** A single, powerful set of RESTful endpoints (`/api/v1/data`) serves as a central gateway for all data operations. It uses a simple `?model=` query parameter to dynamically handle CRUD requests for any data type in the system—Headlines, Topics, User Preferences, and more.
60+
- **Metadata-Driven Engine:** Instead of hardcoding routes for each data type, the API uses a central registry. This registry defines everything about a model—its permissions, validation rules, and how it connects to the database—in one place.
61+
> **Your Advantage:** This architecture is incredibly clean and scalable. Adding a completely new data type to your application, with its own unique permissions and logic, doesn't require writing new boilerplate API routes. You simply define its metadata in the central registry, and the generic endpoint handles the rest, dramatically speeding up development and reducing code duplication.
6462
6563
---
6664

0 commit comments

Comments
 (0)