A comprehensive multi-tenant SaaS platform for restaurant management built with Go, Gin, PostgreSQL, and AWS.
- Backend: Go (Golang) 1.22+
- Web Framework: Gin v1.9+
- Database: PostgreSQL 15+ (via Amazon RDS)
- ORM: GORM v1.25+ (with PostgreSQL driver)
- Cloud: AWS (RDS, S3, IAM, STS, CloudWatch)
- Tenancy Model: Bridge Model with PostgreSQL Row Level Security (RLS) and S3 Access Points
- Database: Amazon RDS PostgreSQL with RLS for tenant isolation
- Storage: Amazon S3 with Access Points for tenant-specific access
- Compute: AWS Fargate/ECS (containerized Go application)
- Authentication: JWT-based authentication
- Monitoring: AWS CloudWatch for logs and metrics
restaurant-backend/
├── cmd/
│ └── server/
│ └── main.go
├── internal/
│ ├── config/
│ ├── handlers/
│ ├── middleware/
│ ├── models/
│ ├── repositories/
│ └── services/
├── pkg/
│ └── utils/
├── migrations/
├── docker/
└── go.mod
- Go 1.23 or higher
- PostgreSQL 15+ (or Amazon RDS)
- AWS CLI configured (for S3 features)
- Docker (optional, for containerization)
- Make (optional, for Makefile commands)
-
Install dependencies:
make setup # or go mod download -
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Run database migrations:
make migrate # or go run cmd/server/main.go --migrate -
Start the server:
make run # or go run cmd/server/main.goFor development mode with debug logging:
make run-dev
make help # Show all available commands
make setup # Install dependencies
make build # Build the application
make run # Run the application
make run-dev # Run in development mode
make migrate # Run database migrations
make test # Run tests
make test-coverage # Run tests with coverage
make clean # Clean build artifacts
make fmt # Format code
make docker-build # Build Docker image
make docker-run # Run Docker container-
Initialize Go module (if not already done):
go mod init restaurant-backend go mod tidy
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration -
Run database migrations:
go run cmd/server/main.go --migrate
-
Start the server:
go run cmd/server/main.go
go test ./...go build -o bin/server cmd/server/main.godocker build -t restaurant-backend:latest .See deployment guide for detailed AWS deployment instructions.
-
KAM account Email: admin@admin.com Password: password
-
Restaurant account Email: john@goldenfork.com Password: password