├── .env.example
├── .eslintrc.json
├── .gitignore
├── .prettierrc
├── README.md
├── app
├── api
│ └── generate-logo
│ │ └── route.ts
├── components
│ ├── Footer.tsx
│ ├── Header.tsx
│ ├── InfoToolTip.tsx
│ ├── Spinner.tsx
│ └── ui
│ │ ├── button.tsx
│ │ ├── dialog.tsx
│ │ ├── input.tsx
│ │ ├── select.tsx
│ │ ├── textarea.tsx
│ │ ├── toast.tsx
│ │ ├── toaster.tsx
│ │ └── tooltip.tsx
├── favicon.ico
├── globals.css
├── layout.tsx
├── lib
│ ├── domain.ts
│ └── utils.ts
└── page.tsx
├── components.json
├── hooks
└── use-toast.ts
├── lib
└── utils.ts
├── middleware.ts
├── next.config.mjs
├── package-lock.json
├── package.json
├── postcss.config.mjs
├── public
├── Github.svg
├── abstract.svg
├── flashy.svg
├── generate-icon.svg
├── insan.png
├── minimal.svg
├── modern.svg
├── og-image.png
├── playful.svg
├── side.svg
├── solo.svg
├── stack.svg
├── tech.svg
├── together-ai-logo.svg
├── together-ai-logo1.svg
└── twitter.svg
├── tailwind.config.ts
└── tsconfig.json
/.env.example:
--------------------------------------------------------------------------------
1 | UPSTASH_REDIS_REST_URL=
2 | UPSTASH_REDIS_REST_TOKEN=
3 | TOGETHER_API_KEY=
4 | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
5 | CLERK_SECRET_KEY=
6 | # optional
7 | HELICONE_API_KEY=
8 |
--------------------------------------------------------------------------------
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["next/core-web-vitals", "next/typescript"]
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 | .yarn/install-state.gz
8 |
9 | # testing
10 | /coverage
11 |
12 | # next.js
13 | /.next/
14 | /out/
15 | .env
16 |
17 | # production
18 | /build
19 |
20 | # misc
21 | .DS_Store
22 | *.pem
23 |
24 | # debug
25 | npm-debug.log*
26 | yarn-debug.log*
27 | yarn-error.log*
28 |
29 | # local env files
30 | .env*.local
31 |
32 | # vercel
33 | .vercel
34 |
35 | # typescript
36 | *.tsbuildinfo
37 | next-env.d.ts
38 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {"plugins": ["prettier-plugin-tailwindcss"]}
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
AI Logo Generator
4 |
5 |
6 |
7 | An open source logo generator – create professional logos in seconds with customizable styles. 8 |
9 | 10 | ## Tech stack 11 | 12 | - [Flux Pro 1.1](https://togetherai.link/flux-playground) on [Together AI](https://togetherai.link/) for logo generation 13 | - [Next.js](https://nextjs.org/) with TypeScript for the app framework 14 | - [Shadcn](https://ui.shadcn.com/) for UI components & [Tailwind](https://tailwindcss.com/) for styling 15 | - [Upstash Redis](https://upstash.com/) for rate limiting 16 | - [Clerk](https://clerk.com/) for authentication 17 | - [Plausible](https://plausible.io/) & [Helicone](https://helicone.ai/) for analytics & observability 18 | 19 | ## Cloning & running 20 | 21 | 1. Clone the repo: `git clone https://github.com/Nutlope/logocreator` 22 | 2. Create a `.env` file and add your [Together AI API key](https://api.together.xyz/settings/api-keys): `TOGETHER_API_KEY=` 23 | 3. Run `npm install` and `npm run dev` to install dependencies and run locally. 24 | 25 | ## Future Tasks 26 | 27 | - [ ] Create a dashboard with a user's logo history 28 | - [ ] Support SVG exports instead of just PNG 29 | - [ ] Add support for additional styles 30 | - [ ] Add a dropdown for image size (can do up to 1440x1440) 31 | - [ ] Show approximate price when using your own Together AI key 32 | - [ ] Allow the ability to upload a reference logo (use vision model to read it) 33 | - [ ] Redesign popular brand’s logos with my logo maker and have it in a showcase 34 | -------------------------------------------------------------------------------- /app/api/generate-logo/route.ts: -------------------------------------------------------------------------------- 1 | import { clerkClient, currentUser } from "@clerk/nextjs/server"; 2 | import { Ratelimit } from "@upstash/ratelimit"; 3 | import { Redis } from "@upstash/redis"; 4 | import dedent from "dedent"; 5 | import Together from "together-ai"; 6 | import { z } from "zod"; 7 | 8 | let ratelimit: Ratelimit | undefined; 9 | 10 | export async function POST(req: Request) { 11 | const user = await currentUser(); 12 | 13 | if (!user) { 14 | return new Response("", { status: 404 }); 15 | } 16 | 17 | const json = await req.json(); 18 | const data = z 19 | .object({ 20 | userAPIKey: z.string().optional(), 21 | companyName: z.string(), 22 | // selectedLayout: z.string(), 23 | selectedStyle: z.string(), 24 | selectedPrimaryColor: z.string(), 25 | selectedBackgroundColor: z.string(), 26 | additionalInfo: z.string().optional(), 27 | }) 28 | .parse(json); 29 | 30 | // Add observability if a Helicone key is specified, otherwise skip 31 | const options: ConstructorParametersYour API key
43 | ) : ( 44 |Credits: {`${user?.unsafeMetadata.remaining ?? 3}`}
45 | )} 46 |{content}
18 |344 | Create a free account to start making logos: 345 |
346 | 347 |