Skip to content

darsh94/brand-asset-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brandbolt

Generate complete brand asset packages using Gemini 3 AI

Built for the Gemini 3 Hackathon 2026 - A powerful tool that takes brand guidelines and generates a complete suite of visual assets including logos, social media templates, presentation decks, email templates, and marketing materials.

📖 Read the full story behind Brandbolt

🧪 Testing Guide for Judges

Features

  • Logo Generation: Multiple variations (primary, horizontal, icon-only, monochrome, reversed)
  • Social Media Templates: Instagram, Twitter/X, Facebook, LinkedIn, YouTube
  • Presentation Decks: Professional slides with consistent branding
  • Email Templates: Welcome, newsletter, promotional, and more
  • Marketing Materials: Banners, flyers, business cards, posters
  • Self-Correcting AI: Validates generated assets against brand guidelines and regenerates if quality threshold not met
  • Brand Consistency Scoring: Each asset scored on color adherence, typography, tone alignment, and brand recognition
  • Competitive Differentiation: Analyzes competitor visuals and messaging to ensure generated assets are clearly differentiated in the market
  • Campaign-Level Asset Bundling: Delivers complete, ready-to-deploy campaigns with unified messaging, coordinated assets, and a deployment checklist
  • PDF Brand Guidelines Upload: Upload existing brand guidelines PDF to auto-fill the form using AI extraction

Tech Stack

  • Backend: Python, FastAPI, google-genai SDK
  • Frontend: React, TypeScript, Vite, Tailwind CSS
  • AI Models:
    • gemini-3-flash-preview: Brand analysis, validation, and understanding
    • gemini-3-pro-image-preview: High-fidelity image generation with legible text

Quick Start

Prerequisites

Backend Setup

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env and add your GOOGLE_API_KEY

# Run the server
python main.py

The API will be available at http://localhost:8000

Frontend Setup

cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

The app will be available at http://localhost:5173

API Endpoints

Endpoint Description
POST /api/analyze-brand Analyze brand guidelines
POST /api/generate/logos Generate logo variations
POST /api/generate/social-media Generate social media templates
POST /api/generate/presentation Generate presentation slides
POST /api/generate/email-templates Generate email templates
POST /api/generate/marketing Generate marketing materials
POST /api/generate/complete-package Generate all assets at once

Usage

  1. Enter your brand details:

    • Brand name, tagline
    • Colors (primary, secondary, accent)
    • Fonts (primary, secondary)
    • Industry and target audience
    • Brand tone and values
  2. Add competitive context (optional):

    • Key competitors
    • What makes you different
  3. Configure campaign bundling (optional):

    • Campaign name
    • Campaign goal
    • Key message/CTA
  4. Or upload a PDF: Upload existing brand guidelines to auto-fill the form

  5. Select which asset types to generate

  6. Click "Generate Brand Assets"

  7. Review results:

    • Campaign context with deployment checklist
    • Batch consistency score
    • Individual assets with scores
  8. Download individual assets or the complete ZIP package

Project Structure

brandbolt/
├── backend/
│   ├── main.py              # FastAPI application
│   ├── models/
│   │   └── schemas.py       # Pydantic models
│   ├── services/
│   │   ├── gemini_service.py    # Gemini API integration
│   │   └── asset_generator.py   # Asset generation with self-correction
│   └── requirements.txt
├── frontend/
│   ├── src/
│   │   ├── App.tsx          # Main application
│   │   ├── components/      # React components
│   │   ├── services/        # API client
│   │   └── types/           # TypeScript types
│   └── package.json
├── HACKATHON_WRITEUP.md     # The story behind Brandbolt
├── TESTING_GUIDE.md         # Testing instructions for judges
└── README.md

Testing the Application

Quick Test

  1. Start both backend and frontend servers (see Quick Start above)
  2. Open http://localhost:5173 in your browser
  3. Fill in the brand form with sample data:
    • Brand Name: "Acme Tech"
    • Primary Color: #3B82F6 (blue)
    • Secondary Color: #1E40AF (dark blue)
    • Accent Color: #F59E0B (amber)
    • Primary Font: "Inter"
    • Industry: "Technology"
    • Target Audience: "Tech-savvy professionals aged 25-45"
    • Brand Tone: "Professional, innovative, trustworthy"
  4. Select which asset types to generate (start with just Logos for a quick test)
  5. Click "Generate Brand Assets"
  6. Wait for generation to complete (progress timeline will show status)
  7. Review generated assets with consistency scores
  8. Download individual assets or the complete package

API Testing

Test the API directly using curl:

# Health check
curl http://localhost:8000/health

# Analyze brand (returns brand analysis)
curl -X POST http://localhost:8000/api/analyze-brand \
  -H "Content-Type: application/json" \
  -d '{
    "brand_name": "Acme Tech",
    "primary_color": "#3B82F6",
    "secondary_color": "#1E40AF",
    "primary_font": "Inter",
    "industry": "Technology",
    "target_audience": "Tech professionals",
    "brand_tone": "Professional and innovative"
  }'

# Generate logos only
curl -X POST http://localhost:8000/api/generate/logos \
  -H "Content-Type: application/json" \
  -d '{
    "brand_guidelines": {
      "brand_name": "Acme Tech",
      "primary_color": "#3B82F6",
      "secondary_color": "#1E40AF",
      "primary_font": "Inter",
      "industry": "Technology",
      "target_audience": "Tech professionals",
      "brand_tone": "Professional"
    },
    "variations": ["primary", "icon_only"]
  }'

What to Expect

  • Generation Time: Complete package takes 2-5 minutes depending on selected assets
  • Self-Correction: Assets scoring below 70/100 are automatically regenerated (up to 3 attempts)
  • Consistency Scores: Each asset shows individual scores for color, typography, tone, and brand recognition
  • Batch Score: Overall package gets an aggregate consistency score

Gemini 3 Integration

This project leverages two Gemini models:

Brand Analysis & Validation (gemini-3-flash-preview)

Used to deeply understand brand identity and validate generated assets. Capabilities:

  • Visual identity summary and design principles
  • Mood and atmosphere analysis
  • Typography and color application guidelines
  • Asset validation against brand guidelines
  • Consistency scoring with detailed feedback

Image Generation (gemini-3-pro-image-preview)

The "Nano Banana" model for high-fidelity image generation with:

  • Legible text rendering
  • Consistent brand color application
  • Professional design quality
  • Various dimensions for different platforms

Deployment

Deploy Brandbolt for free with automatic CI/CD using Render (backend) and Vercel (frontend).

Backend Deployment (Render)

  1. Create Render Account: Go to render.com and sign up
  2. Connect GitHub: Link your GitHub account
  3. Create New Web Service:
    • Click "New" → "Web Service"
    • Select your brand-asset-generator repository
    • Configure:
      • Name: brandbolt-api
      • Root Directory: backend
      • Runtime: Python 3
      • Build Command: pip install -r requirements.txt
      • Start Command: uvicorn main:app --host 0.0.0.0 --port $PORT
  4. Add Environment Variables (in Render dashboard):
    • GOOGLE_API_KEY: Your Google AI API key
    • CORS_ORIGINS: Your Vercel frontend URL (e.g., https://brandbolt.vercel.app)
  5. Deploy: Click "Create Web Service"

Your API will be live at https://brandbolt-api.onrender.com

Frontend Deployment (Vercel)

  1. Create Vercel Account: Go to vercel.com and sign up
  2. Import Project:
    • Click "Add New" → "Project"
    • Import your brand-asset-generator repository
  3. Configure Project:
    • Root Directory: frontend
    • Framework Preset: Vite
  4. Add Environment Variable:
    • VITE_API_URL: Your Render backend URL (e.g., https://brandbolt-api.onrender.com)
  5. Deploy: Click "Deploy"

Your app will be live at https://brandbolt.vercel.app

CI/CD Pipeline

Both platforms automatically deploy on every push to main:

git push origin main
     ↓
GitHub triggers webhooks
     ↓
┌─────────────────┐    ┌─────────────────┐
│  Render         │    │  Vercel         │
│  (Backend)      │    │  (Frontend)     │
│  - Pull code    │    │  - Pull code    │
│  - Install deps │    │  - npm install  │
│  - Restart API  │    │  - npm build    │
└─────────────────┘    └─────────────────┘
     ↓                        ↓
   Live API              Live Frontend

Environment Variables Security

Your GOOGLE_API_KEY is stored securely in Render's dashboard, not in your code:

  • Never committed to Git
  • Encrypted at rest
  • Only accessible to your application at runtime

Judging Criteria Alignment

Criteria Implementation
Technical Execution (40%) Full-stack implementation with FastAPI + React, proper Gemini 3 integration, concurrent asset generation
Potential Impact (20%) Solves real problem for startups, SMBs, and marketers who need consistent branding
Innovation (30%) Novel approach to brand asset generation using AI for multi-platform consistency
Presentation (10%) Beautiful UI, clear demo flow, comprehensive documentation

License

MIT License - Built for the Gemini 3 Hackathon 2026

Acknowledgments

  • Google DeepMind for Gemini 3 API access
  • The Gemini 3 Hackathon team

Releases

No releases published

Packages

 
 
 

Contributors