Skip to content

Conversation

Fguedes90
Copy link

  • Updated SMTP configuration in .env and docker-compose.override.yml to use MailHog for email testing
  • Added utils module with health check and test email endpoints
  • Implemented event handling for password reset requests, integrating with the email service
  • Improved email service to send password reset emails upon event trigger
  • Removed deprecated files and updated documentation to reflect new module structure

These changes contribute to the ongoing development of the modular monolith architecture, enhancing email functionality and introducing utility endpoints for better service management.

Fguedes90 and others added 16 commits May 17, 2025 22:38
…files

- Introduced CLAUDE.md to provide comprehensive guidance on project setup, backend and frontend commands, architecture, and environment configuration.
- Removed Copier-related files including copier.yml, .copier/.copier-answers.yml.jinja, .copier/update_dotenv.py, and hooks/post_gen_project.py as they are no longer needed for project initialization.
This commit adds:
- Blackbox test infrastructure with httpx
- Script to run tests against a live server
- Documentation for blackbox testing strategy
- Modular monolith refactoring plan

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

Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
…ements a modular monolith architecture for the backend, with these key changes:\n- Extracted core modules: Auth, Users, Items, Email\n- Implemented repository pattern for database access\n- Added service layer for business logic\n- Created clean domain models and interfaces\n- Set up dependency injection system\n- Updated Alembic for modular models\n- Added event-based communication between modules\n- Refactored tests to match the new architecture\n\n🤖 Generated with [Claude Code](https://claude.ai/code)\n\nCo-Authored-By: Claude <[email protected]>
- Fixed AuthenticationException parameter name from 'detail' to 'message'
- Fixed user session management to avoid "already attached to session" errors
- Updated API routes to use explicit dependency parameters
- Made imports more consistent to avoid circular dependencies
- Fixed test-email endpoint to properly accept JSON body
- Added documentation for modular monolith implementation
- Updated test expectations to match actual API behavior

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

Co-Authored-By: Claude <[email protected]>
- Moved Message model from app.models to app.shared.models
- Moved TokenPayload model from app.models to app.modules.auth.domain.models
- Updated imports in API routes to use new model locations
- Updated MODULAR_MONOLITH_PLAN.md to reflect progress
- Ensured all blackbox tests pass with the changes

These changes are part of the transition to the modular monolith architecture,
with the goal of gradually eliminating the legacy app.models module.

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

Co-Authored-By: Claude <[email protected]>
- Added detailed guide for the model migration process
- Documented the step-by-step approach for migrating models
- Provided an example of the Message model migration
- Clarified the order (non-table models first, table models last)

This documentation will help future developers understand the migration
process and continue with the remaining model migrations.

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

Co-Authored-By: Claude <[email protected]>
- Confirmed NewPassword model is already migrated to auth/domain/models.py
- Updated plan to reflect current status
- Refined next steps for model migration

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

Co-Authored-By: Claude <[email protected]>
- Added specific steps for non-table model migration (Token, ItemsPublic, UsersPublic)
- Updated event system roadmap with practical implementation steps
- Enhanced Alembic integration plan with documentation tasks
- Identified duplicated model definitions that need consolidation
- Prioritized tasks for maximum impact with minimal risk

The plan now provides clearer guidance for the remaining implementation work
and addresses the specific challenges with model migration.

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

Co-Authored-By: Claude <[email protected]>
- Added detailed progress indicators for each task
- Updated status of model migration tasks
- Added progress summary with completion percentages
- Improved clarity on completed vs. in-progress tasks
- Updated estimated completion time based on progress
- Marked blackbox test implementation as complete
- Added model migration documentation as completed task

This update provides a clearer picture of the current state of the
modular monolith refactoring, showing ~85% overall completion.

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

Co-Authored-By: Claude <[email protected]>
…rovements

- Updated .env file with secure keys and passwords for backend configuration
- Introduced agent.log for tracking task execution and project phases
- Enhanced documentation in CLAUDE.md to reflect modular architecture changes
- Improved docker-compose.override.yml to ensure service dependencies are healthy
- Added mise.toml for Docker task management, including a clean command
- Created repomix configuration and output files for codebase representation
- Established TASKS.md to outline project goals and next steps
- Documented completed phases in TASK_HISTORY for better project tracking
- Added new backend documentation files for event system and code style guide
- Removed legacy files and updated imports to align with modular structure

These changes contribute to the ongoing transition to a modular monolith architecture, improving security, documentation, and overall project organization.

🤖 Generated with [Claude Code](https://claude.ai/code)
- Create comprehensive documentation structure in docs/ directory
- Organize content into logical sections (getting-started, architecture, etc.)
- Migrate content from scattered markdown files into the new structure
- Create testing documentation (test plan, blackbox testing, unit testing)
- Remove redundant documentation files after migration
- Update outdated transition comments in core files
- Updated SMTP configuration in .env and docker-compose.override.yml to use MailHog for email testing
- Added utils module with health check and test email endpoints
- Implemented event handling for password reset requests, integrating with the email service
- Improved email service to send password reset emails upon event trigger
- Removed deprecated files and updated documentation to reflect new module structure

These changes contribute to the ongoing development of the modular monolith architecture, enhancing email functionality and introducing utility endpoints for better service management.
@Fguedes90 Fguedes90 closed this May 18, 2025
@Fguedes90 Fguedes90 deleted the modular-monolith-refactoring branch May 18, 2025 22:18
@stevleibelt
Copy link

@Fguedes90,

thank for your work.

You've changed the obvious changethis to a more regular looking secret key or fist superuser password in the configuration. Is there a reason for this change?

Why have you removed the whole Copier-Section in the readme?

You've added a TASKS.md with a lot of unfinished tasks. This looks like your change is not fully done.

Is there a reason why you've replaced the code in get_db with just another method call?

Inside the get_module_settings, would it make sense to replace the module_name: str with a module_name: ModuleNameStrEnum? Creating modules but have a central module configuration file I need to adapt does not look like decoupled software, but that is just my gut-feeling. Returning an empty setting instead of raising an exception looks also like a well introduced code area where you can spend hours for debugging.

I must admint, I've stopped looking over your code after my scrollbar was at 33 percent of the available slide position. This is a really big change, so my points mentioned above are just the first thoughts.

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.

2 participants