Introduce `getPublicUrl` in `S3Service` for generating public URLs. Replace custom file URL generation logic across services with the new method. Add media controller for file streaming and update related tests. Adjust frontend to display user roles instead of email in the sidebar. Update environment schema to include optional `API_URL`. Fix help page contact email.
Optimize module imports by marking `DatabaseModule` and `CryptoModule` as global. Remove explicit imports from other modules to reduce duplication and improve maintainability. Update environment variable limits for image and GIF sizes in production.
Standardize import order in `contents.controller.ts` and related files for better code readability. Adjust SQL formatting in repository methods for consistency.
Optimize the structure and readability of import statements in `admin` services, modules, and controllers. Ensure consistency and logical grouping for improved maintainability.
Add `email` and `status` fields to user schema for better data handling. Update `UsersService` with new service dependencies (`RbacService`, `MediaService`, `S3Service`, `ConfigService`) for enhanced functionality. Mock dependencies in tests for improved coverage. Adjust user model with optional and extended fields for flexibility. Streamline and update import statements.
Introduce `OptionalAuthGuard` to allow conditional authentication for routes. Update `AuthModule` to include `AuthGuard`, `OptionalAuthGuard`, and `RolesGuard` in providers and exports for broader reuse.
feat(app): integrate `AdminModule` into app module
Add `AdminModule` to the app's main module to enable administration functionalities.
feat(users): enhance user profiles with bio and avatar fields
Extend `UpdateUserDto` to include optional `bio` and `avatarUrl` fields for better user customization.
feat(categories): add functionality to count all categories
Implement `countAll` method in `CategoriesRepository` to fetch the total number of categories using raw SQL counting.
Add admin statistics endpoint to provide user, content, and category stats. Introduce `AdminModule` with controller, service, and repository integration for data aggregation. Include frontend service to consume the stats API.
Extend the `processImage` method to support optional resizing with `width` and `height` parameters. Update processing pipeline to handle resizing while maintaining existing format processing for `webp` and `avif`.
Integrate user-specific fields (`isLiked`, `favoritesCount`) in content APIs and improve `ContentCard` through reactive updates. Add admin-only content deletion support. Refactor services and repository to enrich responses with additional data (author details, tags).
Introduce `avatarUrl` and `bio` fields in the user schema. Update repository, service, and controller to handle avatar uploads, processing, and bio updates. Add S3 integration for avatar storage and enhance user data handling for private and public profiles.
Increase `passwordHash` field length to 100 in the `users` schema to accommodate larger hashes. Add migration snapshot `0005_snapshot.json` to capture database state changes.
Add `@MaxLength` validations to limit string field lengths in multiple DTOs, ensuring consistent data validation and integrity. Integrate `CreateApiKeyDto` in the API keys controller for improved type safety.
Introduce `CrawlerDetectionMiddleware` to identify and log potential crawlers or bots accessing suspicious paths or using bot-like user agents. Middleware applied globally to all routes in `AppModule`.
Update various `@types` packages, NestJS, TypeScript, and Jest dependencies. Add new packages such as AWS SDK clients and utility libraries to enhance testing, type definitions, and AWS integrations.
Refactor multiple modules to improve dependency management by adding missing imports (e.g., `AuthModule`, `CryptoModule`) and ensuring essential services and repositories are exported. Update Dockerfile for better build and runtime efficiency, improve CORS handling, and enhance validation with updates to DTOs. Include package.json refinements for dependency organization.
Introduce a detailed database schema migration snapshot, including tables such as `users`, `categories`, `contents`, `tags`, `favorites`, `roles`, `permissions`, and more. Adds relationships, indexes, unique constraints, and primary keys to ensure optimal structure and query efficiency.
Deleted unused e2e tests, mocks (`cuid2`, `jose`, `ml-kem`, `sha3`), and their associated jest configurations. Simplified services by ensuring proper dependency imports, resolving circular references, and improving TypeScript type usage for enhanced maintainability and testability. Upgraded Dockerfile base image to match new development standards.
Introduce foundational database schema with tables for `users`, `categories`, `contents`, `tags`, and `favorites`. Add foreign key relationships, constraints, and indexes for efficient querying.
Introduce repository pattern across multiple services, including `favorites`, `tags`, `sessions`, `reports`, `auth`, and more. Decouple crypto functionalities into modular services like `HashingService`, `JwtService`, and `EncryptionService`. Improve testability and maintainability by simplifying dependencies and consolidating utility logic.
Integrate `Logger` for consistent logging in services like `reports`, `categories`, `users`, `contents`, and more. Introduce caching capabilities with `CacheInterceptor` and manual cache clearing logic for categories, users, and contents. Add request throttling to critical auth endpoints for enhanced rate limiting.
Introduce modular PGP encryption utilities (`pgpEncrypted` type) for seamless handling of sensitive data in Postgres. Added utility `withAutomaticPgpDecrypt` to enable automatic decryption for selective columns, simplifying schema definitions.
Eliminated PGP encryption for `email` and `twoFactorSecret` fields in `users` schema to simplify handling of sensitive data.
Since abstraction in schemas.
Introduced centralized PGP encryption utilities and updated the `users` schema to enable automatic decryption for sensitive fields like `email` and `twoFactorSecret`.
Added unit tests for the `api-keys`, `auth`, `categories`, `contents`, `favorites`, `media`, and `purge` services to improve test coverage and ensure core functionality integrity.
Optimized import order, applied consistent formatting, and improved readability in various modules, including `contents`, `media`, and `auth` services.
Added new dependencies for caching, security, media processing, and validation. Updated scripts and included the `dist` folder for build output. Refined devDependencies to support new features and typings.
Added support for `unsafeParameterDecoratorsEnabled` in JavaScript parser configuration. Modified linter rules to include a `correctness` section disabling `useHookAtTopLevel`. Simplified domain-specific linter configurations.
Integrated Sentry for error monitoring and profiling. Added security improvements using Helmet and CORS. Implemented global validation pipes and exception filters for consistent request handling. Dynamically configured app PORT and logging for startup information.
Introduced a HealthController to verify application status. Includes an endpoint to check database connectivity and returns health status with a timestamp.
Enhanced AppModule by adding support for caching (Redis), scheduling, throttling, and multiple feature modules including AuthModule, CategoriesModule, ContentsModule, FavoritesModule, ReportsModule, TagsModule, and more. Improved environment validation and health check controller setup.
Added UsersModule to manage user-related operations. Includes UsersService for CRUD operations, consent updates, and 2FA handling. Implemented UsersController with endpoints for public profiles, account management, and admin user listing. Integrated with CryptoService and database schemas.
Added TagsModule to manage tags, including a TagsService for querying and sorting by popularity or recency. Created TagsController with endpoint to retrieve paginated and searchable tag data. Integrated with database and relevant schemas.
Implemented SessionsModule and SessionsService to manage user sessions. Includes methods for session creation, refresh token rotation, and session revocation. Integrated with database and CryptoService for secure token handling.
Implemented a `getUploadUrl` method in S3 service to generate presigned URLs for uploading files. Includes support for custom bucket names and expiry times, with error handling and logging.
Added ReportsModule to manage user reports. Includes service methods for creating, retrieving, and updating report statuses, as well as controller endpoints for handling these operations. Integrated with authentication, role-based access control, and database logic.
Introduced MediaModule with MediaService to handle antivirus scanning using ClamAV and media file processing for images (webp/avif) and videos (webm/av1). Includes media-related interfaces and module exports for broader application integration.
Implemented FavoritesModule to manage user favorites. Includes service methods for adding, removing, and listing favorites, along with appropriate database integrations and API endpoints.
Added `categories` and `favorites` database schemas with full type inference support. Integrated categories into `content` schema with new properties (`categoryId`, `slug`, `views`, and `usageCount`). Updated `tags` schema to include `userId` with reference to `users`. Exported new schemas in index for broader usage.