{"id":28963438,"url":"https://github.com/cododel/directus-alto","last_synced_at":"2025-07-29T00:32:51.404Z","repository":{"id":300065417,"uuid":"1004833228","full_name":"cododel/directus-alto","owner":"cododel","description":"A comprehensive Directus CMS template with Alto CLI - treat Directus as a full development framework with automated backups, environment sync, and streamlined workflows","archived":false,"fork":false,"pushed_at":"2025-07-19T13:15:20.000Z","size":4158,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-19T17:38:05.416Z","etag":null,"topics":["api","automation","backup-system","cli-tool","cms","database-management","development-tools","devops","directus","docker","docker-compose","framework","fullstack","postgresql","template","web-development"],"latest_commit_sha":null,"homepage":"https://t.me/+-Lb0XtXyk30zZTRi","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cododel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-19T08:50:57.000Z","updated_at":"2025-07-19T13:15:23.000Z","dependencies_parsed_at":"2025-06-20T05:46:49.005Z","dependency_job_id":null,"html_url":"https://github.com/cododel/directus-alto","commit_stats":null,"previous_names":["cododel/directus-alto"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/cododel/directus-alto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fdirectus-alto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fdirectus-alto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fdirectus-alto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fdirectus-alto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cododel","download_url":"https://codeload.github.com/cododel/directus-alto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cododel%2Fdirectus-alto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267610344,"owners_count":24115433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","automation","backup-system","cli-tool","cms","database-management","development-tools","devops","directus","docker","docker-compose","framework","fullstack","postgresql","template","web-development"],"created_at":"2025-06-24T04:11:06.132Z","updated_at":"2025-07-29T00:32:51.382Z","avatar_url":"https://github.com/cododel.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Directus Alto Framework Preview](docs/preview.png)\n\n# Directus Alto Framework Template\n\nA comprehensive Directus CMS template designed to treat Directus not just as a content management system, but as a full-featured development framework. This template includes the powerful **Alto CLI** tool for streamlined development workflows, robust backup systems, and environment synchronization capabilities.\n\n## 🚀 Features\n\n### Alto CLI - Your Directus Development Companion\n- **Database Management**: Flush, dump, and restore operations with intelligent backup naming\n- **Direct Tool Access**: Seamless psql and Redis CLI integration\n- **Directus Integration**: Built-in Directus CLI and directus-sync support with version detection\n- **Docker Compose Passthrough**: Use alto as a drop-in replacement for docker-compose commands\n\n### Production-Ready Infrastructure\n- **Automated Backups**: Sophisticated backup system with retention policies and incremental uploads\n- **Environment Sync**: Push/pull backups between development, staging, and production\n- **Error Recovery**: Comprehensive error handling with diagnostic preservation\n- **Monitoring**: Detailed logging and health checks\n\n### Developer Experience\n- **Quick Setup**: One-command environment initialization\n- **Hot Reloading**: Development-optimized Docker configuration\n- **Email Testing**: Integrated Mailpit for email development\n- **Extension Support**: Ready-to-use extension mounting system\n- **Fullstack Ready**: Easily extend to monorepo with frontend integration\n\n## 🛠 Quick Start\n\n### Prerequisites\n- **Docker \u0026 Docker Compose**: Container orchestration  \n- **Bash**: For alto CLI functionality\n- **Bun** (optional): Required only for `directus-sync` functionality\n\n### 1. Clone and Setup\n```bash\n# Use this template or clone\ngit clone git@github.com:cododel/directus-alto.git my-directus-project\ncd my-directus-project\n\n# Copy environment configuration\ncp example.env .env\n\n# Edit your environment variables\nnano .env  # Configure DB credentials, admin settings, etc.\n```\n\n### 2. Launch with Alto\n```bash\n# Make alto executable\nchmod +x alto\n\n# Start the entire stack\n./alto up -d\n\n# Check status\n./alto ps\n```\n\n### 3. Initialize Directus\n```bash\n# Create initial admin user and setup\n./alto directus bootstrap\n\n# Initialize directus-sync for schema management\n./alto init-directus-sync\n```\n\nYour Directus instance will be available at `http://localhost:8055`\n\n## 📋 Alto CLI Reference\n\nAlto is your primary interface for managing the Directus development environment.\n\n### Database Operations\n```bash\n# Flush database (reset schema)\n./alto db-flush\n\n# Create database backup\n./alto db-dump                    # Creates: {timestamp}_backup.sql (default name)\n./alto db-dump my-feature-backup  # Creates: {timestamp}_my-feature-backup.sql\n\n# Restore from backup\n./alto db-restore                 # Restores latest backup by file modification time\n./alto db-restore my-feature      # Finds backup containing \"my-feature\" in name\n./alto db-restore /path/to/backup.sql  # Restores specific backup file\n```\n\n**Database Backup Details:**\n- **File Format**: All backups are saved as `.sql` files with automatic timestamp prefix\n- **Naming**: `{YYYYMMDD_HHMMSS}_{name}.sql` (e.g., `20240115_143000_my-backup.sql`)\n- **Location**: `./directus/data/.alto/backups/` directory\n- **Default Name**: If no name provided, uses \"backup\" as the default name\n\n**Database Restore Logic:**\n- **Without arguments**: Automatically finds and restores the most recent backup by file modification time (not filename date)\n- **With name**: Searches for backups containing the specified name (partial match), selects latest by modification time if multiple found\n- **With full path**: Restores the exact backup file specified\n- **Safety**: Always flushes database first, requires confirmation before proceeding\n\n**Note**: \"Latest\" backup is determined by file modification time, not by the timestamp in the filename. This means if backup files are copied or moved, their modification time may differ from the creation date in the filename.\n\n### Direct Tool Access\n```bash\n# PostgreSQL CLI\n./alto psql\n./alto psql -c \"\\l\"\n\n# Redis CLI (if enabled)\n./alto redis\n./alto redis PING\n```\n\n### Directus Management\n```bash\n# Directus CLI (with version detection)\n./alto directus users create --email admin@example.com --password password --role administrator\n./alto d users list  # 'd' is an alias for 'directus'\n\n# Schema and data synchronization\n# Note: `alto` automatically detects your Directus version and uses the compatible\n# version of `directus-sync` (v2 for Directus 10, v3 for Directus 11+).\n./alto directus-sync pull all\n./alto ds push collections  # 'ds' is an alias for 'directus-sync'\n```\n\n### Docker Compose Passthrough\n```bash\n# All unrecognized commands pass through to docker-compose\n./alto up -d\n./alto down\n./alto logs -f directus\n./alto exec directus bash\n```\n\n## 💾 Backup System\n\n### Automated Backups\n```bash\n# Create backup with default settings\n./backup.sh\n\n# Custom backup location\n./backup.sh /path/to/backups\n\n# With custom retention\nBACKUP_RETENTION_DAYS=30 ./backup.sh\n```\n\n### Backup Features\n- **Compressed Database Dumps**: Automatic gzip compression with configurable levels\n- **Incremental Uploads**: Space-efficient file backups using hardlinks\n- **Retention Policies**: Time-based and count-based cleanup\n- **Error Recovery**: Failed backup analysis and recovery\n\n### Restore Operations\n```bash\n# Restore from specific backup\n./backup-restore.sh ./directus/data/backups/backup_latest\n\n# Restore from any backup directory\n./backup-restore.sh ./directus/data/backups/backup_2024-01-15_10-30-00_1705312200\n```\n\n## 🔄 Environment Synchronization\n\nSync databases and files between environments using the sync system.\n\n```bash\n# Pull from production to local\n./sync.sh pull prod\n\n# Pull from development to local\n./sync.sh pull dev\n\n# Create local backup only\n./sync.sh pull local\n\n# Push local backup to development (production pushes are restricted)\n./sync.sh push dev\n\n# Restore latest local backup\n./sync.sh push local\n```\n\n## 🏗 Project Structure\n\n```\ndirectus-alto/\n├── alto                           # Main CLI tool\n├── backup.sh                     # Backup system\n├── backup-restore.sh             # Restore system\n├── sync.sh                       # Environment sync\n├── docker-compose.yml            # Development stack\n├── docker-compose.base.yml       # Base services\n├── docker-compose.prod.yml       # Production overrides\n├── example.env                   # Environment template\n├── .gitignore                    # Git ignore patterns\n└── directus/\n    ├── Dockerfile                # Custom Directus image\n    ├── directus-sync.config.base.js  # Sync configuration\n    ├── extensions/               # Custom extensions\n    ├── migrations/               # Database migrations\n    ├── seed/                     # Seed data\n    └── data/\n        ├── backups/              # Backup storage\n        ├── logs/                 # Application logs\n        ├── uploads/              # User uploads\n        └── .alto/                # Alto CLI working directory\n```\n\n## ⚙️ Configuration\n\n### Environment Variables\n\nKey configuration options in your `.env` file:\n\n```bash\n# Directus Core Security (CRITICAL - MUST BE CHANGED)\n# Generate this using `npx directus bootstrap` or any random string generator.\n# It should be long, random, and secret.\n# See: https://directus.io/docs/configuration/security-and-limits\nSECRET=your_generated_secret_here\n\n# This should be the public-facing URL where Directus is accessible.\n# For local development, use localhost. For production, set this to your actual Directus URL.\nPUBLIC_URL=http://localhost:8055\n\n# Default admin account credentials (CHANGE FOR PRODUCTION)\nADMIN_EMAIL=admin@example.com\nADMIN_PASSWORD=admin\n# A static token for the first admin user, created during bootstrapping.\n# Also used by custom scripts like `alto` for `directus-sync`.\nADMIN_TOKEN=your_local_dev_token\n\n# Database Configuration\nDB_CLIENT=pg\nDB_HOST=database\nDB_PORT=5432\nDB_DATABASE=directus\nDB_USER=postgres\nDB_PASSWORD=your_database_password_here\n\n# Cache Configuration (optional, commented by default)\n# CACHE_ENABLED=true\n# CACHE_STORE=redis\n# REDIS=redis://cache:6379\n\n# Email Configuration (uses Mailpit for development)\nEMAIL_TRANSPORT=smtp\nEMAIL_FROM=noreply@example.com\nEMAIL_SMTP_HOST=mailpit\nEMAIL_SMTP_PORT=1025\n\n# Backup Configuration\nBACKUPS_DIR=./directus/data/backups\nBACKUP_RETENTION_DAYS=7\nBACKUP_RETENTION_COUNT=0\n\n# Sync Script Configuration\nPROD_SERVER=your-prod-server-alias\nDEV_SERVER=your-dev-server-alias\nREMOTE_PROJECT_PATH=/srv/backend-directus\n\n# Alto CLI Configuration\nALTO_BASE_DIR=./directus/data/.alto\n\n# Extensions Development (Development Only)\n# Enable polling-based file watching for extension hot-reloading on macOS/Windows + Docker\n# CHOKIDAR_USEPOLLING=true\n```\n\n⚠️ **Security Warning**: The default values above are for development only. **Always change SECRET, passwords, and tokens before deploying to production!**\n\n### Docker Services\n\n#### Development (docker-compose.yml)\n- **directus**: Main CMS application with custom extensions\n- **database**: PostgreSQL with PostGIS extensions\n- **mailpit**: Email testing (development only)\n- **cache**: Redis for caching (optional, commented by default)\n\n#### Production (docker-compose.prod.yml)\n- **directus**: Directus CMS backend\n- **database**: PostgreSQL database\n\n**Note**: The production compose file currently includes only base services. Frontend services can be added manually based on your chosen deployment strategy (see Fullstack Monorepo Setup section).\n\n## 🔧 Development Workflow\n\n### 1. Schema Development\n```bash\n# Work on your schema in Directus Admin UI\n# Pull changes to version control\n./alto ds pull all\n\n# Apply schema changes to other environments\n./alto ds push collections\n```\n\n### 2. Extension Development\n\n#### Creating Extensions\n```bash\n# Create a new extension interactively\n./alto make extension\n\n# Follow the prompts to choose:\n# - Extension type (endpoint, hook, interface, display, etc.)\n# - Extension name\n# - Language (JavaScript/TypeScript)\n# - Auto install dependencies\n\n# Alto will automatically:\n# - Place the extension in ./directus/extensions/\n# - Add Docker volume mount to docker-compose.base.yml\n# - Show next steps\n```\n\n#### Manual Extension Setup\n```bash\n# If you need to manually mount extensions in docker-compose.yml\n# volumes:\n#   - ./directus/extensions/my-extension:/directus/extensions/my-extension\n\n# Restart to load extensions\n./alto restart directus\n```\n\n#### Extension Hot-Reloading Issues (macOS/Windows + Docker)\n\nIf your extensions are not auto-reloading when files change in Docker on macOS or Windows, you may need to enable polling-based file watching:\n\n1. **Enable in your `.env` file:**\n```bash\n# Uncomment this line in your .env file\nCHOKIDAR_USEPOLLING=true\n```\n\n2. **Restart your containers:**\n```bash\n./alto restart directus\n```\n\n**Why this happens:** Docker containers use their own filesystem, and filesystem events from the host OS (macOS/Windows) may not propagate correctly to the container. This is a common issue documented in [Directus Issue #18721](https://github.com/directus/directus/issues/18721).\n\n**How polling works:** Instead of waiting for filesystem events, polling periodically checks for file changes. This is more CPU-intensive but works reliably across different OS/Docker combinations.\n\n**Performance note:** Only enable `CHOKIDAR_USEPOLLING` for development environments. Disable it in production to save CPU resources.\n\n#### Extension Development Workflow\n\n**Complete workflow with Alto CLI:**\n\n```bash\n# 1. Create extension\n./alto make extension\n# Choose: endpoint, my-api, TypeScript, Yes (install deps)\n\n# 2. Extension is automatically placed and mounted\n# 3. Develop your extension\ncd directus/extensions/my-api\nnpm run dev  # Watch mode for auto-compilation\n\n# 4. Extension auto-reloads in Directus (with CHOKIDAR_USEPOLLING=true)\n# 5. Test your changes at http://localhost:8055/my-api\n\n# 6. Build for production\nnpm run build\n```\n\n**Benefits of Alto's extension workflow:**\n- ✅ **Zero Configuration**: Automatic placement and Docker mounting\n- ✅ **Hot Reloading**: Instant feedback during development\n- ✅ **Cross-Platform**: Works on macOS, Windows, and Linux\n- ✅ **Production Ready**: Built extensions work immediately\n\n### 3. Database Snapshots\n```bash\n# Before major changes\n./alto db-dump before-migration     # Creates: {timestamp}_before-migration.sql\n\n# After testing  \n./alto db-dump after-migration      # Creates: {timestamp}_after-migration.sql\n\n# Rollback if needed\n./alto db-restore before-migration  # Finds latest backup containing \"before-migration\"\n```\n\n### 4. Environment Promotion\n```bash\n# Test locally, then promote to dev\n./sync.sh pull local\n./sync.sh push dev\n\n# Pull production data for testing\n./sync.sh pull prod\n./sync.sh push local\n```\n\n## 🎯 Fullstack Monorepo Setup\n\nThis template can be easily extended to a fullstack monorepo by adding your frontend application alongside Directus.\n\n### Adding Frontend Application\n\nChoose between two deployment strategies based on your frontend framework:\n\n### Option A: SPA + Nginx (React, Vue, Angular, Svelte)\n\nFor static Single Page Applications that generate build artifacts:\n\n1. **Create your frontend directory**:\n```bash\nmkdir frontend\ncd frontend\n# Initialize your SPA (React, Vue, Angular, Svelte, etc.)\n# npm create react-app . \n# npm create vue@latest .\n# npm create svelte@latest .\n```\n\n2. **Add Dockerfile for SPA**:\n```dockerfile\n# frontend/Dockerfile\n# Build stage\nFROM node:18-alpine AS builder\nWORKDIR /app\nCOPY package*.json ./\nRUN npm install\nCOPY . .\nRUN npm run build\n\n# Production stage with Nginx  \nFROM nginx:alpine AS runner\nCOPY --from=builder /app/dist /usr/share/nginx/html  # Adjust path: /app/build for React, /app/dist for Vue/Vite\nCOPY ./nginx.conf /etc/nginx/conf.d/default.conf\nEXPOSE 80\nCMD [\"nginx\", \"-g\", \"daemon off;\"]\n```\n\n3. **Add nginx config** (create `frontend/nginx.conf`):\n```nginx\nserver {\n    listen 80;\n    server_name localhost;\n    root /usr/share/nginx/html;\n    index index.html;\n\n    # Handle client-side routing for SPA\n    location / {\n        try_files $uri $uri/ /index.html;\n    }\n\n    # Gzip compression for better performance\n    gzip on;\n    gzip_vary on;\n    gzip_types\n        text/plain\n        text/css\n        text/xml\n        text/javascript\n        application/json\n        application/javascript\n        application/xml+rss\n        application/atom+xml\n        image/svg+xml;\n}\n```\n\n4. **Docker Compose setup**:\n```yaml\n# In docker-compose.prod.yml\nservices:\n  frontend:\n    build:\n      context: ./frontend\n      dockerfile: Dockerfile\n    ports:\n      - \"3000:80\"\n    environment:\n      - VITE_API_URL=${DIRECTUS_API_URL}     # for Vite (Vue/Svelte)\n      - REACT_APP_API_URL=${DIRECTUS_API_URL}  # for React\n```\n\n### Option B: Next.js with Server\n\nFor Next.js applications with server-side rendering:\n\n1. **Create your Next.js directory**:\n```bash\nmkdir frontend\ncd frontend\nnpx create-next-app@latest . --typescript --tailwind --eslint\n```\n\n2. **Add Dockerfile for Next.js**:\n```dockerfile\n# frontend/Dockerfile\n# Build stage\nFROM node:18-alpine AS builder\nWORKDIR /app\nENV NODE_ENV=production\nENV NEXT_TELEMETRY_DISABLED=1\n\nRUN npm install -g pnpm\nCOPY package*.json ./\nRUN pnpm install --no-frozen-lockfile --no-dev\nRUN pnpm add sharp\nCOPY . .\nCOPY deploy.env .env\nRUN pnpm run build\n\n# Production stage\nFROM oven/bun:1-alpine AS runner\nWORKDIR /app\nENV NODE_ENV=production\n\n# Copy necessary files from build stage\nCOPY --from=builder /app/public ./public\nCOPY --from=builder /app/.next/standalone ./\nCOPY --from=builder /app/.next/static ./.next/static\n\nEXPOSE 3000\nCMD [\"node\", \"server.js\"]\n```\n\n3. **Enable standalone output** (next.config.js):\n```javascript\n/** @type {import('next').NextConfig} */\nconst nextConfig = {\n  output: 'standalone',\n}\n\nmodule.exports = nextConfig\n```\n\n4. **Docker Compose setup**:\n```yaml\n# In docker-compose.prod.yml\nservices:\n  frontend:\n    build:\n      context: ./frontend\n      dockerfile: Dockerfile\n    ports:\n      - \"3000:3000\"\n    environment:\n      - NEXT_PUBLIC_API_URL=${DIRECTUS_API_URL}\n```\n\n**Note**: The current `docker-compose.prod.yml` only includes base services. To use frontend services, you'll need to add them manually based on your chosen option above.\n\n### Frontend Container Purpose\nThe frontend container serves a single purpose: **packaging your built frontend application into a lightweight, deployable Docker image**.\n\n**What it includes:**\n- Built static files (HTML, CSS, JS)\n- Nginx for serving static content only (Option A)\n- Next.js server (Option B)\n- SPA routing support\n- Gzip compression\n\n**What it does NOT include:**\n- API proxying or routing\n- Domain configuration\n- SSL termination\n- Backend services\n\n### Infrastructure Responsibilities\nDomain configuration, SSL, API routing, and load balancing should be handled by your infrastructure layer (external nginx, Traefik, Cloudflare, etc.), not by the application containers.\n\n### Monorepo Structure\n\n**Option A: SPA + Nginx**\n```\ndirectus-alto/\n├── alto                           # CLI tool\n├── backup.sh                     # Backup system\n├── sync.sh                       # Environment sync\n├── frontend/                     # Your SPA frontend\n│   ├── Dockerfile                 # Multi-stage build with Nginx\n│   ├── nginx.conf                 # Nginx config for static serving\n│   ├── package.json\n│   ├── src/\n│   └── dist/                      # Build output (gitignored)\n├── directus/                     # Backend CMS\n└── docker-compose.*.yml          # Container orchestration\n```\n\n**Option B: Next.js Server**\n```\ndirectus-alto/\n├── alto                           # CLI tool\n├── backup.sh                     # Backup system\n├── sync.sh                       # Environment sync\n├── frontend/                     # Your Next.js app\n│   ├── Dockerfile                 # Next.js standalone build\n│   ├── next.config.js             # Next.js config with standalone output\n│   ├── package.json\n│   ├── pages/ or app/             # Next.js routes\n│   └── .next/                     # Build output (gitignored)\n├── directus/                     # Backend CMS\n└── docker-compose.*.yml          # Container orchestration\n```\n\n### Benefits of Monorepo Approach\n- **Unified Repository**: Single repository for entire application stack\n- **Shared Configuration**: Common environment variables and deployment scripts\n- **Consistent Deployment**: Deploy entire stack together in production\n- **Schema Synchronization**: Keep frontend types in sync with Directus schema\n- **Simplified CI/CD**: Single pipeline for both frontend and backend\n\n### Development Workflow\n\n**Backend Development:**\n```bash\n# Start Directus and supporting services\n./alto up -d\n\n# Services available at:\n# Directus: http://localhost:8055\n# Mailpit: http://localhost:8025\n```\n\n**Frontend Development (both options):**\n```bash\n# Local development with hot reloading\ncd frontend\n\n# For SPA (React/Vue/Angular/Svelte)\nnpm run dev      # Usually http://localhost:5173 (Vite) or :3000 (React)\n\n# For Next.js\nnpm run dev      # Usually http://localhost:3000\n```\n\n**Container Testing:**\n```bash\n# Build and test your frontend container locally\ndocker-compose -f docker-compose.prod.yml build frontend\ndocker-compose -f docker-compose.prod.yml up frontend\n\n# For SPA: Container serves static files on http://localhost:3000\n# For Next.js: Container runs server on http://localhost:3000\n```\n\n**Production Build:**\n```bash\n# Build all images for deployment\ndocker-compose -f docker-compose.prod.yml build\n\n# Deploy according to your infrastructure setup\n```\n\n### Development Best Practices\n\n**Backend:**\n- Use `alto` CLI for all Directus operations and database management\n- Database dumps and restores are managed through `alto db-dump` / `alto db-restore`\n- Schema changes tracked via `alto directus-sync`\n\n**Frontend:**\n- **Local Development**: Always use `npm run dev` for hot reloading and fast iteration\n- **API Configuration**: Point to `http://localhost:8055` in your development environment\n- **Container Testing**: Build and test containers before deployment to catch build issues early\n- **Environment Variables**: Use different variable names based on your framework:\n  - Vite: `VITE_API_URL`\n  - React: `REACT_APP_API_URL` \n  - Next.js: `NEXT_PUBLIC_API_URL`\n\n**Deployment:**\n- Frontend containers are lightweight and self-contained\n- Infrastructure handles routing, SSL, and domain configuration\n- Use `docker-compose.prod.yml` to build production images\n\n## 📚 Advanced Usage\n\n### Custom Commands\nAlto supports custom configurations:\n\n```bash\n# Use custom config file\n./alto --config custom.env up -d\n\n# Override base directory\nALTO_BASE_DIR=/custom/path ./alto db-dump\n```\n\n### Backup Automation\nSet up automated backups with cron:\n\n```bash\n# Daily backups at 2 AM\n0 2 * * * cd /path/to/project \u0026\u0026 ./backup.sh \u003e\u003e /var/log/directus-backup.log 2\u003e\u00261\n```\n\n### Production Deployment\n1. Use `docker-compose.prod.yml` for production\n2. Configure proper environment variables\n3. Set up backup automation\n4. Configure reverse proxy (nginx/traefik)\n5. Set up monitoring and alerts\n\n## 🔒 Security Considerations\n\n- **Environment Files**: Never commit `.env` files\n- **Production Access**: Sync script restricts production pushes\n- **Backup Security**: Secure backup directories with proper permissions\n- **Token Management**: Use strong, unique tokens for each environment\n- **Default Credentials**: Always change SECRET, passwords, and tokens before production deployment\n\n## 🤝 Contributing\n\nThis template is designed to be forked and customized for your specific needs. Consider contributing improvements back to help the community.\n\n## 📄 License\n\nMIT License\n\nCopyright (c) 2024 Alexander Kuznetsov (@cododel)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n## 🆘 Support\n\n- **Documentation**: Check the comprehensive inline help with `./alto --help`\n- **Troubleshooting**: Error logs are preserved in `directus/data/backups/error_logs/`\n- **Community**: [Telegram @Cododelia](https://t.me/+-Lb0XtXyk30zZTRi) - Кододельня сообщества разработчиков\n\n---\n\n**Built with ❤️ for developers who want to use Directus as more than just a CMS**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcododel%2Fdirectus-alto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcododel%2Fdirectus-alto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcododel%2Fdirectus-alto/lists"}