Reamde updatwed
This commit is contained in:
parent
26f601f01a
commit
a911c9077f
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="PyInterpreterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
|
<option name="ignoredPackages">
|
||||||
|
<value>
|
||||||
|
<list size="21">
|
||||||
|
<item index="0" class="java.lang.String" itemvalue="rsa" />
|
||||||
|
<item index="1" class="java.lang.String" itemvalue="pydantic" />
|
||||||
|
<item index="2" class="java.lang.String" itemvalue="alembic" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="starlette-context" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="pymongo" />
|
||||||
|
<item index="5" class="java.lang.String" itemvalue="arrow" />
|
||||||
|
<item index="6" class="java.lang.String" itemvalue="unidecode" />
|
||||||
|
<item index="7" class="java.lang.String" itemvalue="python-dotenv" />
|
||||||
|
<item index="8" class="java.lang.String" itemvalue="psycopg2-binary" />
|
||||||
|
<item index="9" class="java.lang.String" itemvalue="cryptography" />
|
||||||
|
<item index="10" class="java.lang.String" itemvalue="requests" />
|
||||||
|
<item index="11" class="java.lang.String" itemvalue="redis" />
|
||||||
|
<item index="12" class="java.lang.String" itemvalue="sqlalchemy" />
|
||||||
|
<item index="13" class="java.lang.String" itemvalue="pandas" />
|
||||||
|
<item index="14" class="java.lang.String" itemvalue="fastapi" />
|
||||||
|
<item index="15" class="java.lang.String" itemvalue="Deprecated" />
|
||||||
|
<item index="16" class="java.lang.String" itemvalue="faker" />
|
||||||
|
<item index="17" class="java.lang.String" itemvalue="textdistance" />
|
||||||
|
<item index="18" class="java.lang.String" itemvalue="uvicorn" />
|
||||||
|
<item index="19" class="java.lang.String" itemvalue="redmail" />
|
||||||
|
<item index="20" class="java.lang.String" itemvalue="sqlalchemy-mixins" />
|
||||||
|
</list>
|
||||||
|
</value>
|
||||||
|
</option>
|
||||||
|
</inspection_tool>
|
||||||
|
</profile>
|
||||||
|
</component>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (hag_collector_api)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/wag-managment-api-service-latest.iml" filepath="$PROJECT_DIR$/.idea/wag-managment-api-service-latest.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="jdk" jdkName="Python 3.10 (hag_collector_api)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
171
README copy.md
171
README copy.md
|
|
@ -1,171 +0,0 @@
|
||||||
# WAG Management API Service v4
|
|
||||||
|
|
||||||
This service provides a comprehensive API for managing WAG (Wide Area Gateway) systems. It handles configuration, monitoring, and control operations for WAG devices in the network infrastructure.
|
|
||||||
|
|
||||||
## Quick Start
|
|
||||||
|
|
||||||
To run the tests using Docker Compose:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker compose -f docker-compose.test.yml up --build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Project Structure
|
|
||||||
|
|
||||||
### Core Services and Components
|
|
||||||
|
|
||||||
- `Services/` - Core service implementations
|
|
||||||
- `PostgresDb/` - PostgreSQL database operations and models
|
|
||||||
- `MongoDb/` - MongoDB operations and document models
|
|
||||||
- `Redis/` - Redis caching and session management
|
|
||||||
- `Email/` - Email notification service
|
|
||||||
|
|
||||||
- `ApiValidations/` - Request validation and data sanitization
|
|
||||||
- Input validation rules
|
|
||||||
- Data sanitization filters
|
|
||||||
- Schema validation middleware
|
|
||||||
|
|
||||||
- `ApiLibrary/` - Common utilities and helper functions
|
|
||||||
- Shared functions and utilities
|
|
||||||
- Common constants and configurations
|
|
||||||
- Helper classes and decorators
|
|
||||||
|
|
||||||
### Configuration and Settings
|
|
||||||
|
|
||||||
- `AllConfigs/` - Configuration management
|
|
||||||
- Database configurations
|
|
||||||
- Service settings
|
|
||||||
- Environment-specific configs
|
|
||||||
|
|
||||||
- `Schemas/` - Data models and schema definitions
|
|
||||||
- Request/Response models
|
|
||||||
- Database schemas
|
|
||||||
- API contract definitions
|
|
||||||
|
|
||||||
### Docker and Deployment
|
|
||||||
|
|
||||||
- `DockerApiServices/` - API service Docker configurations
|
|
||||||
- API service Dockerfile
|
|
||||||
- Service dependencies
|
|
||||||
|
|
||||||
- `DockerStoreServices/` - Storage service Docker configurations
|
|
||||||
- Database service Dockerfiles
|
|
||||||
- Storage service dependencies
|
|
||||||
|
|
||||||
### Error Handling and Events
|
|
||||||
|
|
||||||
- `ErrorHandlers/` - Error handling and exception management
|
|
||||||
- Custom exceptions
|
|
||||||
- Error handlers
|
|
||||||
- Exception middleware
|
|
||||||
|
|
||||||
- `ApiEvents/` - Event handling and processing
|
|
||||||
- Event listeners
|
|
||||||
- Event dispatchers
|
|
||||||
- Message queue handlers
|
|
||||||
|
|
||||||
### Language and Testing
|
|
||||||
|
|
||||||
- `LanguageModels/` - Localization and language support
|
|
||||||
- Language files
|
|
||||||
- Translation models
|
|
||||||
- i18n configurations
|
|
||||||
|
|
||||||
- `Ztest/` - Test suite
|
|
||||||
- Unit tests
|
|
||||||
- Integration tests
|
|
||||||
- Test fixtures and utilities
|
|
||||||
|
|
||||||
### Additional Components
|
|
||||||
|
|
||||||
- `scripts/` - Utility scripts and tools
|
|
||||||
- Deployment scripts
|
|
||||||
- Database migrations
|
|
||||||
- Maintenance utilities
|
|
||||||
|
|
||||||
|
|
||||||
use arcjet @frontend
|
|
||||||
|
|
||||||
## Architecture Overview
|
|
||||||
|
|
||||||
This project follows a layered architecture with three core services:
|
|
||||||
|
|
||||||
### Core Services
|
|
||||||
1. **AuthServiceApi**: Authentication and authorization
|
|
||||||
2. **EventServiceApi**: Event processing and management
|
|
||||||
3. **ValidationServiceApi**: Input and schema validation
|
|
||||||
|
|
||||||
### System Layers
|
|
||||||
- **Dependencies Layer**: External dependencies and requirements
|
|
||||||
- **Application Layer**: Core business logic
|
|
||||||
- **Service Layer**: API implementations
|
|
||||||
- **Test Layer**: Testing infrastructure
|
|
||||||
- **Dev Layer**: Development utilities
|
|
||||||
- **Root Layer**: Configuration and documentation
|
|
||||||
|
|
||||||
For detailed architecture documentation, see [System Architecture](docs/architecture/system_architecture.md).
|
|
||||||
|
|
||||||
## Suggested Improvements
|
|
||||||
|
|
||||||
The following improvements have been identified to enhance the system:
|
|
||||||
|
|
||||||
### Infrastructure & Deployment
|
|
||||||
- **Service Isolation**: Containerize core services (Auth, Event, Validation)
|
|
||||||
- **API Gateway**: Add gateway layer for rate limiting, versioning, and security
|
|
||||||
- **Monitoring**: Implement distributed tracing and metrics collection
|
|
||||||
- **Configuration**: Move to centralized configuration service with feature flags
|
|
||||||
|
|
||||||
### Performance & Scaling
|
|
||||||
- **Caching Strategy**: Enhance Redis implementation with invalidation patterns
|
|
||||||
- **Database**: Implement sharding and read replicas
|
|
||||||
- **Event System**: Add message queue (RabbitMQ/Kafka) for event handling
|
|
||||||
- **Background Jobs**: Implement job processing and connection pooling
|
|
||||||
|
|
||||||
### Security & Reliability
|
|
||||||
- **API Security**: Implement key rotation and rate limiting
|
|
||||||
- **Error Handling**: Add centralized tracking and circuit breakers
|
|
||||||
- **Testing**: Add integration tests and performance benchmarks
|
|
||||||
- **Audit**: Implement comprehensive audit logging
|
|
||||||
|
|
||||||
### Development Experience
|
|
||||||
- **Code Organization**: Move to domain-driven design
|
|
||||||
- **Documentation**: Add OpenAPI/Swagger docs and ADRs
|
|
||||||
- **Internationalization**: Create translation management system
|
|
||||||
- **Developer Tools**: Enhance debugging and monitoring capabilities
|
|
||||||
|
|
||||||
For implementation details of these improvements, see:
|
|
||||||
- [Architecture Documentation](docs/architecture/system_architecture.md)
|
|
||||||
- [Detailed Improvement Plan](docs/improvements/detailed_improvement_plan.md) with code examples and implementation timeline
|
|
||||||
|
|
||||||
## Development Notes with AI-Windsurf
|
|
||||||
|
|
||||||
This project uses AI-Windsurf's intelligent note-taking system to maintain comprehensive development documentation. Notes are automatically organized and stored in the `/docs/notes/` directory.
|
|
||||||
|
|
||||||
### Note Structure
|
|
||||||
- **Topic-based Organization**: Notes are categorized by topics (architecture, features, bugs, etc.)
|
|
||||||
- **Date Tracking**: All notes include creation and modification dates
|
|
||||||
- **Automatic Linking**: Related components and documentation are automatically cross-referenced
|
|
||||||
- **Action Items**: Tasks and next steps are tracked within notes
|
|
||||||
|
|
||||||
### Accessing Notes
|
|
||||||
1. Browse the `/docs/notes/` directory
|
|
||||||
2. Notes are stored in markdown format for easy reading
|
|
||||||
3. Each note follows a standard template with:
|
|
||||||
- Overview
|
|
||||||
- Technical details
|
|
||||||
- Related components
|
|
||||||
- Action items
|
|
||||||
|
|
||||||
### Adding Notes
|
|
||||||
Work with AI-Windsurf to add notes by:
|
|
||||||
1. Describing what you want to document
|
|
||||||
2. Mentioning related components or previous notes
|
|
||||||
3. Specifying any action items or follow-ups
|
|
||||||
|
|
||||||
The AI will automatically:
|
|
||||||
- Create properly formatted note files
|
|
||||||
- Link related documentation
|
|
||||||
- Update existing notes when relevant
|
|
||||||
- Track development progress
|
|
||||||
|
|
||||||
For detailed documentation about specific components, refer to the corresponding files in the `/docs/` directory.
|
|
||||||
172
README.md
172
README.md
|
|
@ -1,3 +1,171 @@
|
||||||
# wag-managment-api-service-version-5
|
# WAG Management API Service v4
|
||||||
|
|
||||||
wag-managment-api-service-version-5
|
This service provides a comprehensive API for managing WAG (Wide Area Gateway) systems. It handles configuration, monitoring, and control operations for WAG devices in the network infrastructure.
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
|
To run the tests using Docker Compose:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.test.yml up --build
|
||||||
|
```
|
||||||
|
|
||||||
|
## Project Structure
|
||||||
|
|
||||||
|
### Core Services and Components
|
||||||
|
|
||||||
|
- `Services/` - Core service implementations
|
||||||
|
- `PostgresDb/` - PostgreSQL database operations and models
|
||||||
|
- `MongoDb/` - MongoDB operations and document models
|
||||||
|
- `Redis/` - Redis caching and session management
|
||||||
|
- `Email/` - Email notification service
|
||||||
|
|
||||||
|
- `ApiValidations/` - Request validation and data sanitization
|
||||||
|
- Input validation rules
|
||||||
|
- Data sanitization filters
|
||||||
|
- Schema validation middleware
|
||||||
|
|
||||||
|
- `ApiLibrary/` - Common utilities and helper functions
|
||||||
|
- Shared functions and utilities
|
||||||
|
- Common constants and configurations
|
||||||
|
- Helper classes and decorators
|
||||||
|
|
||||||
|
### Configuration and Settings
|
||||||
|
|
||||||
|
- `AllConfigs/` - Configuration management
|
||||||
|
- Database configurations
|
||||||
|
- Service settings
|
||||||
|
- Environment-specific configs
|
||||||
|
|
||||||
|
- `Schemas/` - Data models and schema definitions
|
||||||
|
- Request/Response models
|
||||||
|
- Database schemas
|
||||||
|
- API contract definitions
|
||||||
|
|
||||||
|
### Docker and Deployment
|
||||||
|
|
||||||
|
- `DockerApiServices/` - API service Docker configurations
|
||||||
|
- API service Dockerfile
|
||||||
|
- Service dependencies
|
||||||
|
|
||||||
|
- `DockerStoreServices/` - Storage service Docker configurations
|
||||||
|
- Database service Dockerfiles
|
||||||
|
- Storage service dependencies
|
||||||
|
|
||||||
|
### Error Handling and Events
|
||||||
|
|
||||||
|
- `ErrorHandlers/` - Error handling and exception management
|
||||||
|
- Custom exceptions
|
||||||
|
- Error handlers
|
||||||
|
- Exception middleware
|
||||||
|
|
||||||
|
- `ApiEvents/` - Event handling and processing
|
||||||
|
- Event listeners
|
||||||
|
- Event dispatchers
|
||||||
|
- Message queue handlers
|
||||||
|
|
||||||
|
### Language and Testing
|
||||||
|
|
||||||
|
- `LanguageModels/` - Localization and language support
|
||||||
|
- Language files
|
||||||
|
- Translation models
|
||||||
|
- i18n configurations
|
||||||
|
|
||||||
|
- `Ztest/` - Test suite
|
||||||
|
- Unit tests
|
||||||
|
- Integration tests
|
||||||
|
- Test fixtures and utilities
|
||||||
|
|
||||||
|
### Additional Components
|
||||||
|
|
||||||
|
- `scripts/` - Utility scripts and tools
|
||||||
|
- Deployment scripts
|
||||||
|
- Database migrations
|
||||||
|
- Maintenance utilities
|
||||||
|
|
||||||
|
|
||||||
|
use arcjet @frontend
|
||||||
|
|
||||||
|
## Architecture Overview
|
||||||
|
|
||||||
|
This project follows a layered architecture with three core services:
|
||||||
|
|
||||||
|
### Core Services
|
||||||
|
1. **AuthServiceApi**: Authentication and authorization
|
||||||
|
2. **EventServiceApi**: Event processing and management
|
||||||
|
3. **ValidationServiceApi**: Input and schema validation
|
||||||
|
|
||||||
|
### System Layers
|
||||||
|
- **Dependencies Layer**: External dependencies and requirements
|
||||||
|
- **Application Layer**: Core business logic
|
||||||
|
- **Service Layer**: API implementations
|
||||||
|
- **Test Layer**: Testing infrastructure
|
||||||
|
- **Dev Layer**: Development utilities
|
||||||
|
- **Root Layer**: Configuration and documentation
|
||||||
|
|
||||||
|
For detailed architecture documentation, see [System Architecture](docs/architecture/system_architecture.md).
|
||||||
|
|
||||||
|
## Suggested Improvements
|
||||||
|
|
||||||
|
The following improvements have been identified to enhance the system:
|
||||||
|
|
||||||
|
### Infrastructure & Deployment
|
||||||
|
- **Service Isolation**: Containerize core services (Auth, Event, Validation)
|
||||||
|
- **API Gateway**: Add gateway layer for rate limiting, versioning, and security
|
||||||
|
- **Monitoring**: Implement distributed tracing and metrics collection
|
||||||
|
- **Configuration**: Move to centralized configuration service with feature flags
|
||||||
|
|
||||||
|
### Performance & Scaling
|
||||||
|
- **Caching Strategy**: Enhance Redis implementation with invalidation patterns
|
||||||
|
- **Database**: Implement sharding and read replicas
|
||||||
|
- **Event System**: Add message queue (RabbitMQ/Kafka) for event handling
|
||||||
|
- **Background Jobs**: Implement job processing and connection pooling
|
||||||
|
|
||||||
|
### Security & Reliability
|
||||||
|
- **API Security**: Implement key rotation and rate limiting
|
||||||
|
- **Error Handling**: Add centralized tracking and circuit breakers
|
||||||
|
- **Testing**: Add integration tests and performance benchmarks
|
||||||
|
- **Audit**: Implement comprehensive audit logging
|
||||||
|
|
||||||
|
### Development Experience
|
||||||
|
- **Code Organization**: Move to domain-driven design
|
||||||
|
- **Documentation**: Add OpenAPI/Swagger docs and ADRs
|
||||||
|
- **Internationalization**: Create translation management system
|
||||||
|
- **Developer Tools**: Enhance debugging and monitoring capabilities
|
||||||
|
|
||||||
|
For implementation details of these improvements, see:
|
||||||
|
- [Architecture Documentation](docs/architecture/system_architecture.md)
|
||||||
|
- [Detailed Improvement Plan](docs/improvements/detailed_improvement_plan.md) with code examples and implementation timeline
|
||||||
|
|
||||||
|
## Development Notes with AI-Windsurf
|
||||||
|
|
||||||
|
This project uses AI-Windsurf's intelligent note-taking system to maintain comprehensive development documentation. Notes are automatically organized and stored in the `/docs/notes/` directory.
|
||||||
|
|
||||||
|
### Note Structure
|
||||||
|
- **Topic-based Organization**: Notes are categorized by topics (architecture, features, bugs, etc.)
|
||||||
|
- **Date Tracking**: All notes include creation and modification dates
|
||||||
|
- **Automatic Linking**: Related components and documentation are automatically cross-referenced
|
||||||
|
- **Action Items**: Tasks and next steps are tracked within notes
|
||||||
|
|
||||||
|
### Accessing Notes
|
||||||
|
1. Browse the `/docs/notes/` directory
|
||||||
|
2. Notes are stored in markdown format for easy reading
|
||||||
|
3. Each note follows a standard template with:
|
||||||
|
- Overview
|
||||||
|
- Technical details
|
||||||
|
- Related components
|
||||||
|
- Action items
|
||||||
|
|
||||||
|
### Adding Notes
|
||||||
|
Work with AI-Windsurf to add notes by:
|
||||||
|
1. Describing what you want to document
|
||||||
|
2. Mentioning related components or previous notes
|
||||||
|
3. Specifying any action items or follow-ups
|
||||||
|
|
||||||
|
The AI will automatically:
|
||||||
|
- Create properly formatted note files
|
||||||
|
- Link related documentation
|
||||||
|
- Update existing notes when relevant
|
||||||
|
- Track development progress
|
||||||
|
|
||||||
|
For detailed documentation about specific components, refer to the corresponding files in the `/docs/` directory.
|
||||||
Loading…
Reference in New Issue