Skip to content

Fix/backend modules application#13

Merged
Pauldatcom merged 19 commits intopaulfrom
fix/backend-modules-application
Nov 14, 2025
Merged

Fix/backend modules application#13
Pauldatcom merged 19 commits intopaulfrom
fix/backend-modules-application

Conversation

@Pauldatcom
Copy link
Copy Markdown
Collaborator

Fix: Backend Modules Application Structure

Problem

The backend application layer had an inconsistent structure with controllers and use cases scattered across different directories, making it difficult to maintain and follow clean architecture principles.

Solution

Refactored the backend to use a modular structure where each domain (e.g., tape) contains its own application layer with controllers, following a more organized and maintainable architecture.

Changes

  • Reorganized application layer into module-based structure (modules/tape/application/)
  • Consolidated tape controllers and use cases into a single TapeController class
  • Updated route registration to use the new modular controller structure
  • Improved code organization following clean architecture principles

Impact

  • Better code organization and maintainability
  • Clearer separation of concerns within modules
  • Easier to extend with new modules following the same pattern

mathieusouflis and others added 19 commits November 13, 2025 10:35
Replace POSTGRES_/DATABASE_URL usage with
DB_USER/DB_PASSWORD/DB_NAME/DB_URL across docs, docker-compose files,
and scripts. Load .env.dev in drizzle.config and construct the DB URL
from DB_* variables. Add Drizzle meta snapshot and journal files.
Co-authored-by: mathieusouflis <39670015+mathieusouflis@users.noreply.github.com>
Move Drizzle schema into modules/tape and export via
modules/index.schemas Introduce PostgresClient and new TapeRepository
under modules/tape Update drizzle.config to point to
./src/modules/index.schemas.ts Remove legacy database
client/index/repository infra files Add TS path alias @/* in backend
tsconfig
- Reorganize codebase into module-based structure (src/modules/tape/)
- Move tape domain, application, and infrastructure into tape module
- Update routes to use plugin-based architecture
- Update database client and repository implementations
# Conflicts:
#	apps/backend/TESTING.md
#	apps/backend/package.json
#	apps/backend/src/index.ts
#	apps/backend/src/infrastructure/database/schema.ts
Replace POSTGRES_/DATABASE_URL usage with
DB_USER/DB_PASSWORD/DB_NAME/DB_URL across docs, docker-compose files,
and scripts. Load .env.dev in drizzle.config and construct the DB URL
from DB_* variables. Add Drizzle meta snapshot and journal files.
Co-authored-by: mathieusouflis <39670015+mathieusouflis@users.noreply.github.com>
Move Drizzle schema into modules/tape and export via
modules/index.schemas Introduce PostgresClient and new TapeRepository
under modules/tape Update drizzle.config to point to
./src/modules/index.schemas.ts Remove legacy database
client/index/repository infra files Add TS path alias @/* in backend
tsconfig
- Reorganize codebase into module-based structure (src/modules/tape/)
- Move tape domain, application, and infrastructure into tape module
- Update routes to use plugin-based architecture
- Update database client and repository implementations
- Recreate infrastructure/database/index.ts with findById method and createDatabaseClient
- Fix index.ts to properly initialize fastify server
- Add adapter for TapeRepository to support both old and new API
- Fix repository-mocks.ts import
…ouflis/turing-app-clean-architecture into fix/backend-modules-application

# Conflicts:
#	apps/backend/package.json
#	apps/backend/src/infrastructure/database/index.ts
@Pauldatcom Pauldatcom merged commit 27a116e into paul Nov 14, 2025
1 check failed
@Pauldatcom Pauldatcom deleted the fix/backend-modules-application branch November 14, 2025 10:24
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.

3 participants