Skip to content

[TMRW-54]: Push Notifications#2

Merged
ankemp merged 60 commits intomainfrom
push-notifications
May 27, 2025
Merged

[TMRW-54]: Push Notifications#2
ankemp merged 60 commits intomainfrom
push-notifications

Conversation

@ankemp
Copy link
Owner

@ankemp ankemp commented May 7, 2025

This pull request introduces significant changes to the tomorrow-api project, focusing on database configuration, entity updates, and the removal of the tomorrow-api-e2e application. Key updates include the migration to Sequelize for database management, the addition of new database entities, and the removal of end-to-end testing infrastructure. Below is a categorized summary of the most important changes:

Database Configuration and Entity Updates:

  • Added a Sequelize configuration file (.sequelizerc) and environment-specific configurations in sequelize.config.js to manage database connections and paths. [1] [2]
  • Updated the DBModule in db.module.ts to include new entities (EncryptedTaskEntity, PlainTaskEntity, UserEntity, PushNotificationSubscriptionEntity, and NotificationEntity) and added validation for the DB_PATH environment variable in production.
  • Renamed and refactored existing database entities (EncryptedTask, PlainTask) to follow a new naming convention (EncryptedTaskEntity, PlainTaskEntity) and updated column types (e.g., STRING to UUID) for consistency. [1] [2] [3] [4] [5]
  • Introduced two new entities: PushNotificationSubscriptionEntity to manage notification subscriptions and NotificationEntity to handle notifications with fields like scheduledAt, isSent, and metadata. [1] [2]

Removal of tomorrow-api-e2e Application:

  • Deleted the entire tomorrow-api-e2e application, including its configuration files (eslint.config.cjs, jest.config.ts, project.json, tsconfig.json, tsconfig.spec.json), support files (global-setup.ts, global-teardown.ts, test-setup.ts), and test files (tomorrow-api.spec.ts). [1] [2] [3] [4] [5] [6] [7] [8] [9]

Docker and Development Environment:

  • Updated the Dockerfile to use node:22-alpine as the base image, replaced the user setup with node, and added a /data volume for persistent storage.
  • Added .http files (health-check.http, test-notification.http) for testing API endpoints, including health checks and notification-related functionality. [1] [2]

Development Tools:

  • Updated .vscode/extensions.json to include the humao.rest-client extension for testing REST API requests.

@ankemp ankemp force-pushed the push-notifications branch from c06c663 to f518be5 Compare May 8, 2025 20:07
@ankemp ankemp requested a review from Copilot May 12, 2025 13:21
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces push notification support by integrating new modules, health indicators, and entities while also updating the database configuration.

  • Added NotificationsModule and health indicators for notifications and scheduler
  • Updated entity models to use UUIDs and added new push notification related entities
  • Removed e2e test configuration and test files, likely streamlining the codebase

Reviewed Changes

Copilot reviewed 99 out of 99 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/tomorrow-api/src/app/health/health.module.ts Added NotificationsModule import and registration for health checks
apps/tomorrow-api/src/app/health/health.controller.ts Added new health indicators for notifications and scheduler
apps/tomorrow-api/src/app/app.module.ts Integrated EventEmitterModule, ScheduleModule, and NotificationsModule
apps/tomorrow-api/src/app/_db/entities/*.ts Renamed entity classes to include "Entity" suffix and updated primary keys to use UUID types
apps/tomorrow-api/src/app/_db/db.module.ts Updated logging configuration and added new entities along with a production DB_PATH check
apps/tomorrow-api/sequelize.config.js Added production config for database storage
apps/tomorrow-api-e2e/* Removed e2e test configuration and support files
Comments suppressed due to low confidence (1)

apps/tomorrow-api-e2e/tsconfig.spec.json:1

  • The removal of e2e test configuration files reduces overall test coverage. Please confirm that alternative tests or strategies are in place to validate the new push notification functionality.
Removed entire file

@ankemp ankemp force-pushed the push-notifications branch 3 times, most recently from 33f23c3 to 39ef4f1 Compare May 18, 2025 10:59
@ankemp ankemp force-pushed the push-notifications branch from 75dcd3a to 0ef7802 Compare May 23, 2025 16:09
@ankemp ankemp marked this pull request as ready for review May 27, 2025 17:12
@ankemp ankemp merged commit d038986 into main May 27, 2025
4 checks passed
@ankemp ankemp deleted the push-notifications branch May 27, 2025 17:16
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