- Consolidated user ID retrieval and permission checks into helper functions.
- Updated UserHandler to utilize BaseHandler for common database and configuration access.
- Enhanced logging for user-related operations, including login, registration, and password changes.
- Removed redundant context handling in middleware and improved readability.
- Introduced FileUtil for file URL generation and management, encapsulating file-related logic.
- Refactored FileRepo and UserRepo to streamline database operations and error handling.
- Deleted unused request_id middleware and integrated its functionality into request_logger.
- Removed legacy test runner script to simplify testing process.
- Replace QOR OSS with gocloud.dev/blob for file storage management.
- Implement S3 client creation and presigned URL generation for uploads and downloads.
- Add methods for confirming uploads and retrieving file URLs.
- Introduce new endpoints for uploading files and confirming uploads in the file handler.
- Update file storage paths to differentiate between public and private files.
- Enhance file type validation and error handling in the file upload process.
- Add support for listing files and retrieving file information.
- Implement public file access with direct URL redirection.
- Deleted the `api`, `redisdb`, `sqldb`, `filestore`, `storage_fx`, and `http` modules as they are no longer needed.
- Removed the `fx` dependency from various handlers and modules to simplify the codebase.
- Updated the `go.mod` and `go.sum` files to reflect the removal of unused dependencies.
- Refactored the application structure to initialize components directly in the `app` package.
- Added a new `app` package to manage application lifecycle and component initialization.
- Implemented graceful shutdown for the HTTP server, database, and Redis connections.
- Enhanced error handling and logging throughout the application.
This commit establishes the lite branch, which provides a simplified version of the framework:
- Simplified architecture: removed Service and Repository layers
- Single user table design: using is_admin field to distinguish administrators
- Removed complex features: RBAC permissions, menu management, and role system
- Streamlined middleware: simplified auth checks based on is_admin field
- Unified naming conventions: removed "simple" prefixes from functions and files
- Updated documentation: revised README files to reflect lite mode features
The lite mode is designed for rapid development and simple applications, while
the enterprise mode (main branch) retains all advanced features for complex
business scenarios.