2799686c054f9c311ec8fb9cc35ae083e44552c1
Add Docker configuration for all services in mono-repo. Services containerized: - API service: Main HTTP server (port 8080) - Worker service: Background jobs (port 8081) - Middleware service: VPS provisioning (port 8082) - Dolibarr: ERP/CRM system with MySQL (port 8082) - Grav CMS: Website content (port 8083) - PostgreSQL: Application database (port 5432) - Redis: Queue and cache (port 6379) - MySQL: Dolibarr database (port 3306) Features: - Multi-stage builds for Go services - Health checks for all containers - Named volume persistence - Dependency management between services - Environment variable configuration Container naming: YDN-Dev-* for development 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
YDN (YourDreamNameHere.com)
Mono-Repo SaaS Platform for Sovereign Hosting
Business Model
- Price: $250/month per domain
- Customer provides: Credit card, domain name, email address
- Customer receives: OVH domain registration, OVH VPS provisioning, Cloudron installation, Cloudron DNS integration with OVH, Cloudron superadmin invite
Quick Start
Development Setup
make setup
make dev
Run Tests
make test
Local VM Testing
make terraform-local
make ansible-local
make test-e2e
Project Structure
YDN/
├── services/ # Go microservices
│ ├── api/ # Main HTTP API
│ ├── worker/ # Background jobs
│ └── middleware/ # VPS provisioning
├── web/grav/ # Grav CMS (website)
├── backend/dolibarr/ # Dolibarr (ERP/CRM)
├── infrastructure/ # Terraform + Ansible
│ ├── terraform/ # VM provisioning
│ └── ansible/ # Post-VM config
├── docker/ # Docker configurations
├── config/ # Environment configs
├── docs/ # Documentation
├── scripts/ # Utility scripts
├── tests/ # Test suites
└── pkg/ # Shared packages
Technology Stack
| Component | Technology |
|---|---|
| API | Go 1.21, Gin Framework |
| Worker | Go 1.21, Redis Queue |
| Middleware | Go 1.21, VPS Abstraction |
| CMS | Grav (Flat-file PHP) |
| ERP/CRM | Dolibarr (PHP/MySQL) |
| IaC | Terraform (libvirt/OVH providers) |
| Configuration | Ansible |
| Database | PostgreSQL, Redis, MySQL |
| Payments | Stripe |
| Infrastructure | OVH (Production), KVM/QEMU (Testing) |
Development Workflow
1. Local Development
make dev # Start Docker stack
make dev-logs # View logs
make dev-stop # Stop stack
2. VM Testing
# Provision local VM via Terraform
make terraform-local
# Configure via Ansible
make ansible-local
# Run E2E tests
make test-e2e
# Cleanup
make terraform-destroy-local
3. Production Deployment
# Update Terraform configs
cd infrastructure/terraform/environments/production
terraform apply
# Configure VMs
cd ../../..
make ansible-production
# Deploy services
make deploy
Key Features
- Mono-repo: All services in single repository
- Provider-agnostic: Test locally (KVM/QEMU), deploy to production (OVH)
- Containerized: Everything in Docker containers
- Dolibarr Integration: Complete ERP/CRM (prospects, customers, contracts, invoices)
- Grav CMS: Flat-file CMS for public website
- Automated Provisioning: Terraform + Ansible workflow
- WCAG 2.1 AA: Accessibility compliant
Documentation
- PRD.md: Product Requirements
- AGENTS.md: Development instructions for AI agents
- docs/: Detailed documentation
docs/api/: API documentationdocs/architecture/: System architecturedocs/operations/: Operational guides
Make Commands
make help # Show all commands
make dev # Start development stack
make test # Run all tests
make deploy # Deploy to production
make backup # Run backups
make lint # Run linters
make fmt # Format code
Environment Setup
Prerequisites
- Docker and Docker Compose
- Go 1.21 or later
- Terraform 1.5+
- Ansible 2.14+
- KVM/QEMU (for local VM testing)
Configuration
Copy .env.example to .env and configure:
- Stripe API keys
- OVH API credentials
- Database passwords
- JWT secrets
- Email provider settings
Security
- All secrets in environment variables
- SSH keys via Ansible Vault
- TLS/SSL for all services
- Firewall rules via Terraform/Ansible
License
See LICENSE file
Support
For support, see docs/operations/ or create issue in repository.
Languages
HCL
61.9%
Makefile
38.1%