Skip to content

Venkatkalyan21/adalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AdAlChemy – AI-Powered Promotional Content Generator

AdAlChemy Banner License Version

🎯 Project Overview

AdAlChemy is an AI-driven tool designed to generate personalized promotional content such as banners and ad creatives for targeted marketing campaigns. It leverages machine learning and natural language processing to produce context-aware, engaging, and visually appealing promotional materials, helping businesses automate their advertising workflow and improve audience engagement.

πŸš€ Features

  • AI-Powered Content Generation: Utilizes OpenAI API and custom ML models for intelligent content creation
  • Multi-Format Support: Generate banners, social media posts, email campaigns, and ad creatives
  • Personalization Engine: Context-aware content tailored to target audience demographics
  • Real-time Preview: Instant visualization of generated promotional materials
  • Template Library: Pre-built templates for various industries and use cases
  • Export Options: Download in multiple formats (PNG, JPG, SVG, PDF)
  • Campaign Management: Organize and track your promotional campaigns
  • Analytics Dashboard: Monitor engagement and performance metrics

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 14 with App Router
  • UI Library: React 18
  • Styling: TailwindCSS
  • Components: shadcn/ui
  • Icons: Lucide React
  • State Management: Zustand
  • API Client: Axios

Backend

  • Runtime: Node.js 20+
  • Framework: Express.js
  • Authentication: JWT + bcrypt
  • Validation: Zod
  • API Documentation: Swagger/OpenAPI

AI/ML Service

  • Language: Python 3.11+
  • Framework: FastAPI
  • ML Libraries: TensorFlow, PyTorch
  • NLP: Transformers, spaCy
  • Image Generation: Pillow, OpenAI DALL-E API
  • Text Generation: OpenAI GPT-4 API

Database

  • Primary DB: MongoDB
  • ODM: Mongoose
  • Caching: Redis
  • File Storage: AWS S3 / Cloudinary

DevOps

  • Containerization: Docker
  • Orchestration: Kubernetes
  • CI/CD: GitHub Actions
  • Deployment: Vercel (Frontend), AWS ECS (Backend)
  • Monitoring: Prometheus + Grafana

πŸ“ Project Structure

AdAlChemy/
β”œβ”€β”€ frontend/                 # Next.js frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/             # App router pages
β”‚   β”‚   β”œβ”€β”€ components/      # React components
β”‚   β”‚   β”œβ”€β”€ lib/             # Utilities and helpers
β”‚   β”‚   β”œβ”€β”€ hooks/           # Custom React hooks
β”‚   β”‚   └── styles/          # Global styles
β”‚   β”œβ”€β”€ public/              # Static assets
β”‚   └── package.json
β”œβ”€β”€ backend/                 # Node.js/Express API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/     # Route controllers
β”‚   β”‚   β”œβ”€β”€ models/          # Database models
β”‚   β”‚   β”œβ”€β”€ routes/          # API routes
β”‚   β”‚   β”œβ”€β”€ middleware/      # Custom middleware
β”‚   β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”‚   └── utils/           # Utility functions
β”‚   └── package.json
β”œβ”€β”€ ml-service/              # Python AI/ML service
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ models/          # ML models
β”‚   β”‚   β”œβ”€β”€ services/        # AI services
β”‚   β”‚   β”œβ”€β”€ api/             # FastAPI routes
β”‚   β”‚   └── utils/           # Helper functions
β”‚   └── requirements.txt
β”œβ”€β”€ docker/                  # Docker configurations
β”‚   β”œβ”€β”€ frontend.Dockerfile
β”‚   β”œβ”€β”€ backend.Dockerfile
β”‚   └── ml-service.Dockerfile
β”œβ”€β”€ k8s/                     # Kubernetes manifests
β”‚   β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ backend/
β”‚   └── ml-service/
β”œβ”€β”€ .github/                 # GitHub Actions workflows
β”‚   └── workflows/
└── docker-compose.yml       # Local development setup

🏁 Getting Started

Prerequisites

  • Node.js 20+ and npm/yarn
  • Python 3.11+
  • MongoDB (local or Atlas)
  • Docker and Docker Compose (optional)
  • OpenAI API Key

Environment Variables

Create .env files in each service directory:

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:5000
NEXT_PUBLIC_ML_API_URL=http://localhost:8000

Backend (.env)

PORT=5000
MONGODB_URI=mongodb://localhost:27017/adalchemy
JWT_SECRET=your_jwt_secret_here
OPENAI_API_KEY=your_openai_api_key
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
REDIS_URL=redis://localhost:6379

ML Service (.env)

OPENAI_API_KEY=your_openai_api_key
MODEL_PATH=./models

Installation

Option 1: Docker (Recommended)

# Clone the repository
git clone https://github.com/yourusername/adalchemy.git
cd adalchemy

# Start all services
docker-compose up -d

# Access the application
# Frontend: http://localhost:3000
# Backend API: http://localhost:5000
# ML Service: http://localhost:8000
# API Docs: http://localhost:5000/api-docs

Option 2: Manual Setup

# Install frontend dependencies
cd frontend
npm install
npm run dev

# Install backend dependencies (in new terminal)
cd backend
npm install
npm run dev

# Install ML service dependencies (in new terminal)
cd ml-service
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000

πŸ“– API Documentation

Once the backend is running, visit:

  • Swagger UI: http://localhost:5000/api-docs
  • ML Service Docs: http://localhost:8000/docs

Key Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - User login
  • POST /api/auth/refresh - Refresh token

Content Generation

  • POST /api/generate/banner - Generate banner content
  • POST /api/generate/ad-copy - Generate ad copy
  • POST /api/generate/social-post - Generate social media post
  • GET /api/generate/templates - Get available templates

Campaigns

  • GET /api/campaigns - List campaigns
  • POST /api/campaigns - Create campaign
  • GET /api/campaigns/:id - Get campaign details
  • PUT /api/campaigns/:id - Update campaign
  • DELETE /api/campaigns/:id - Delete campaign

ML Service

  • POST /ml/generate-text - Generate promotional text
  • POST /ml/generate-image - Generate banner images
  • POST /ml/analyze-sentiment - Analyze content sentiment
  • POST /ml/optimize-content - Optimize for engagement

🎨 Usage Examples

Generate a Banner

const response = await fetch('http://localhost:5000/api/generate/banner', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_TOKEN'
  },
  body: JSON.stringify({
    productName: 'EcoBottle',
    targetAudience: 'environmentally conscious millennials',
    tone: 'friendly and inspiring',
    dimensions: { width: 1200, height: 628 },
    template: 'modern-minimal'
  })
});

const data = await response.json();
console.log(data.imageUrl, data.generatedText);

πŸ§ͺ Testing

# Frontend tests
cd frontend
npm test
npm run test:e2e

# Backend tests
cd backend
npm test
npm run test:integration

# ML service tests
cd ml-service
pytest

πŸš€ Deployment

Frontend (Vercel)

cd frontend
vercel --prod

Backend (AWS ECS)

# Build and push Docker image
docker build -f docker/backend.Dockerfile -t adalchemy-backend .
docker tag adalchemy-backend:latest your-registry/adalchemy-backend:latest
docker push your-registry/adalchemy-backend:latest

# Deploy using AWS CLI or Terraform

Kubernetes

# Apply all manifests
kubectl apply -f k8s/

# Check deployment status
kubectl get pods -n adalchemy

πŸ“Š Performance

  • Content Generation: < 3 seconds average
  • API Response Time: < 200ms
  • Concurrent Users: 1000+
  • Uptime: 99.9% SLA

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

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

πŸ‘₯ Team

  • Project Lead: [Your Name]
  • Tech Stack: React.js, Next.js, Node.js, Express, MongoDB, Python, TensorFlow, PyTorch, OpenAI API
  • Experience Level: Beginner-friendly with comprehensive documentation

πŸ™ Acknowledgments

  • OpenAI for GPT-4 and DALL-E APIs
  • shadcn/ui for beautiful components
  • The open-source community

πŸ“ž Support

For questions and support:

πŸ—ΊοΈ Roadmap

  • Multi-language support
  • Video ad generation
  • A/B testing framework
  • Advanced analytics
  • Mobile app
  • Collaborative workspaces
  • AI model fine-tuning interface
  • Integration with ad platforms (Google Ads, Facebook Ads)

Made with ❀️ by the AdAlChemy Team

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors