Commit Graph

3 Commits

Author SHA1 Message Date
Rezon Philip 0182a1ae9e chore(postgres_db): Add full PostgreSQL tooling (migrations, seeds, backup, restore, health-check)
This commit introduces a complete PostgreSQL developer workflow for the Aurganize backend,
fully integrated with the Dockerized database environment.

Included changes:
  • Added initial migration
  • Added development seed script with temporary RLS disable/enable logic
  • Added test operation script to validate if the entries are working as expected
  • Added docker-aware backup script:
        - Dumps DB from inside postgres container
        - Stores compressed .sql.gz backups outside repo
        - Auto-cleans old backups
  • Added docker-aware restore script:
        - Drops and recreates DB
        - Restores from compressed backups
  • Added Docker-based database health check:
        - Moved health_check.sql to database/tests/
        - Added health_check.sh wrapper to run through docker exec
  • Updated directory structure for database scripts and tests
  • Ensured all scripts auto-detect container, user, and file locations

This improves developer experience and standardizes database operations for the entire backend team.

Story: E1-004 - PostgreSQL Database Setup
2025-12-03 00:39:34 +05:30
Rezon Philip b99866db54 feat(echo server): Define backend api server using echo framework
API server (backend/cmd/api):
- we load configuration
- init logger
- create echo server instance
- we define the middleware pipeline
--- recover
--- request_id
--- logger_format
--- cors (ross-Origin Resource Sharing)
--- security_headers
--- gzip_compresssion
- route_mapping
- star_server
- graceful_shutdown

add-ons:
- healthCheckHandler()
- customHTTPErrorHandler()

This commit establishes the foundation for all future development.

Story: E1-002 - Backend Project Initialization (main echo server)
2025-11-29 20:52:17 +05:30
Rezon Philip 96651fceea feat(config,loggin): Defining global config loading and multi-level logging mechanism
Config (backend/internal/confi)
- Defined the global config loading in internal/config/config.go
- - Defined DatabaseSN() and RedisDSN() to expose their respective connection strings
- Defined the env example to refer to while creating the .env file in your local
Logging (backend/pkg/logger)
- Defined the global loggin mechanism ( logger.go )
- Created and validated the logging through tests ( logger_test.go )written and validated
- Added a reference ( example_test.go ) to refer to understand about usage of logging mechanims

This commit establishes the foundation for all future development.

Story: E1-002 - Backend Project Initialization (Partial)
2025-11-29 16:40:25 +05:30