Adding Postgres support and other minor fixes - #22
Open
mcobery wants to merge 4 commits into
Open
Conversation
- Enhanced the /teams/spend endpoint response structure to include new fields: overallSpendCents, totalMembers, limitedUsersCount, and maxUserSpendCents. - Updated the normalizeMemberSpend function to accommodate the new API shape, ensuring backward compatibility with pre-2026 data. - Added defensive defaults in the SQLite upsert function to prevent crashes due to missing fields. - Implemented tests to verify the normalization of both pre-2026 and post-2026 API shapes. Addresses GH issue ofershap#19. Co-authored-by: Marc Cobery <coberym@ae.com>
* feat: add PostgreSQL support and Docker configurations - Introduced PostgreSQL as an alternative database option, allowing users to set `DATABASE_SOURCE=postgres` for enhanced data handling. - Created `docker-compose.full.yml` for a full stack setup including the tracker app and PostgreSQL. - Added `docker-compose.postgres.yml` for standalone PostgreSQL service management. - Updated `package.json` and `package-lock.json` to include PostgreSQL dependencies (`pg` and `synckit`). - Enhanced error handling in the application to accommodate PostgreSQL integration. - Updated README with instructions for using PostgreSQL and Docker setup. This commit lays the groundwork for improved data management and scalability. * build(deps): update dependencies across the project - Bumped several dependencies including @tailwindcss/postcss to 4.2.1, resend to 6.9.3, and tailwindcss to 4.2.1. - Updated @elevenlabs/elevenlabs-js to 2.37.0, @types/node to 25.3.3, eslint to 10.0.2, lint-staged to 16.3.1, and typescript-eslint to 8.56.1. - These updates include minor and patch version changes to improve stability and performance. This commit ensures the project is using the latest compatible versions of its dependencies. * feat: add detect command to package.json for CLI functionality - Introduced a new script command "detect" in package.json to facilitate detection functionality via the CLI. - This addition enhances the usability of the CLI tools provided in the project. This commit improves the command-line interface capabilities for users. --------- Co-authored-by: Marc Cobery <coberym@ae.com>
- Introduced new CLI commands `reset` and `reset:postgres` in package.json to clear collected data from the database, allowing for a fresh start or post-testing cleanup. - Updated README with instructions on using the reset command, including options for wiping specific tables or all tables. - Enhanced project documentation to reflect the addition of the reset functionality and its usage. This commit improves data management capabilities for users. Co-authored-by: Marc Cobery <coberym@ae.com>
- Modified `.env.example` to include PostgreSQL configuration options for user, password, database, host, and port. - Updated `docker-compose` files to utilize environment variables for PostgreSQL settings, enhancing flexibility and security. - Adjusted npm scripts in `package.json` to remove hardcoded PostgreSQL URLs, allowing for dynamic configuration through the `.env` file. - Enhanced error handling in PostgreSQL-related scripts to ensure proper execution and user guidance. These changes improve the configurability and maintainability of the PostgreSQL integration. Co-authored-by: Marc Cobery <coberym@ae.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
overallSpendCents,totalMembers,limitedUsersCount, andmaxUserSpendCents.normalizeMemberSpendfunction to accommodate the new API shape, ensuring backward compatibility with pre-2026 data.Addresses GH issue #19.
Introduced PostgreSQL as an alternative database option, allowing users to set
DATABASE_SOURCE=postgresfor enhanced data handling.Created
docker-compose.full.ymlfor a full stack setup including the tracker app and PostgreSQL.Added
docker-compose.postgres.ymlfor standalone PostgreSQL service management.Updated
package.jsonandpackage-lock.jsonto include PostgreSQL dependencies (pgandsynckit).Enhanced error handling in the application to accommodate PostgreSQL integration.
Updated README with instructions for using PostgreSQL and Docker setup.
Bumped several dependencies including @tailwindcss/postcss to 4.2.1, resend to 6.9.3, and tailwindcss to 4.2.1.
Updated @elevenlabs/elevenlabs-js to 2.37.0, @types/node to 25.3.3, eslint to 10.0.2, lint-staged to 16.3.1, and typescript-eslint to 8.56.1.
These updates include minor and patch version changes to improve stability and performance.
Introduced a new script command "detect" in package.json to facilitate detection functionality via the CLI.
This addition enhances the usability of the CLI tools provided in the project.
Introduced new CLI commands
resetandreset:postgresin package.json to clear collected data from the database, allowing for a fresh start or post-testing cleanup.Updated README with instructions on using the reset command, including options for wiping specific tables or all tables.
Enhanced project documentation to reflect the addition of the reset functionality and its usage.
Modified
.env.exampleto include PostgreSQL configuration options for user, password, database, host, and port.Updated
docker-composefiles to utilize environment variables for PostgreSQL settings, enhancing flexibility and security.Adjusted npm scripts in
package.jsonto remove hardcoded PostgreSQL URLs, allowing for dynamic configuration through the.envfile.Enhanced error handling in PostgreSQL-related scripts to ensure proper execution and user guidance.