Skip to content

Adding Postgres support and other minor fixes - #22

Open
mcobery wants to merge 4 commits into
ofershap:mainfrom
mcobery:main
Open

Adding Postgres support and other minor fixes#22
mcobery wants to merge 4 commits into
ofershap:mainfrom
mcobery:main

Conversation

@mcobery

@mcobery mcobery commented Aug 4, 2026

Copy link
Copy Markdown
  • 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 #19.

  • 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.

  • 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 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.

  • 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.

mcobery and others added 4 commits June 11, 2026 14:44
- 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>
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