Skip to content

feat: implement database layer with dependency injection#1

Merged
itisnotyourenv merged 4 commits intomainfrom
setup-db
Aug 2, 2025
Merged

feat: implement database layer with dependency injection#1
itisnotyourenv merged 4 commits intomainfrom
setup-db

Conversation

@itisnotyourenv
Copy link
Copy Markdown
Owner

Summary

  • Implements complete database layer with SQLAlchemy async support
  • Adds dependency injection for database components
  • Enhances authentication service with Telegram bot integration
  • Improves error handling with custom validation messages

Changes

  • Database Layer: Added factory pattern for engine/session creation
  • Repository Pattern: Enhanced user repository with async methods
  • Transaction Management: Implemented transaction manager for database operations
  • DI Container: Updated database provider with proper scoping
  • Config Management: Added Telegram config, removed config.yaml from tracking
  • Error Handling: Improved validation errors with descriptive messages

Test Plan

  • Verify database connections work correctly
  • Test user repository CRUD operations
  • Validate transaction management
  • Confirm Telegram authentication flow
  • Check error handling responses

🤖 Generated with Claude Code

itisnotyourenv and others added 4 commits August 2, 2025 04:54
- Add SQLAlchemy database factory and session management
- Implement database holder pattern for repository access
- Add transaction manager implementation
- Enhance user repository with async methods
- Update DI container with database providers
- Add Telegram config support for auth service
- Improve validation error handling with custom messages
- Remove config.yaml from tracking (moved to gitignore)

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix user repository methods to return Optional[User] instead of raising exceptions
- Implement proper SQL insert/update operations in UserRepositoryImpl
- Remove unused User import and simplify auth response structure
- Fix auth router to return actual interactor response instead of hardcoded message

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

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant