Skip to content

Ft postgress setup#2

Merged
devdaviddr merged 5 commits into
mainfrom
ft-postgress-setup
Mar 10, 2026
Merged

Ft postgress setup#2
devdaviddr merged 5 commits into
mainfrom
ft-postgress-setup

Conversation

@devdaviddr

Copy link
Copy Markdown
Owner

This pull request introduces PostgreSQL support to the project, updates documentation, and adds a new /api/users endpoint to both the backend and frontend. The most important changes are grouped below by theme.

PostgreSQL integration and Docker Compose updates:

  • Added a postgres service to both docker-compose.yml and docker-compose.prod.yml, including default credentials and persistent storage via a postgres_data volume. The server is now configured to use a DATABASE_URL environment variable for PostgreSQL connections, and documentation has been updated to explain configuration and usage. [1] [2] [3] [4] [5] [6] [7]
  • The server service in Docker Compose now depends on the postgres service and passes the correct DATABASE_URL environment variable. [1] [2]

API and client enhancements:

  • Added a new /api/users endpoint to the API, with corresponding client code (getUsers in userService.ts and useUsers React Query hook in hooks.ts). Comprehensive tests for these additions are included. [1] [2] [3] [4] [5] [6] [7] [8]

Documentation improvements:

  • Added docs/postgres.md for PostgreSQL setup, updated README.md and project guidelines to reflect the new database support, and documented the new /api/users endpoint. [1] [2] [3] [4] [5] [6]

Lint and config tweaks:

  • Improved ESLint configuration: added plugin:react-hooks/recommended, removed unnecessary node env 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.

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
@devdaviddr devdaviddr merged commit 4a251cd into main Mar 10, 2026
1 check passed
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