Skip to content

TasyaKh/wallpaperio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WallpaperIO

A modern wallpaper generation and management platform with AI-powered image generation capabilities. (light/night themes)

  1. page main with wallpapers
2025-07-18 15 11 57 wallpaperio online 57200562e002
  1. preview one wallpaper with similar images
2025-07-18 15 12 31 wallpaperio online 932306dcb9bf
  1. page categories
2025-07-18 15 12 58 wallpaperio online 347a37376e92
  1. page found similar wallpapers by loaded image
2025-07-18 15 13 57 wallpaperio online 3455581a8e8b
  1. login/auth page
2025-07-18 15 14 14 wallpaperio online 49037df11f13
  1. page favorite images
2025-07-18 15 14 34 wallpaperio online 3d8f60a29714
  1. page image generation (for admin only)
2025-07-18 15 21 25 wallpaperio online 103659d6f72c

πŸš€ Features

  • AI-powered wallpaper generation
  • Real-time image processing
  • RESTful API for wallpaper management
  • Modern web frontend
  • SSL/HTTPS support
  • Automatic certificate renewal

πŸ—οΈ Architecture

  • Frontend: React/Vite application
  • Backend: Go server with REST API
  • Image Generator: Python service with AI models
  • Database: PostgreSQL
  • Cache: Redis
  • Vector Database: Milvus
  • Reverse Proxy: Nginx with SSL
  • Container Orchestration: Docker Compose

πŸ“‹ Prerequisites

  • Docker and Docker Compose
  • Domain name pointing to your server
  • At least 4GB RAM (for Milvus)

πŸ› οΈ Installation

1. Clone the repository

git clone <repository-url>
cd wallpaperio

2. Set up environment variables

Create .env files in the following directories:

  • server/.env.prod
  • server_generator/.env.prod

3. Start the services

docker-compose up -d

πŸ”’ SSL Certificate Setup

Initial Certificate Generation

Step 1: Create directories for certbot

mkdir -p certbot/conf certbot/www

Step 2: Generate SSL certificates

docker-compose run --rm certbot certonly \
  --webroot \
  --webroot-path=/var/www/certbot \
  --email AkitaSpam@gmail.com \
  --agree-tos \
  --no-eff-email \
  -d wallpaperio.online \
  -d www.wallpaperio.online

Step 3: Restart nginx to load SSL certificates

docker-compose restart nginx

Step 4: Verify SSL is working

curl -I https://wallpaperio.online

Automatic Certificate Renewal

Add to crontab for monthly renewal:

crontab -e

Add this line:

0 12 1 * * cd /root/projects/wallpaperio && docker-compose run --rm certbot renew && docker-compose restart nginx

This renews certificates on the 1st of every month at 12:00 PM UTC.

🌐 Access Points

πŸ“ Project Structure

wallpaperio/
β”œβ”€β”€ frontend/                 # React frontend
β”œβ”€β”€ server/                   # Go backend API
β”œβ”€β”€ server_generator/         # Python image generation service
β”œβ”€β”€ data/                     # Persistent data storage
β”œβ”€β”€ certbot/                  # SSL certificates
β”‚   β”œβ”€β”€ conf/                 # Certificate configuration
β”‚   └── www/                  # Webroot for validation
β”œβ”€β”€ nginx.conf               # Nginx configuration
β”œβ”€β”€ docker-compose.yml       # Container orchestration
└── README.md               # This file

πŸ”§ Configuration

Nginx Configuration

The nginx.conf file handles:

  • HTTP to HTTPS redirects
  • SSL certificate configuration
  • API proxy to Go server
  • Frontend proxy to React app

Docker Compose Services

  • nginx: Reverse proxy with SSL
  • frontend: React application
  • go_server: Go API server
  • python_generator_server: AI image generation
  • celery_worker: Background task processing
  • postgres: Database
  • redis: Cache and message broker
  • milvus: Vector database
  • etcd: Milvus dependency
  • minio: Milvus dependency
  • attu: Milvus management UI

πŸš€ Deployment

Production Deployment

  1. Set up your domain DNS to point to your server
  2. Configure environment variables
  3. Generate SSL certificates
  4. Start services:
    docker-compose up -d

SSL Certificate Management

  • Manual renewal: docker-compose run --rm certbot renew
  • Check certificate status: docker-compose run --rm certbot certificates
  • Force renewal: docker-compose run --rm certbot renew --force-renewal

πŸ” Monitoring

Check Service Status

docker-compose ps

View Logs

# All services
docker-compose logs

# Specific service
docker-compose logs nginx
docker-compose logs go_server
docker-compose logs python_generator_server

SSL Certificate Status

# Check certificate expiration
openssl x509 -in certbot/conf/live/wallpaperio.online/fullchain.pem -text -noout | grep -A 2 "Validity"

πŸ›‘οΈ Security

  • SSL/TLS encryption enabled
  • Automatic certificate renewal
  • Containerized services
  • Environment variable configuration
  • No hardcoded secrets

πŸ”„ Maintenance

Regular Tasks

  • Monitor certificate expiration
  • Check service logs for errors
  • Update Docker images periodically
  • Backup database data

Troubleshooting

  • SSL issues: Check certificate paths and nginx configuration
  • Service not starting: Check logs with docker-compose logs <service>
  • Certificate renewal fails: Verify domain DNS settings

Releases

No releases published

Packages

 
 
 

Contributors