A modern web application that uses Google's Gemini AI to generate professional SVG logos from text prompts or by vectorizing uploaded reference images.
- Brand Revival Mode: Upload existing logos/images and get vectorized versions with improved design
- Forge Identity Mode: Describe your vision in text and let AI create a unique logo from scratch
- SVG Vector Output: Download professional vector graphics (SVG format)
- Dark/Light Mode: Beautiful UI with theme switching
- Responsive Design: Works on desktop and mobile devices
- Local Backend API: Secure API key handling through your own server
- React 18 - UI framework
- TypeScript - Type safety
- Vite - Fast build tool
- Tailwind CSS - Styling
- Lucide React - Icons
- Node.js - Runtime environment
- Express - Web server
- @google/generative-ai - Google Gemini API client
Logo-maker/
βββ backend/ # Backend API server
β βββ server.js # Express server with Gemini integration
β βββ check-models.js # Utility to list available Gemini models
β βββ package.json # Backend dependencies
β βββ .env # Environment variables (API key)
βββ Frontend/ # React frontend application
β βββ src/
β β βββ App.tsx # Main application component
β β βββ index.tsx # Entry point
β β βββ main.tsx # React DOM renderer
β β βββ types.ts # TypeScript type definitions
β β βββ App.css # Global styles
β β βββ vite-env.d.ts # Vite type declarations
β βββ components/
β β βββ Header.tsx # Navigation header with theme toggle
β β βββ LogoUploader.tsx # Image upload component
β βββ services/
β β βββ geminiService.ts # API service layer
β βββ public/
β β βββ vite.svg # Vite logo
β βββ index.html # HTML template
β βββ package.json # Frontend dependencies
β βββ tsconfig.json # TypeScript configuration
β βββ vite.config.ts # Vite configuration
β βββ tailwind.config.js # Tailwind CSS configuration
βββ README.md # This file
βββ TODO.md # Development tasks
- Node.js (v18 or higher recommended)
- npm or yarn
-
Clone the repository
cd /path/to/Logo-maker -
Set up the Backend
cd backend npm installCreate a
.envfile in thebackenddirectory:API_KEY=your_gemini_api_key_here PORT=3001
-
Set up the Frontend
cd ../Frontend npm install
-
Start the Backend Server
cd backend npm startThe server will run on
http://localhost:3001 -
Start the Frontend (in a new terminal)
cd Frontend npm run devThe app will be available at
http://localhost:5173
- Click "Brand Revival" mode
- Upload one or more reference images of your existing logo
- Add style guidance in the text area (e.g., "Keep the lion icon but make it geometric")
- Click "Revive Identity"
- Download your vectorized SVG logo
- Click "Forge Identity" mode
- Describe your vision in the Creative Brief (e.g., "A minimalist falcon representing speed")
- Optionally upload rough sketches for inspiration
- Click "Generate Brand"
- Download your new SVG logo
| Variable | Description | Default |
|---|---|---|
API_KEY |
Your Google Gemini API key | Required |
PORT |
Backend server port | 3001 |
The backend uses gemini-1.5-flash model by default. To change models:
- Run
node backend/check-models.jsto see available models - Update the model name in
backend/server.js:const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash", // Change this requestOptions: { timeout: 60000 }, });
Generate an SVG logo based on mode and input.
Request Body:
{
"mode": "create" | "modernize",
"userPrompt": "Your design brief",
"base64Images": ["data:image/png;base64,..."]
}Response:
{
"image": "data:image/svg+xml;base64,PHN2Zy..."
}Error Response:
{
"message": "Error description",
"details": "Detailed error info"
}Status Codes:
200- Success400- Bad request (missing parameters)429- Rate limited (too many requests)500- Server error
- Check that
backend/.envcontains the correctAPI_KEYvalue - Restart the backend server after adding the key
- The AI may have returned a description instead of SVG
- Check server logs for the full response
- Try rephrasing your prompt to be more specific about SVG output
- Gemini API has rate limits
- Wait 60 seconds before trying again
- Ensure the backend is running on port 3001
- The frontend is configured to connect to
http://localhost:3001
- Frontend changes: Edit files in
Frontend/src/ - Backend changes: Edit
backend/server.js - Styles: Modify
Frontend/src/App.cssor use Tailwind classes
# Frontend tests
cd Frontend
npm run test
# Backend tests
cd backend
npm test- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- Vite - Next-generation frontend tooling
- Tailwind CSS - Utility-first CSS framework
- Lucide - Beautiful icons