Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

MINI CONTENT AI GENERATION

Stack

  • Node.js, Express
  • TypeScript, run directly via tsx
  • PostgreSQL (Neon), Drizzle ORM
  • Groq API for prompt generation
  • Pollinations API for image generation
  • Static HTML and vanilla JavaScript frontend, served via express.static

API

  • POST /generate - body: { productName, productDesc }. Returns { id, status }.
  • GET /jobs/:id - returns the job record, including status and result URL when completed.
  • GET /jobs - returns all jobs.
  • GET /health - basic health check.

Running locally

cd backend
pnpm install

Set the following environment variables (a .env file works locally):

DATABASE_URL=your_neon_postgres_url
GROQ_API_KEY=your_groq_api_key
PORT=3000

Run the database migration:

pnpm drizzle-kit migrate

Start the server:

pnpm start

The app will be available at http://localhost:3000.