Skip to content

feat: testing architecture#1

Merged
mikana0918 merged 29 commits into
mainfrom
feat/new-epic-testing-architetcture
Dec 9, 2025
Merged

feat: testing architecture#1
mikana0918 merged 29 commits into
mainfrom
feat/new-epic-testing-architetcture

Conversation

@mikana0918

Copy link
Copy Markdown
Contributor

No description provided.

mikana0918 and others added 29 commits November 14, 2025 04:22
- Updated error handling in controllers to use the new ApiResponse facade.
- Replaced legacy response helpers with ApiResponse methods for consistency.
- Enhanced documentation for RFC9457 error handling and quick start guides.
- Introduced helper functions for accessing Application and Prisma client from Fastify.
- Improved dependency injection pattern by attaching Application instance to Fastify.
- Added new database module with enhanced Prisma client management features.
- Updated service provider registration to streamline command registration.
- Refactored README files for clarity and accuracy regarding application structure and commands.
Refactor error handling and response management
…on and database test cases

- Added IntegrationTestCase for full integration testing with server and database lifecycle management.
- Created DatabaseTestCase for handling database operations in tests.
- Implemented TestCase as a base class for common testing functionality and lifecycle hooks.
- Developed a setup script for configuring the test environment, including server and database setup.
- Added factory utilities for generating test data and fake data generators.
- Updated vite.config.mts to use the new testing setup.
- Created migration guide for transitioning to the new testing framework.
- Added example integration tests for health and user endpoints.
- Enhanced README documentation for the testing module and its usage.
- Added DatabaseManager class for managing database connections and providing direct access to Prisma and Drizzle clients.
- Introduced DatabaseManager interface for type safety and structure.
- Created README.md for database module with usage examples and configuration details.
- Updated index.ts to export new DatabaseManager and related types.
- Added support for multiple database connections and transactions.
- Implemented graceful shutdown and health check methods.
- Deprecated legacy Prisma utilities in favor of the new DB facade.

feat(http): Introduce ApiResponseBuilder for streamlined response handling

- Added ApiResponseBuilder class for building API responses with validation and error handling.
- Updated ApiResponse to export ApiResponseBuilder and maintain backward compatibility with ResponseBuilder.
- Created tests for ApiResponseBuilder to ensure validation and response handling works as expected.
- Updated example controller to utilize ApiResponseBuilder for cleaner validation logic.

fix(config): Refactor database configuration to support multiple drivers

- Updated database configuration to support both Prisma and Drizzle ORM.
- Simplified connection definitions and added example configurations for read replicas and analytics.
- Ensured type safety with updated DatabaseConfig type definitions.
…ation

- Created Prisma schema for User model with fields: id, name, email, age, createdAt, and updatedAt.
- Added seed files for development and production environments.
- Implemented IUserRepository interface for user operations.
- Developed UserRepositoryDrizzle and UserRepository classes for Drizzle and Prisma ORM respectively.
- Configured Drizzle ORM with PostgreSQL settings.
- Updated package.json scripts for migration and seeding processes.
- Added necessary dependencies for Drizzle ORM and PostgreSQL.
…n handling and initialization

feat(tests): Update IntegrationTestCase and setup to utilize HttpKernel for server initialization
feat(migrations): Add User table migration with createdAt and updatedAt fields
chore: Update migration_lock.toml comments for clarity
refactor: Remove deprecated app initialization logic from app.ts
…ing create, find, update, delete, and pagination functionalities
@mikana0918 mikana0918 merged commit 031f828 into main Dec 9, 2025
1 check failed
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