MCPcopy Index your code
hub / github.com/dhavalCode/ai-image-generator

github.com/dhavalCode/ai-image-generator @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
39 symbols 86 edges 29 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AI Image Generator 🔥

Text to image Generator with DALL·E 2

<img src="https://s12.gifyu.com/images/ezgif.com-optimize1442d3fee1d7b4bc.gif"></img>

Give your prompt and see the magic !

Live 🚀

image-generator.dhavalcode.com

Technologies Used 🖥️

Getting Started

# Clone this repository
git clone https://github.com/dhavalCode/ai-image-generator.git

# Go into the repository
cd ai-image-generator

# Setup default environment variables

# For Linux
cp env.example .env.local
# For Windows
copy env.example .env.local

# Install dependencies
npm install

# Start a local dev server
npm start

Setup

  • Create ENV File
- ai-image-generator
  - server
    - node_modules
    - public
    - src
    - .env         <-- create it here
    - env.example  <-- this is the base file
    - .gitignore
    - package-lock.json
    - package.json
// .env
MONGODB_URL= "Replace with your url"
OPEN_AI_KEY=  "Replace with your key"
CLOUDINARY_CLOUD_NAME= "Replace with yours"
CLOUDINARY_API_KEY= "Your api key"
CLOUDINARY_API_SECRET= "Your app secret key"

For the Future

If you want to add more, Please don't hesitate to open a pull request.

👋 Get in Touch

Twitter Follow

linkedin

Extension points exported contracts — how you extend this code

ImageModalState (Interface)
(no doc)
client/src/types/types.ts
ImageOutput (Interface)
(no doc)
server/src/types/Image.ts
ErrorModalProps (Interface)
(no doc)
client/src/components/ErrorModal.tsx
ImageModel (Interface)
(no doc)
server/src/models/image.schema.ts
SizeSelectorProps (Interface)
(no doc)
client/src/components/SizeSelector.tsx
ImageModalProps (Interface)
(no doc)
client/src/components/Explore.tsx
ImageModalProps (Interface)
(no doc)
client/src/components/ImageModal.tsx

Core symbols most depended-on inside this repo

clearModalContent
called by 2
client/src/components/ImageModal.tsx
handleOpen
called by 1
client/src/components/SizeSelector.tsx
handleClose
called by 1
client/src/components/SizeSelector.tsx
fetch
called by 1
client/src/components/Explore.tsx
handleDownload
called by 1
client/src/components/ImageModal.tsx
handleCopyImage
called by 1
client/src/components/ImageModal.tsx
getSurprisePrompt
called by 1
client/src/utils/index.ts
removeDuplicatesById
called by 1
client/src/utils/index.ts

Shape

Function 29
Interface 8
Class 2

Languages

TypeScript100%

Modules by API surface

client/src/components/ImageModal.tsx7 symbols
client/src/components/SizeSelector.tsx4 symbols
client/src/components/Explore.tsx4 symbols
client/src/components/ErrorModal.tsx4 symbols
client/src/utils/index.ts3 symbols
server/src/utils/responseHandler.ts2 symbols
server/src/service/image.service.ts2 symbols
server/src/controller/image.controller.ts2 symbols
client/src/services/image.service.ts2 symbols
client/src/pages/Home.tsx2 symbols
server/src/types/Image.ts1 symbols
server/src/models/image.schema.ts1 symbols

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add ai-image-generator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact