From 967abcaa9f922ec57863a5ddccb64173bdb5e9d3 Mon Sep 17 00:00:00 2001 From: Charles N Wyble Date: Tue, 13 Jan 2026 20:41:21 -0500 Subject: [PATCH] feat: add root configuration files for mono-repo setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add environment template, git ignore rules, and Go workspace configuration to support mono-repo development workflow. - .env.example: Environment variables template for all services - .gitignore: Git ignore rules for Go, Docker, Terraform, Ansible - go.work: Go workspace file for multi-module support 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush --- .env.example | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ go.work | 15 +++++++++++ 3 files changed, 167 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 go.work diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f1386bd --- /dev/null +++ b/.env.example @@ -0,0 +1,76 @@ +# Environment Variables Template +# Copy this file to .env and fill in actual values + +# Application +APP_NAME=YDN +APP_ENV=development +APP_PORT=8080 + +# Database (PostgreSQL) +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_DB=ydn +POSTGRES_USER=ydn_user +POSTGRES_PASSWORD=changeme + +# Redis +REDIS_HOST=redis +REDIS_PORT=6379 +REDIS_PASSWORD= + +# Dolibarr (MySQL) +DOLIBARR_DB_HOST=mysql +DOLIBARR_DB_PORT=3306 +DOLIBARR_DB=dolibarr +DOLIBARR_USER=dolibarr_user +DOLIBARR_PASSWORD=changeme +DOLIBARR_API_TOKEN=changeme + +# Stripe +STRIPE_PUBLISHABLE_KEY=pk_test_... +STRIPE_SECRET_KEY=sk_test_... +STRIPE_WEBHOOK_SECRET=whsec_... + +# OVH +OVH_ENDPOINT=ovh-eu +OVH_APPLICATION_KEY=changeme +OVH_APPLICATION_SECRET=changeme +OVH_CONSUMER_KEY=changeme + +# Email (SMTP) +SMTP_HOST=smtp.mailgun.org +SMTP_PORT=587 +SMTP_USER=changeme +SMTP_PASSWORD=changeme + +# JWT +JWT_SECRET=changeme +JWT_EXPIRATION=24h + +# Infrastructure +TERRAFORM_BACKEND=local +ANSIBLE_VAULT_PASSWORD=changeme + +# Grav CMS +GRAV_ADMIN_USER=admin +GRAV_ADMIN_PASSWORD=changeme +GRAV_ADMIN_EMAIL=admin@example.com + +# Terraform Providers +TERRAFORM_PROVIDER_LOCAL=libvirt +TERRAFORM_PROVIDER_PROD=ovh + +# Libvirt (Local Testing) +LIBVIRT_URI=qemu:///system + +# OVH (Production) +OVH_PROJECT_ID=changeme +OVH_SSH_KEY_NAME=ydn-deploy + +# Monitoring +ENABLE_METRICS=true +METRICS_PORT=9090 + +# Logging +LOG_LEVEL=info +LOG_FORMAT=json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b2fa46 --- /dev/null +++ b/.gitignore @@ -0,0 +1,76 @@ +# Binaries +bin/ +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Go workspace +go.sum +*.test +*.out + +# Environment +.env +.env.local +.env.*.local + +# Logs +logs/ +*.log + +# Temporary files +tmp/ +temp/ +*.tmp + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Terraform +infrastructure/terraform/**/.terraform/ +infrastructure/terraform/**/.terraform.lock.hcl +infrastructure/terraform/**/terraform.tfstate +infrastructure/terraform/**/terraform.tfstate.* +infrastructure/terraform/**/crash.log +infrastructure/terraform/**/override.tf +infrastructure/terraform/**/override.tf.json + +# Ansible +infrastructure/ansible/**/retry +infrastructure/ansible/**/.*.swp +infrastructure/ansible/**/*.retry + +# Docker +docker/docker-compose.override.yml + +# Grav CMS +web/grav/cache/ +web/grav/logs/ +web/grav/tmp/ +web/grav/images/ +web/grav/user/accounts/ +web/grav/user/config/site.yaml.local + +# Node modules (if any) +node_modules/ + +# OS +.DS_Store +Thumbs.db + +# Backups +backups/ +*.backup +*.bak + +# Secrets +*.key +*.pem +*.crt +secrets/ diff --git a/go.work b/go.work new file mode 100644 index 0000000..b00c0db --- /dev/null +++ b/go.work @@ -0,0 +1,15 @@ +# YDN - YourDreamNameHere.com +# Go Workspace Configuration + +go 1.21 + +# Service modules +./services/api +./services/worker +./services/middleware + +# Shared packages +./pkg + +# Backend integration (if needed) +./backend/dolibarr