mirror of https://github.com/buster-so/buster.git
ok api project is completed
This commit is contained in:
parent
4000e8409f
commit
ed60e7ebd9
|
@ -7,6 +7,20 @@ status: Draft
|
||||||
|
|
||||||
# Dashboard REST Endpoints Implementation Plan
|
# Dashboard REST Endpoints Implementation Plan
|
||||||
|
|
||||||
|
## Problem Statement
|
||||||
|
|
||||||
|
The dashboard functionality in our application currently has limited REST API support. While we have endpoints for listing and retrieving dashboards, we lack the ability to create, update, and delete dashboards through the REST API. This limitation prevents users from programmatically managing their dashboards, which is a critical feature for automation and integration with other systems.
|
||||||
|
|
||||||
|
## Proposed Solution
|
||||||
|
|
||||||
|
Implement a complete set of REST endpoints for dashboard management:
|
||||||
|
|
||||||
|
1. **Create Dashboard** (POST /dashboards)
|
||||||
|
2. **Update Dashboard** (PUT /dashboards/:id)
|
||||||
|
3. **Delete Dashboard** (DELETE /dashboards/:id)
|
||||||
|
|
||||||
|
These endpoints will complement the existing GET endpoints and provide full CRUD functionality for dashboards.
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This document outlines the implementation plan for completing the dashboard REST endpoints. It details the order in which tasks should be completed, identifies dependencies between tasks, and highlights opportunities for parallel development.
|
This document outlines the implementation plan for completing the dashboard REST endpoints. It details the order in which tasks should be completed, identifies dependencies between tasks, and highlights opportunities for parallel development.
|
||||||
|
@ -23,14 +37,14 @@ The implementation is divided into phases based on dependencies and complexity.
|
||||||
|
|
||||||
### Phase 1: Core Implementation (Week 1)
|
### Phase 1: Core Implementation (Week 1)
|
||||||
|
|
||||||
**Tasks that can be done concurrently:**
|
**PRDs that can be worked on concurrently:**
|
||||||
|
|
||||||
- Create Dashboard Endpoint
|
- [Create Dashboard Endpoint](mdc:prds/active/api_dashboard_create_endpoint.md)
|
||||||
- Implement business logic handler
|
- Implement business logic handler
|
||||||
- Implement REST handler
|
- Implement REST handler
|
||||||
- Update module files
|
- Update module files
|
||||||
|
|
||||||
- Delete Dashboard Endpoint
|
- [Delete Dashboard Endpoint](mdc:prds/active/api_dashboard_delete_endpoint.md)
|
||||||
- Implement business logic handler
|
- Implement business logic handler
|
||||||
- Implement REST handler
|
- Implement REST handler
|
||||||
- Update module files
|
- Update module files
|
||||||
|
@ -44,9 +58,9 @@ The implementation is divided into phases based on dependencies and complexity.
|
||||||
|
|
||||||
### Phase 2: Complex Implementation (Week 1-2)
|
### Phase 2: Complex Implementation (Week 1-2)
|
||||||
|
|
||||||
**Tasks:**
|
**PRD to implement:**
|
||||||
|
|
||||||
- Update Dashboard Endpoint
|
- [Update Dashboard Endpoint](mdc:prds/active/api_dashboard_update_endpoint.md)
|
||||||
- Implement business logic handler
|
- Implement business logic handler
|
||||||
- Implement REST handler
|
- Implement REST handler
|
||||||
- Update module files
|
- Update module files
|
||||||
|
@ -63,14 +77,14 @@ The implementation is divided into phases based on dependencies and complexity.
|
||||||
**Tasks that can be done concurrently:**
|
**Tasks that can be done concurrently:**
|
||||||
|
|
||||||
- Unit Tests for all endpoints
|
- Unit Tests for all endpoints
|
||||||
- Create Dashboard tests
|
- [Create Dashboard](mdc:prds/active/api_dashboard_create_endpoint.md) tests
|
||||||
- Update Dashboard tests
|
- [Update Dashboard](mdc:prds/active/api_dashboard_update_endpoint.md) tests
|
||||||
- Delete Dashboard tests
|
- [Delete Dashboard](mdc:prds/active/api_dashboard_delete_endpoint.md) tests
|
||||||
|
|
||||||
- Integration Tests for all endpoints
|
- Integration Tests for all endpoints
|
||||||
- Create Dashboard tests
|
- [Create Dashboard](mdc:prds/active/api_dashboard_create_endpoint.md) tests
|
||||||
- Update Dashboard tests
|
- [Update Dashboard](mdc:prds/active/api_dashboard_update_endpoint.md) tests
|
||||||
- Delete Dashboard tests
|
- [Delete Dashboard](mdc:prds/active/api_dashboard_delete_endpoint.md) tests
|
||||||
|
|
||||||
**Rationale:**
|
**Rationale:**
|
||||||
- Tests can be developed in parallel once the endpoints are implemented
|
- Tests can be developed in parallel once the endpoints are implemented
|
||||||
|
@ -81,7 +95,6 @@ The implementation is divided into phases based on dependencies and complexity.
|
||||||
### Phase 4: Documentation and Finalization (Week 2)
|
### Phase 4: Documentation and Finalization (Week 2)
|
||||||
|
|
||||||
**Tasks:**
|
**Tasks:**
|
||||||
|
|
||||||
- API Documentation
|
- API Documentation
|
||||||
- Manual Testing
|
- Manual Testing
|
||||||
- Code Review
|
- Code Review
|
||||||
|
@ -89,23 +102,35 @@ The implementation is divided into phases based on dependencies and complexity.
|
||||||
|
|
||||||
**Estimated completion time:** 1-2 days
|
**Estimated completion time:** 1-2 days
|
||||||
|
|
||||||
|
## Implementation Details
|
||||||
|
|
||||||
|
Each endpoint will be implemented as a separate REST handler with a corresponding business logic handler. The implementation will follow our established patterns for REST endpoints and handlers.
|
||||||
|
|
||||||
|
### Technical Stack
|
||||||
|
|
||||||
|
- Rust programming language
|
||||||
|
- Actix-web framework for REST endpoints
|
||||||
|
- PostgreSQL database for storage
|
||||||
|
- Existing dashboard models and types
|
||||||
|
- Sharing library components (for ShareRequest handling)
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
### Create Dashboard Endpoint
|
### [Create Dashboard Endpoint](mdc:prds/active/api_dashboard_create_endpoint.md)
|
||||||
- Dependencies: None
|
- Dependencies: None
|
||||||
- Required for: Update and Delete endpoints (for testing)
|
- Required for: Update and Delete endpoints (for testing)
|
||||||
|
|
||||||
### Update Dashboard Endpoint
|
### [Update Dashboard Endpoint](mdc:prds/active/api_dashboard_update_endpoint.md)
|
||||||
- Dependencies: Existing dashboard retrieval logic
|
- Dependencies: Existing dashboard retrieval logic
|
||||||
- Benefits from: Create Dashboard endpoint
|
- Benefits from: Create Dashboard endpoint
|
||||||
|
|
||||||
### Delete Dashboard Endpoint
|
### [Delete Dashboard Endpoint](mdc:prds/active/api_dashboard_delete_endpoint.md)
|
||||||
- Dependencies: Existing dashboard retrieval logic
|
- Dependencies: Existing dashboard retrieval logic
|
||||||
- Benefits from: Create Dashboard endpoint (for testing)
|
- Benefits from: Create Dashboard endpoint (for testing)
|
||||||
|
|
||||||
## Parallel Development Opportunities
|
## Parallel Development Opportunities
|
||||||
|
|
||||||
1. **Create and Delete endpoints** can be developed simultaneously by different developers
|
1. **[Create Dashboard](mdc:prds/active/api_dashboard_create_endpoint.md) and [Delete Dashboard](mdc:prds/active/api_dashboard_delete_endpoint.md) endpoints** can be developed simultaneously by different developers
|
||||||
2. **Unit tests** can be developed alongside the endpoint implementation
|
2. **Unit tests** can be developed alongside the endpoint implementation
|
||||||
3. **Integration tests** can be started once the endpoints are functional
|
3. **Integration tests** can be started once the endpoints are functional
|
||||||
|
|
||||||
|
@ -113,17 +138,17 @@ The implementation is divided into phases based on dependencies and complexity.
|
||||||
|
|
||||||
### Single Developer Plan
|
### Single Developer Plan
|
||||||
If one developer is working on all endpoints:
|
If one developer is working on all endpoints:
|
||||||
1. Implement Create Dashboard endpoint
|
1. Implement [Create Dashboard](mdc:prds/active/api_dashboard_create_endpoint.md) endpoint
|
||||||
2. Implement Delete Dashboard endpoint
|
2. Implement [Delete Dashboard](mdc:prds/active/api_dashboard_delete_endpoint.md) endpoint
|
||||||
3. Implement Update Dashboard endpoint
|
3. Implement [Update Dashboard](mdc:prds/active/api_dashboard_update_endpoint.md) endpoint
|
||||||
4. Develop all tests
|
4. Develop all tests
|
||||||
5. Complete documentation and finalization
|
5. Complete documentation and finalization
|
||||||
|
|
||||||
### Multiple Developer Plan
|
### Multiple Developer Plan
|
||||||
If multiple developers are available:
|
If multiple developers are available:
|
||||||
- Developer 1: Create Dashboard endpoint + tests
|
- Developer 1: [Create Dashboard](mdc:prds/active/api_dashboard_create_endpoint.md) endpoint + tests
|
||||||
- Developer 2: Delete Dashboard endpoint + tests
|
- Developer 2: [Delete Dashboard](mdc:prds/active/api_dashboard_delete_endpoint.md) endpoint + tests
|
||||||
- Developer 3: Update Dashboard endpoint + tests
|
- Developer 3: [Update Dashboard](mdc:prds/active/api_dashboard_update_endpoint.md) endpoint + tests
|
||||||
- All: Documentation and finalization
|
- All: Documentation and finalization
|
||||||
|
|
||||||
## Risk Assessment
|
## Risk Assessment
|
||||||
|
@ -150,7 +175,7 @@ If multiple developers are available:
|
||||||
|
|
||||||
2. **Dependency Delays**
|
2. **Dependency Delays**
|
||||||
- Risk: Delays in one endpoint affecting others
|
- Risk: Delays in one endpoint affecting others
|
||||||
- Mitigation: Prioritize Create endpoint, use mock responses for testing
|
- Mitigation: Prioritize [Create Dashboard](mdc:prds/active/api_dashboard_create_endpoint.md) endpoint, use mock responses for testing
|
||||||
|
|
||||||
## Success Criteria
|
## Success Criteria
|
||||||
|
|
||||||
|
|
|
@ -1,78 +0,0 @@
|
||||||
---
|
|
||||||
title: Dashboard REST Endpoints
|
|
||||||
author: Cascade
|
|
||||||
date: 2025-03-19
|
|
||||||
status: Draft
|
|
||||||
---
|
|
||||||
|
|
||||||
# Dashboard REST Endpoints
|
|
||||||
|
|
||||||
## Problem Statement
|
|
||||||
|
|
||||||
The dashboard functionality in our application currently has limited REST API support. While we have endpoints for listing and retrieving dashboards, we lack the ability to create, update, and delete dashboards through the REST API. This limitation prevents users from programmatically managing their dashboards, which is a critical feature for automation and integration with other systems.
|
|
||||||
|
|
||||||
## Proposed Solution
|
|
||||||
|
|
||||||
Implement a complete set of REST endpoints for dashboard management:
|
|
||||||
|
|
||||||
1. **Create Dashboard** - POST /dashboards
|
|
||||||
2. **Update Dashboard** - PUT /dashboards/:id
|
|
||||||
3. **Delete Dashboard** - DELETE /dashboards/:id
|
|
||||||
|
|
||||||
These endpoints will complement the existing GET endpoints and provide full CRUD functionality for dashboards.
|
|
||||||
|
|
||||||
## Implementation Plan
|
|
||||||
|
|
||||||
The implementation will be divided into three phases, which can be worked on concurrently:
|
|
||||||
|
|
||||||
### Phase 1: Create Dashboard Endpoint
|
|
||||||
- Implement POST /dashboards endpoint
|
|
||||||
- Create handler for dashboard creation
|
|
||||||
- Add tests for the endpoint
|
|
||||||
|
|
||||||
### Phase 2: Update Dashboard Endpoint
|
|
||||||
- Implement PUT /dashboards/:id endpoint
|
|
||||||
- Create handler for dashboard updates
|
|
||||||
- Add tests for the endpoint
|
|
||||||
|
|
||||||
### Phase 3: Delete Dashboard Endpoint
|
|
||||||
- Implement DELETE /dashboards/:id endpoint
|
|
||||||
- Create handler for dashboard deletion
|
|
||||||
- Add tests for the endpoint
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
|
|
||||||
- Existing dashboard models and types
|
|
||||||
- Database schema for dashboard_files
|
|
||||||
- Authentication middleware
|
|
||||||
- Sharing library components (for ShareRequest handling)
|
|
||||||
|
|
||||||
## Success Criteria
|
|
||||||
|
|
||||||
1. All endpoints return appropriate status codes and responses
|
|
||||||
2. Endpoints handle error cases gracefully
|
|
||||||
3. All endpoints pass their test cases
|
|
||||||
4. Endpoints integrate with the existing dashboard functionality
|
|
||||||
|
|
||||||
## Implementation Details
|
|
||||||
|
|
||||||
Each endpoint will be implemented as a separate REST handler with a corresponding business logic handler. The implementation will follow our established patterns for REST endpoints and handlers.
|
|
||||||
|
|
||||||
## Timeline
|
|
||||||
|
|
||||||
All phases can be worked on concurrently, with an estimated completion time of 1-2 weeks.
|
|
||||||
|
|
||||||
## Risks and Mitigation
|
|
||||||
|
|
||||||
- **Risk**: Database schema changes might be required
|
|
||||||
- **Mitigation**: Review schema before implementation and plan any migrations
|
|
||||||
|
|
||||||
- **Risk**: Integration with sharing functionality might be complex
|
|
||||||
- **Mitigation**: Leverage existing sharing library components
|
|
||||||
|
|
||||||
## Appendix
|
|
||||||
|
|
||||||
See individual PRDs for detailed implementation plans for each endpoint:
|
|
||||||
- [Create Dashboard Endpoint](mdc:prds/active/api_dashboard_create_endpoint.md)
|
|
||||||
- [Update Dashboard Endpoint](mdc:prds/active/api_dashboard_update_endpoint.md)
|
|
||||||
- [Delete Dashboard Endpoint](mdc:prds/active/api_dashboard_delete_endpoint.md)
|
|
Loading…
Reference in New Issue