since foundational auth commit, im pulling the bare minimum auth framework code to main (neeeeds a lot of improvement before can be considered even prod or staging ready)
This update adds complete tenant management to the backend:
- Added tenant models, repositories, services, and handlers
- Added user registration flow that creates tenant + user in a transaction
- Added tenant retrieval endpoints (GetTenant, GetMyTenant)
- Configured new routes and integrated handlers into SetUpRoutes
- Wired repositories, services, and handlers into main.go
- Implemented slug generation, validation, and transactional creation logic
Includes updates across:
- models (tenants)
- repositories (tenant_repository)
- services (tenant_service)
- handlers (tenant_handler, user_handler)
- routes and main.go for full system integration
This commit relocates the database files to outside the backend folder, to the root aurganize folder.
- we initialise the backend Dockerfile.dev
- we expand the docker-compose to migrate our backend to docker
This improves developer experience and standardizes database operations for the entire backend team.
Story: E1-004 - PostgreSQL Database Setup
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
Available targets:\033[0m
help Show this help message
dev Run development server with hot reload (requires Air)
run Run server without hot reload
build Build production binary
build-local Build binary for local OS
test Run all tests
test-coverage Run tests and show coverage report
test-unit Run unit tests only
test-integration Run integration tests only
bench Run benchmarks
clean Clean build artifacts and caches
deps Download dependencies
deps-update Update all dependencies
lint Run linter
fmt Format code
vet Run go vet
check Run all checks (fmt, vet, lint, test)
migrate-up Run database migrations
migrate-down Rollback last migration
migrate-create Create new migration (usage: make migrate-create NAME=add_users_table)
docker-build Build Docker image
docker-run Run Docker container
install-air Install Air for hot reload
install-linter Install golangci-lint
install-migrate Install golang-migrate
install-tools Install all development tools
db-psql Connect to database with psql
seed Run database seed script
mod-graph Show dependency graph
mod-why Show why a package is needed (usage: make mod-why PKG=github.com/pkg/errors)
version Show version information
info Show project information
This commit establishes the foundation for all future development.
Story: E1-002 - Backend Project Initialization (makefile)
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)
- Create monorepo structure (backend, frontend, infrastructure, docs)
- Add comprehensive .gitignore for Go and Node.js
- Add detailed README with quick start guide
- Add PR template for standardized code reviews
- Add issue templates for bugs and features
- Setup branch structure (main, develop)
This commit establishes the foundation for all future development.
Story: E1-001 - Project Repository Setup~