How nottee-project/note_service works
Main Components
a) API Layer:
• REST Endpoints (from /internal/delivery/rest/handler)
• Create Note
• Delete Note
• Get Note
• Notes
• Update Task
• Telegram Handler (indicating external integration)
b) Service Layer:
• Service (/internal/service/note)
• Business Logic Implementation
• Interface Definitions
c) Data Layer:
• Store Adapters (/internal/adapter/store)
• Store
• Transaction Management
• PostgreSQL Database
• Notes Table (with UUID, user references)
d) Configuration:
• Config Management (/internal/config)
• Database Configuration
• Redis Configuration
• Local Settings
Architecture Pattern
The project follows a clean architecture pattern with clear separation of concerns:
• Delivery Layer (REST API)
• Service Layer (Business Logic)
• Store Layer (Data Access)
• Models Layer (Domain Objects)
[External Clients] → [REST API Layer] → [Service Layer] → [Store Layer] → [PostgreSQL]
• ↘ [Redis]
Key Relationships to Highlight
[Client Requests] → [Middleware] → [REST Handlers]
• ↓
[Config Management] → [Service Layer] → [Store Layer]
• ↓
• [Database Layer]
Additional Elements
• Transaction boundary in the store layer
• UUID generation flow
• Foreign key relationship with users table
• Telegram integration point
Technical Details
• PostgreSQL with UUID extension
• REST API endpoints
• Transaction management
• User authentication flow (implied by user_id foreign key)
Deployment Context
• Docker container boundaries
• Configuration injection points
• External service connections
Remember to:
• Keep the main flow clear and centered
• Use consistent styling for similar components
• Notes about critical architectural decisions
• Error handling paths