Development Plan
Overview
This document provides a detailed development plan for the Inventory Management Feature. The feature serves as a central repository for defining schemas and creating instances data based on those schemas. The development is broken down into multiple phases, each focusing on specific aspects of the feature, from foundational data models to advanced integrations and testing.
Core Entities
- Schema: Defines the structure, fields, and validation rules for inventory items using JSON Schema.
- Instance: Represents a specific object based on a defined Schema, with data conforming to the rules and structure defined by the Schema.
- Relation: Defines the type of relationship between two Schemas.
- InstanceRelation: Represents a specific link between two Instances based on an existing Relation.
Development Phases Status
Phase | Description | Status |
---|---|---|
1 | Foundation & Meta-Data Definition (Schemas & Relations) | Completed Implementation. Test ongoing. |
2 | Schema and Instance Management | Completed Implementation. Test ongoing. |
3 | Relationship Management (InstanceRelations) | Ongoing |
4 | Data Change Capturing/Tracking to Inventory Entities | Ongoing |
5 | Integrations of Inventory to Specific Features & Improve Search and Filter | Ongoing |
6 | Role Browser Mappings and Access Control for Inventory | Ongoing |
7 | Deep-Dive/Advanced GenAI Integration | Not Started |
8 | Sync Mechanism with Other Repository Systems | Not Started |
9 | Visualization for Inventory Relations Management | Not Started |
10 | Testing & Documentation | Ongoing |
Development Phases
Phase 1: Foundation & Meta-Data Definition (Schemas & Relations)
- Tasks:
- Define Mongoose schemas for Schema, Instance, Relation, and InstanceRelation entities.
- Integrate JSON Schema validation for validating schema definitions and instance data.
- Testing:
- Write unit tests to validate that the Mongoose schemas enforce the correct constraints.
- Write unit tests to verify that the JSON Schema validation library correctly validates schema definitions and instance data.
Phase 2: Schema and Instance Management
- Tasks:
- Implement backend CRUD routes for the Schema entity.
- Implement backend CRUD routes for the Instance entity.
- Develop frontend CRUD UI for the Schema entity and integrate with backend APIs.
- Implement dynamic form generation in the frontend based on the JSON Schema for creating new Instance entities, including data validation, and integrate with backend.
- Develop frontend UI for listing, viewing details, updating, and deleting Instance entities, and connect with backend APIs.
- Testing:
- Write unit tests for the backend CRUD routes for Schema and Instance entities
- Write integration tests for the API endpoints to ensure they interact correctly with the database
Phase 3: Relationship Management (InstanceRelations)
- Tasks:
- Develop backend CRUD API endpoints for the Relation entity.
- Develop backend CRUD API endpoints for the InstanceRelation entity.
- Implement validation logic for InstanceRelation creation:
- Fetch the Relation using relationId.
- Fetch fromInstance and toInstance.
- Verify that the source instance matches the relation’s source schema.
- Verify that the target instance matches the relation’s target schema.
- Ensure the uniqueness of the InstanceRelation.
- Implement cascading delete logic:
- Handle related Instances and Relations when a Schema is deleted.
- Handle related InstanceRelations when an Instance is deleted.
- Handle related InstanceRelations when a Relation is deleted.
- Develop frontend UI for creating and deleting Relation entities and integrate with backend.
- Develop frontend UI for creating and deleting InstanceRelation entities, ensuring validation, and integrate with backend.
- Testing:
- Write unit tests for the backend CRUD routes for Relation and InstanceRelation entities.
- Write unit tests for the validation logic in InstanceRelation creation
- Write unit tests for the cascading delete logic
- Write integration tests for the Relation and InstanceRelation API endpoints to verify database interactions.
Phase 4: Implement Data Change Capturing/Tracking to Inventory Entities
- Tasks:
- Create a Mongoose plugin for capturing data changes
- Apply the change capture plugin to the four core entities: Schema, Instance, Relation, and InstanceRelation.
- Develop backend API routes to query the change log data.
- Implement frontend UI to view the change log and integrate with backend APIs.
- Testing:
- Write unit tests to verify that the change capture mechanism logs changes to the core entities
- Write unit tests for the backend API routes that query the change log data
- Write integration tests to ensure the change log API endpoints correctly retrieve logged data from the database.
Phase 5: Implement Integrations of Inventory to Specific Features & Improve Search and Filter
- Tasks:
- Define and design the user flow from model, staging, and other workflows to the Inventory system.
- Implement backend logic to integrate the Inventory system with other specified features.
- Define the logic and mechanism for categorizing and traversing inventory items.
- Implement a tree browser UI component for navigating hierarchical inventory structures.
- Conduct discussions and gather feedback on the current Inventory system to identify improvements and add more details to UI screens
- Provide basic integration of a GenAI service into the Inventory system.
- Testing:
- Write integration tests for the user flows between the Inventory system and other features
- Write unit tests for the logic and mechanisms for categorizing and traversing inventory items
- Write unit tests for the basic GenAI service integration
Phase 6: Implement Role Browser Mappings and Access Control for Inventory
- Tasks:
- Define the logic for mapping roles to inventory permissions.
- Develop frontend UI for managing role mappings and implement corresponding backend logic.
- Implement access control logic in the backend to enforce permissions on inventory operations.
- Develop frontend UI for managing access control settings and integrate with backend APIs.
- Testing:
- Write unit tests for the role-to-permission mapping logic
- Write unit tests for the access control logic in the backend
- Write integration tests for the role mapping and access control API endpoints to verify database interactions and permission enforcement.
Phase 7: Deep-Dive/Advanced GenAI Integration
- Tasks: To be determined (TBD).
- Testing: To be defined once tasks are specified. Will include unit and integration tests written at the end of the phase, tailored to the implemented features.
Phase 8: Implement Sync Mechanism with Other Repository Systems
- Tasks: To be determined (TBD).
- Testing: To be defined once tasks are specified. Will include unit and integration tests written at the end of the phase, tailored to the implemented features.
Phase 9: Visualization for Inventory Relations Management
- Tasks: To be determined (TBD).
- Testing: To be defined once tasks are specified. Will include unit and integration tests written at the end of the phase, tailored to the implemented features.
Phase 10: Comprehensive Testing & Documentation
- Tasks:
- Execute all unit and integration tests developed in previous phases to ensure the entire system functions as expected.
- Write additional unit and integration tests for edge cases, performance, security, and any gaps not covered in phase-specific tests.
- Document API endpoints using tools like Swagger/OpenAPI, including request/response formats, parameters, and authentication requirements.
- Document the data model, including diagrams or descriptions of the four entities (Schema, Instance, Relation, InstanceRelation) and their relationships, as well as validation rules and constraints.
- Testing Focus:
- Run the full test suite from all phases.
- Address any remaining testing needs