75cff49e85838d9a2505ca5159db8605cbe4b7e6
Implement provider-agnostic infrastructure for local testing and production deployment. Terraform configuration: - Local environment: libvirt provider (KVM/QEMU on Debian 13) - Production environment: OVH provider (cloud infrastructure) - Network and VM provisioning - SSH key management - State management (local and S3 backends) Ansible playbooks: - VM provisioning (OS hardening, Docker, Cloudron) - Security configuration (UFW, fail2ban) - Application setup - Monitoring (node exporter) Inventory management: - Local VMs for testing - Production instances - Dynamic inventory support Provider abstraction: - Same Terraform modules work for both providers - Same Ansible playbooks work for all environments - Easy swap between local testing and production 💘 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%