Skip to content

Jblast94/spicy-hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spicy Hub - Adult Content Platform

A modern, scalable adult content platform with AI-powered image and text generation, built for AWS deployment with cost optimization in mind.

πŸš€ Features

  • AI Content Generation: NSFW image generation using Stable Diffusion
  • Text Generation: Adult-themed text content using DialoGPT
  • Premium Subscriptions: Stripe-powered subscription management
  • Affiliate Program: Built-in affiliate tracking and commission system
  • User Management: JWT-based authentication with user profiles
  • Content Storage: AWS S3 with CloudFront CDN
  • Scalable Infrastructure: Auto-scaling EC2 instances with spot pricing
  • Cost Optimized: Aurora Serverless, intelligent S3 tiering, spot instances

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   CloudFront    │────│  Application     │────│   RDS Aurora    β”‚
β”‚      (CDN)      β”‚    β”‚  Load Balancer   β”‚    β”‚   Serverless    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚                 β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚   Backend   β”‚    β”‚ Model Serverβ”‚
              β”‚  (FastAPI)  β”‚    β”‚ (GPU/Spot)  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚                 β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚    Redis    β”‚    β”‚     S3      β”‚
              β”‚   (Cache)   β”‚    β”‚  (Storage)  β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’° Cost Optimization

  • Spot Instances: Up to 90% savings on GPU instances
  • Aurora Serverless: Pay only for database usage
  • S3 Intelligent Tiering: Automatic cost optimization
  • CloudFront: Reduced bandwidth costs
  • Auto Scaling: Scale down during low usage

Estimated Monthly Costs:

  • Development: $50-100
  • Production (low traffic): $200-400
  • Production (high traffic): $800-1500

πŸ› οΈ Prerequisites

Required Tools

AWS Account Setup

  1. Create an AWS account
  2. Configure AWS CLI: aws configure
  3. Ensure you have permissions for:
    • EC2, VPC, ALB
    • RDS, S3, CloudFront
    • IAM, ECR
    • Auto Scaling

πŸš€ Quick Start

1. Clone and Setup

git clone https://github.com/Jblast94/spicy-hub.git
cd spicy-hub
cp .env.example .env

2. Configure Environment

Edit .env file with your settings:

# Required: Update these values
STRIPE_SECRET_KEY=sk_live_your_stripe_key
STRIPE_PUBLISHABLE_KEY=pk_live_your_stripe_key
JWT_SECRET=your-super-secret-jwt-key
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret

3. Deploy to AWS

# Make deploy script executable
chmod +x deploy.sh

# Run full deployment
./deploy.sh

4. Local Development (Optional)

# Start local environment
docker-compose up -d

# Access the application
open http://localhost

πŸ“ Project Structure

spicy-hub/
β”œβ”€β”€ backend/                 # FastAPI backend
β”‚   β”œβ”€β”€ main.py             # Main application
β”‚   β”œβ”€β”€ requirements.txt    # Python dependencies
β”‚   β”œβ”€β”€ Dockerfile         # Backend container
β”‚   └── alembic/           # Database migrations
β”œβ”€β”€ frontend/               # HTML/JS frontend
β”‚   └── index.html         # Single page application
β”œβ”€β”€ model-server/          # AI model server
β”‚   β”œβ”€β”€ main.py           # Model serving API
β”‚   β”œβ”€β”€ requirements.txt  # ML dependencies
β”‚   └── Dockerfile       # Model server container
β”œβ”€β”€ terraform/            # Infrastructure as code
β”‚   β”œβ”€β”€ main.tf          # AWS resources
β”‚   └── user_data.sh     # EC2 initialization
β”œβ”€β”€ nginx/               # Reverse proxy config
β”‚   └── nginx.conf      # Nginx configuration
β”œβ”€β”€ docker-compose.yml  # Local development
β”œβ”€β”€ deploy.sh          # Deployment script
└── .env.example      # Environment template

πŸ”§ Configuration

Environment Variables

Copy .env.example to .env and configure:

# Database
DATABASE_URL=postgresql://user:pass@host:5432/db

# Authentication
JWT_SECRET=your-secret-key

# Payment Processing
STRIPE_SECRET_KEY=sk_live_...
STRIPE_PUBLISHABLE_KEY=pk_live_...

# AWS Services
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
S3_BUCKET=your-bucket-name

# AI Models
MODEL_SERVER_URL=http://model-server:8000

Stripe Setup

  1. Create a Stripe account
  2. Get your API keys from the dashboard
  3. Configure webhook endpoints for subscription events
  4. Set up products and pricing in Stripe dashboard

AWS Setup

  1. Create S3 bucket for content storage
  2. Set up IAM user with appropriate permissions
  3. Configure CloudFront distribution (optional)
  4. Set up RDS Aurora Serverless database

πŸš€ Deployment

Local Development

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Production Deployment

# Deploy infrastructure
cd terraform
terraform init
terraform plan
terraform apply

# Deploy application
./deploy.sh

πŸ’³ Monetization Features

Subscription Tiers

  • Free: 5 generations per day
  • Premium ($9.99/month): Unlimited generations, higher quality
  • Pro ($19.99/month): Priority processing, custom models

Affiliate Program

  • 30% commission on referrals
  • Real-time tracking and analytics
  • Automated payouts via Stripe
  • External affiliate integration

Additional Revenue Streams

  • Pay-per-generation credits
  • Custom content requests
  • NFT marketplace integration
  • Premium model access

πŸ”’ Security

Authentication

  • JWT-based authentication
  • Password hashing with bcrypt
  • Rate limiting on API endpoints
  • CORS protection

Content Security

  • Age verification (18+)
  • Content moderation filters
  • NSFW warnings
  • Secure file storage in S3

Data Protection

  • HTTPS encryption
  • Database encryption at rest
  • PII data anonymization
  • GDPR compliance features

πŸ“Š Monitoring

Health Checks

  • Application health endpoints
  • Database connectivity checks
  • Model server status monitoring
  • S3 storage availability

Metrics

  • User registration and engagement
  • Generation success rates
  • Revenue and conversion tracking
  • System performance metrics

Alerts

  • High error rates
  • System resource usage
  • Failed payments
  • Model server downtime

πŸ§ͺ Testing

Load Testing

# Run load tests
k6 run load-test.yml

API Testing

# Test backend endpoints
curl -X POST http://localhost:8080/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"test@example.com","password":"password123"}'

πŸ”§ Troubleshooting

Common Issues

Database Connection Errors

  • Check DATABASE_URL environment variable
  • Ensure PostgreSQL is running
  • Verify network connectivity

Model Loading Failures

  • Check GPU availability
  • Verify model cache directory permissions
  • Ensure sufficient disk space

Stripe Integration Issues

  • Verify API keys are correct
  • Check webhook endpoint configuration
  • Ensure test/live mode consistency

Debug Mode

# Enable debug logging
export DEBUG=true
docker-compose up

πŸ“ˆ Scaling

Horizontal Scaling

  • Multiple backend instances behind load balancer
  • Separate model server instances for different models
  • Redis cluster for session management
  • CDN for static content delivery

Vertical Scaling

  • GPU instances for model server
  • High-memory instances for large models
  • SSD storage for faster I/O

Cost Optimization

  • Spot instances for non-critical workloads
  • Auto-scaling based on demand
  • S3 intelligent tiering
  • CloudFront caching

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Development Setup

# Clone your fork
git clone https://github.com/yourusername/spicy-hub.git

# Install dependencies
cd backend && pip install -r requirements.txt
cd ../model-server && pip install -r requirements.txt

# Run tests
pytest

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Legal Disclaimer

This platform is intended for adult content generation and must comply with:

  • Local and international laws
  • Age verification requirements (18+)
  • Content moderation guidelines
  • Platform terms of service

Users are responsible for ensuring compliance with applicable laws and regulations.

πŸ†˜ Support

  • Documentation: Check this README and inline code comments
  • Issues: Report bugs via GitHub Issues
  • Discussions: Use GitHub Discussions for questions
  • Email: Contact support@spicyhub.com

πŸ—ΊοΈ Roadmap

Phase 1 (Current)

  • βœ… Basic AI generation
  • βœ… User authentication
  • βœ… Payment processing
  • βœ… AWS deployment

Phase 2 (Next)

  • πŸ”„ Video generation
  • πŸ”„ Advanced model fine-tuning
  • πŸ”„ Mobile app
  • πŸ”„ API marketplace

Phase 3 (Future)

  • πŸ“‹ VR/AR integration
  • πŸ“‹ Blockchain/NFT features
  • πŸ“‹ Multi-language support
  • πŸ“‹ Advanced analytics

Built with ❀️ for the adult content creator community

About

AI-powered adult content generation platform with monetization features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors