Ft postgress setup#2
Merged
Merged
Conversation
Added functionality to manage users with a PostgreSQL database. This includes endpoints for retrieving all users, ensuring user existence, and updating user profiles. The database connection is initialized at server startup, and necessary tables are created if they do not exist. Also updated tests to cover new user-related functionalities. Closes #123
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.
This pull request introduces PostgreSQL support to the project, updates documentation, and adds a new
/api/usersendpoint to both the backend and frontend. The most important changes are grouped below by theme.PostgreSQL integration and Docker Compose updates:
postgresservice to bothdocker-compose.ymlanddocker-compose.prod.yml, including default credentials and persistent storage via apostgres_datavolume. The server is now configured to use aDATABASE_URLenvironment variable for PostgreSQL connections, and documentation has been updated to explain configuration and usage. [1] [2] [3] [4] [5] [6] [7]postgresservice and passes the correctDATABASE_URLenvironment variable. [1] [2]API and client enhancements:
/api/usersendpoint to the API, with corresponding client code (getUsersinuserService.tsanduseUsersReact Query hook inhooks.ts). Comprehensive tests for these additions are included. [1] [2] [3] [4] [5] [6] [7] [8]Documentation improvements:
docs/postgres.mdfor PostgreSQL setup, updatedREADME.mdand project guidelines to reflect the new database support, and documented the new/api/usersendpoint. [1] [2] [3] [4] [5] [6]Lint and config tweaks:
plugin:react-hooks/recommended, removed unnecessarynodeenv from the client override, and cleaned up server override rules. [1] [2] [3]These changes collectively enable persistent user data storage with PostgreSQL, expose a new users listing API, and ensure the stack is well-documented and testable for both development and production.