refactor-upgrade-to-gorm #5

Merged
guisea merged 11 commits from refactor-upgrade-to-gorm into master 2025-07-01 23:16:42 +12:00
Owner
No description provided.
guisea added 11 commits 2025-07-01 23:16:24 +12:00
Updated existing vendored dependencies
- Add GORM models in models/ directory with proper column tags
- Create repository interfaces and implementations in core/repository/
- Add database package with MySQL and SQLite support
- Add UUID ID utility for GORM models
- Implement complete repository layer replacing SQL-based data access
- Add database migrations and index creation
- Support both MySQL and SQLite drivers with auto-migration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace SQL-based queries with GORM repository calls
- Update all model interfaces to use repository pattern
- Fix compilation errors in core/model/ files
- Update mocks to match new repository interfaces
- Modify API handlers to use new repository layer
- Maintain backward compatibility with existing interfaces

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace basic config loading with Viper framework
- Add support for multiple config sources (files, env vars, defaults)
- Add mapstructure tags for proper config binding
- Support JSON, YAML, and TOML config formats
- Add environment variable support with OA_ prefix
- Implement secure config loading with multiple search paths
- Maintain backward compatibility with existing config.json files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add SQLite configuration options to config.json.sample
- Create config.mysql.json.sample for MySQL deployments
- Add security comments for sensitive configuration
- Include environment variable examples and documentation
- Add Viper configuration comments and usage examples

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create production-ready Dockerfile with multi-stage build
- Add CGO support for SQLite driver compilation
- Implement security best practices with non-root user
- Add health checks with proper API version headers
- Create .dockerignore for optimized build context
- Support both SQLite and MySQL in containerized environment
- Include volume mounting for data persistence

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Create justfile with development and production recipes
- Add Docker build and run commands with proper configuration
- Include database management utilities and migration helpers
- Add development setup and dependency management
- Create configuration help and documentation commands
- Support both SQLite and MySQL deployment scenarios

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add complete Viper configuration documentation
- Include Docker deployment examples and best practices
- Document environment variable configuration options
- Add Just build automation usage examples
- Create troubleshooting and migration guides
- Update prerequisites and setup instructions
- Add security guidelines for production deployments

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add GORM v1.25.12 with MySQL and SQLite drivers
- Add Viper v1.19.0 for configuration management
- Add UUID package for GORM model IDs
- Update vendor directory with new dependencies
- Update Go module requirements and checksums

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update auth.go to use new repository interfaces
- Fix test compilation errors in auth_test.go
- Maintain compatibility with existing authentication flows
- Update mock implementations for repository pattern

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
guisea merged commit b5ea2095e4 into master 2025-07-01 23:16:42 +12:00
guisea deleted branch refactor-upgrade-to-gorm 2025-07-01 23:16:43 +12:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: guisea/openaccounting-server#5