docs: add comprehensive project documentation
Add project README, architecture documentation, and detailed setup guides for YDN mono-repo. - README.md: Project overview and quick start guide - ARCHITECTURE.md: Complete system architecture documentation - docs/architecture/mono-repo-setup.md: Setup confirmation and status Provides detailed information on: - Mono-repo structure and component responsibilities - Development workflow and commands - Infrastructure setup (local KVM/QEMU and production OVH) - Technology stack and compliance requirements 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
This commit is contained in:
165
README.md
Normal file
165
README.md
Normal file
@@ -0,0 +1,165 @@
|
||||
# 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
|
||||
```bash
|
||||
make setup
|
||||
make dev
|
||||
```
|
||||
|
||||
### Run Tests
|
||||
```bash
|
||||
make test
|
||||
```
|
||||
|
||||
### Local VM Testing
|
||||
```bash
|
||||
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
|
||||
```bash
|
||||
make dev # Start Docker stack
|
||||
make dev-logs # View logs
|
||||
make dev-stop # Stop stack
|
||||
```
|
||||
|
||||
### 2. VM Testing
|
||||
```bash
|
||||
# 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
|
||||
```bash
|
||||
# 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 documentation
|
||||
- `docs/architecture/`: System architecture
|
||||
- `docs/operations/`: Operational guides
|
||||
|
||||
## Make Commands
|
||||
|
||||
```bash
|
||||
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.
|
||||
Reference in New Issue
Block a user