A comprehensive web application for managing photo mosaics and partner domains.
Mosaic is a full-stack application that provides:
- Photo mosaic generation and management
- Partner domain management
- SSL certificate automation
- Payment processing integration
- Admin dashboard
- Public-facing website
- Language: Go
- Database: PostgreSQL
- Cache: Redis
- Storage: MinIO (S3-compatible)
- AI: Stable Diffusion integration
- Admin Dashboard: React.js
- Public Site: React.js with Vite
- Styling: SCSS, Tailwind CSS
- Containerization: Docker & Docker Compose
- Web Server: Nginx
- SSL: Let's Encrypt with automatic renewal
- Monitoring: Grafana, Prometheus, Loki
- Clone the repository:
git clone <repository-url>
cd Mosaic- Copy environment file:
cp .env.example .env-
Configure your environment variables in
.env -
Configure GitLab CI/CD Variables (for production deployment):
Go to your GitLab project → Settings → CI/CD → Variables and add:
| Variable | Description | Protected | Masked |
|---|---|---|---|
PRODUCTION_SERVER_IP |
Production server IP address | ✅ | ❌ |
PRODUCTION_USER |
SSH username for deployment | ✅ | ❌ |
SSH_PRIVATE_KEY |
SSH private key for server access | ✅ | ✅ |
DEFAULT_ADMIN_EMAIL |
Admin email for API authentication | ✅ | ❌ |
DEFAULT_ADMIN_PASSWORD |
Admin password for API authentication | ✅ | ✅ |
- Start the application:
# Development
docker compose --env-file .env -f deployments/docker/docker-compose.dev.yml up --build
# Production
docker compose --env-file .env -f deployments/docker/docker-compose.prod.yml up --buildSee .env.example for all required environment variables.
For the backend to trigger GitLab pipelines, you need these variables in your .env file:
# GitLab Configuration
GITLAB_BASE_URL=https://gitlab.com
GITLAB_API_TOKEN=glpat-your-api-token-here
GITLAB_PROJECT_ID=your-project-id
GITLAB_TRIGGER_TOKEN=glptt-your-trigger-token-here- Docker & Docker Compose
- Go 1.24+
- Node.js 20+
- PostgreSQL
- Redis
# Backend tests
cd backend
go test ./...The project includes CI/CD pipeline configuration for GitLab with automatic domain management.
The system automatically triggers CI/CD pipelines when:
- New partner is created with a domain
- Partner domain is updated
- Partner domain is removed
The pipeline automatically:
- Updates nginx configuration with new domains
- Generates SSL certificates for new domains
- Cleans up unused SSL certificates
- Updates monitoring configuration
- Reloads nginx configuration
# Update SSL certificates
./scripts/update-ssl-certificates.sh
# Clean up unused SSL certificates
./scripts/cleanup-unused-ssl-certificates.sh
# Health check
./scripts/health-check.shThis project is licensed under the MIT License - see the LICENSE file for details.
This is an open-source version of the Mosaic project. The mosaic generation functionality requires proprietary commercial components that are not included:
- Python scripts for mosaic generation
- Excel palette files with color schemes
- These components must be obtained separately to enable full mosaic generation capabilities
All other functionality works normally without these commercial components.