Refactor project structure and add new CRUD endpoints#97
Merged
Conversation
…xible details - Add actor parameter to all service methods for audit logging - Convert services from static methods to instance-based with initialization - Make details endpoint flexible with optional ID and multiple query filters - Add input validation for required filters in details method - Fix template variable naming consistency (CRATE -> CREATE) - Add justification parameter to delete method - Update parameter from 'identifier' to 'id' in endpoint routing
- Remove platform-specific context directories (app, bot, desktop, wearable) - Update .husky directory structure with full git hooks - Remove kubernetes deployment configuration files - Rename migration file from sub-divisions to political-divisions - Add new migration files for flags, http logs, and currencies tables - Remove types-identification migration file - Update responses directory removal in schemas - Add new scripts for running migrations and seeders - Update seeder filenames and add new base seeders for roles and countries-languages
…1 structure - Remove setEnvironment middleware and platform-specific route handlers - Move web/auth and web/security routes directly under api/v1 - Delete empty platform route files (app, bot, desktop, wearable) - Update main router to use unified v1 endpoint with context middlewares - Reorganize route imports and context middleware application flow
…ate imports - Move web/auth controllers to top-level auth directory - Remove common/security/keys.controller.js as it's no longer needed - Update relative import paths to reflect new directory structure - Fix SMSService import path for constants.util - Adjust crud template import path for response helper
- Remove platform column from endpoints database table - Update endpoints script to parse API paths without platform segment - Regenerate key controller at new security location - Simplify endpoint sync logging and diagram generation paths - Update API path regex from /api/[platform]/[version]/[group] to /api/[version]/[group]
…aration - Move context/web/v1 to context/v1 by removing web layer - Consolidate controllers/web/auth to controllers/auth - Consolidate routes/web/auth and routes/web/security to top-level routes - Remove duplicate and misspelled diagram files (veryfy-code, recover-password) - Update all import paths to reflect new flattened structure - Remove platform column from configEndpoints model definition - Simplify directory tree from 72 to 410 files total
…rieval - Update endpoint validation from /api/[platform]/[version]/[group] to /api/[version]/[group] - Remove platform field from configEndpoints database query - Simplify JWT secret retrieval by removing environment-based context lookup - Fix duplicate next() call in setHost middleware
…n paths - Create new RoleServices class with full CRUD operations for configRoles - Update CRUD generator scripts to save controllers and services to root group directories - Fix import paths in CRUD service template to use relative paths - Add actor-based audit logging support for role operations - Include search, filtering, and pagination capabilities in role services
- Add complete role management CRUD with controllers, routes, and documentation
- Remove platform-specific server URLs and consolidate to single /api/v1 endpoint
- Update CRUD generator to handle enums and improve template replacements
- Fix variable naming consistency in controller templates ({{SERVICE_VARIABLE}} -> {{SERVICE_VARIABLE}}Service)
- Simplify details method by removing validation and passing req.query directly
- Update documentation generator to use dayjs instead of moment for date handling
- Remove .debug file and update route constants to reflect flattened structure
- Delete role controller, documentation, and route files as they were likely generated in error - Restore .debug file with 'false' value for development flag management - Revert controller generation template from 'controller' back to 'controllers' - Fix controller class name from Controllers to Controller suffix - Update generated controller filename from .controllers to .controller
- Create endpoint controller with CRUD operations and actor-based audit logging - Generate endpoint OpenAPI documentation with proper schemas and examples - Implement endpoint routes with validation middleware integration - Add fully defined endpoint validation schemas with security level constraints - Create endpoint service with transaction support and history tracking - Update CRUD validation generator to properly handle enums, foreign keys, and numeric ranges - Fix template import syntax for model references and add minSecurityLevel to all validations
- Create host controller with full CRUD operations and actor-based audit logging - Generate host OpenAPI documentation with proper schemas and examples - Implement host routes with validation middleware integration - Add host validation schemas with security level constraints - Create host service with transaction support and history tracking - Fix import order in endpoint and host route templates for consistency - Remove extraneous comma syntax in host service create method parameter
- Create page controller with full CRUD operations and actor-based audit logging - Generate page OpenAPI documentation with proper schemas and dynamic references - Implement page routes with validation middleware integration - Add page validation schemas with foreign key references to hosts and pages - Create page service with transaction support and history tracking - Include parent-child page relationship support with self-referencing pageId field
- Create role controller with full CRUD operations and actor-based audit logging - Generate role OpenAPI documentation with proper schemas and dynamic references - Implement role routes with validation middleware integration - Add role validation schemas with security level foreign key constraints - Include target enum validation for employee/customer and default role flag
- Create scope controller with full CRUD operations and actor-based audit logging - Generate scope OpenAPI documentation with proper schemas and validation examples - Implement scope routes with validation middleware integration - Add scope validation schemas with security level constraints - Include isSelectable flag for controlling scope visibility in role configurations
- Create security level controller with full CRUD operations and actor-based audit logging - Generate security level OpenAPI documentation with JSON object schemas for i18n fields - Implement security level routes with validation middleware integration - Add security level validation schemas with JSON object support for name and description - Create security level service with transaction support and history tracking - Include priority ranking and default flag for security level hierarchy management
- Create shortener controller with full CRUD operations and actor-based audit logging - Generate shortener OpenAPI documentation with proper date-time formatting using dayjs - Implement shortener routes with validation middleware integration - Add shortener validation schemas with link validation for URLs and max length constraints - Create shortener service with transaction support, expiration date handling, and history tracking
- Create currency controller with full CRUD operations and actor-based audit logging - Generate currency OpenAPI documentation with JSON object schemas for i18n name field - Implement currency routes with validation middleware integration - Add currency validation schemas with object validation for multilingual name support - Create currency service with transaction support and history tracking
- Create controller with create, read, update, delete operations - Implement service layer with validation and database integration - Add comprehensive API documentation for OpenAPI/Swagger - Set up route definitions with schema validation middleware
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation for OpenAPI/Swagger integration - Set up routes with schema validation middleware
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation for OpenAPI/Swagger integration - Set up routes with schema validation middleware
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation for OpenAPI/Swagger integration - Set up routes with schema validation middleware
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation for OpenAPI/Swagger integration - Set up routes with schema validation middleware
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation for OpenAPI/Swagger integration - Set up routes with schema validation middleware
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation with dynamic references to countries - Set up routes with schema validation middleware
- Create controller with empty create, read, update, delete operations - Implement basic service layer with audit logging - Add minimal API documentation for OpenAPI/Swagger - Set up routes with schema validation middleware
- Create controllers with full create, read, update, delete operations - Implement service layers with validation and audit logging - Add comprehensive API documentation with dynamic references - Set up routes with schema validation middleware for both resources
- Create controller with create, read, update, delete operations - Implement service layer with validation and audit logging - Add API documentation for OpenAPI/Swagger integration - Set up routes with schema validation middleware
- Create controllers with full create, read, update, delete operations - Implement service layers with validation and audit logging - Add comprehensive API documentation with dynamic references - Set up routes with schema validation middleware for both resources
…urces - Remove redundant **[Required]** and **[Optional]** prefixes from descriptions - Fix typos in operationId names (endpoin -> endpoint) - Change integer fields to boolean for requiresAuthorization and hasSensitiveInformation - Update unique index for config_endpoints to remove platform column - Standardize query parameter descriptions to be cleaner and more consistent
- add boolean column detection to crud services generator script - update endpoints services to properly handle optional filter parameters (requiresAuthorization, hasSensitiveInformation) - improve filter condition generation to check for undefined instead of truthiness - add mirror logic for filterable fields between docs and services generators - ensure enum, foreign key, and boolean columns are properly included as filters
- update endpoints.docs.js with justification field in delete endpoint request body - refine documentation template for delete operation with proper formatting - include example justification field with faker generated sentence - ensure delete operations in generated documentation include justification parameter
- add endpoint-related fields to i18n dictionaries (en/es) - extend validation error messages with `not_exists` and error types - refactor database validation schemas to accept model names instead of instances - add new `getModel` helper function for async model resolution - remove unused route files (hosts, pages, roles, scopes, shorteners) and their controllers - add empty PlantUML diagram files for endpoint documentation context - update response helper to accept request parameter and add registerHttpRequest function - add configurations routes to main API routing structure
- Add 'min_length' validation key to both English and Spanish locales - Extend HTTP method enums with patch, post, and get values - Add 'endpoints.list' translation key for consistency - Remove old comment blocks from context.helper.js
- Add id_operation field to track unique operations - Make status_code, query, headers, body, response_body, error_message, and error_stack fields nullable with default null values - Update comments to clarify field purposes
- Add request_id and operation_id header support to context builder - Fix endpoint script to properly handle multiple HTTP methods per route - Generate PlantUML diagrams for all endpoint operations (activity, communication, component, dataflow, sequence, and usecase views)
- Extract request_id and operation_id from headers before filtering - Store both IDs in the http logs database table for traceability
- Create logsHttpRequests model with all required fields and associations - Update response helper to properly store request and error data to database - Fix field names in migration to match actual usage (id_request, id_operation) - Integrate request logging into error handler middleware for error cases - Remove obsolete comment blocks from middleware files
- Remove entire requestLogger.middleware.js file with its utilities - Add empty object sanitization helper to prevent storing empty JSON - Skip HTTP request registration for unauthenticated requests - Add timestamps and paranoid configuration to logsHttpRequests model
- Add CRUD routes for hosts configuration with validation schemas - Create comprehensive OpenAPI documentation for all hosts endpoints - Support list, create, read, update, delete, and status management operations - Include filtering by active status and isDefault flag
- Move services to configurations subdirectory (hosts.services, scopes.services) - Remove obsolete controllers and services (pages, roles, shorteners) - Update controller imports and parameter passing patterns - Add comprehensive OpenAPI documentation for scopes endpoints - Create route files for hosts and scopes with validation schemas
- Implement controllers, services, routes, and validations for pages, roles, and shorteners - Add OpenAPI documentation for new configuration endpoints - Update existing documentation with corrected example values and imports - Include soft delete, audit logging, and pagination in services - Register new routes in configurations index - Update scopes service to filter active account-scope relationships
…odel references - Remove direct model imports from validation files - Update validation schemas to use string-based model references - Apply consistent pattern across hosts, roles, scopes, and shorteners validations
- Implement OpenAPI documentation for currencies and flags endpoints - Create validation schemas for currencies and flags CRUD operations - Support multi-language object fields for currency names - Include various flag image formats (2D, 3D, location, emoji)
- Implement OpenAPI documentation for languages and timezones endpoints - Create validation schemas for multi-language object fields (name, description) - Support language orientation types (L2R, R2L, T2B variations) - Add continent reference for timezone filtering and geographic organization
- Add data module documentation index with currencies, flags, languages, and timezones - Include shorteners documentation in configurations index - Integrate data module into main API paths - Simplify documentation tags by removing unused categories
- Implement regions controller, service, routes, and validations - Add OpenAPI documentation for continents, regions, countries, political divisions, cities, and dial codes - Create validation schemas for all geographic entities with multi-language object fields - Establish hierarchical geographic relationships (continent → region → country → subdivision → city) - Support timezone references for cities and flag references for countries
- Create geographic documentation index with cities, continents, countries, dial codes, political divisions, and regions - Integrate geographic module into main API paths structure - Establish hierarchical geographic endpoints for comprehensive location management
- Add field translations for configurations (pages, roles, scopes, shorteners) - Include data module fields (currencies, flags, languages, timezones) - Add geographic module fields (continents, regions, countries, political divisions, cities, dial codes) - Register new route modules in main router and configuration indices - Fix service import paths in controllers for proper module organization
…ript - Change route prefix from '/geographic' to '/geo' in docs index file - Remove verbose script header comments to reduce noise - Update regex in linter to correctly transform API paths
Update test to await the success helper function call, matching its async implementation.
DiegoAlejandroNino
previously approved these changes
Feb 8, 2026
Auto-generated by GitHub Actions workflow PR: #97 Workflow: Auto Version & Changelog Run ID: 21800507072
|
🚀 Auto-versioning complete! 📦 New version:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Summary
This PR restructures the project by flattening the directory hierarchy and adds new CRUD endpoints for configurations, data, geographic, and user management modules. The changes include comprehensive internationalization updates and restructured routing.
🎯 Type of Change
🔍 What Changed
Added
Changed
context/web/v1/tocontext/v1/controllers/web/andcontrollers/common/tocontrollers/actorparameter instead ofuserstructure.txtto reflect new directory organizationFixed
Removed
🧪 Testing
Test Instructions:
🔗 Related Issues
📝 Additional Notes
actorparameter instead ofuserfor consistency✅ Checklist