Skip to content

06-07-2025

Pre-release
Pre-release
Compare
Choose a tag to compare
@fulleni fulleni released this 06 Jul 22:45
· 290 commits to main since this release
bf23c06

🚀 Major Architectural Upgrade: PostgreSQL Database Integration

This release marks a fundamental shift in the application's architecture, migrating the entire data persistence layer from an in-memory solution to a robust PostgreSQL database. This crucial upgrade ensures data durability, provides scalability, and establishes a production-grade foundation for the API.

Alongside this migration, this release also includes a suite of critical fixes and refinements that stabilize the new data layer, improve dependency management, and harden the overall application configuration, ensuring the new system is reliable and robust from day one.

✨ Key Features & Architectural Changes

  • PostgreSQL Data Persistence: The API no longer uses a temporary, in--memory store. All data is now persisted in a PostgreSQL database, managed via the DATABASE_URL environment variable. This is a foundational step towards a production-ready environment.
  • Automated Database Setup & Seeding: A new DatabaseSeedingService has been introduced to automatically and idempotently create all necessary database tables and seed initial data on server startup. This drastically simplifies first-time setup and ensures database consistency across all environments.
  • Centralized Dependency Management: The application's bootstrapping logic has been centralized. Core services and repositories are now managed and provided through a new AppDependencies singleton, ensuring consistent, efficient resource utilization and a cleaner middleware chain.

🔧 Stability Fixes & Core Refinements

  • Robust Data Type Handling: Resolved critical data integrity issues by implementing explicit serialization and deserialization logic for complex data types like DateTime and JSONB when interacting with the PostgreSQL database.
  • Enhanced Environment Configuration: Migrated to the dotenv package for loading environment variables, providing more robust configuration management and better error handling for missing variables.
  • Refined CORS Behavior: The CORS middleware has been improved to dynamically handle localhost origins for development while enforcing a strict CORS_ALLOWED_ORIGIN for production, with added logging for easier debugging.
  • Updated Database Schema: The database schemas and seeding logic for core entities have been updated to support richer data models and ensure correct data population.