How hemanthpallapothu/ai-powered-thumbnail-generator works
Thumblify is a creator-facing thumbnail generation and sharing app. Users authenticate, submit a new or recreate request with visual options, receive an AI-generated image, and can manage or share saved results. The backend also supports a public community feed and credit accounting. The README documents Groq prompt optimization and Pollinations image generation; sampled controller code confirms the generation sequence and Mongo-backed persistence. Page-to-API wiring is described at product level but not fully sampled, so uncertain client call details are omitted.
Main entry points: api.js HTTP client · App.jsx App routing · server.js API server · aiController.js Generation logic
Components 22
Creator app
- App routing
client/src/App.jsx - Sign in / up
client/src/pages/AuthPage.jsx - Auth session
client/src/context/AuthContext.jsx - Generate studio
client/src/pages/Generate.jsx - My generations
client/src/pages/MyGenerations.jsx - Community feed
client/src/pages/Community.jsx
API and access
- HTTP client
client/src/api/api.js - API server
server/server.js - Auth routes
server/routes/authRoutes.js - Thumbnail routes
server/routes/thumbnailRoutes.js - AI routes
server/routes/aiRoutes.js - JWT guard
server/middleware/authMiddleware.js
Thumbnail generation
- Generation logic
server/controllers/aiController.js - Prompt and image helpers
server/utils/thumbnailHelpers.js
Accounts and library
- Account logic
server/controllers/authController.js - Library and feed
server/controllers/thumbnailController.js - User records
server/models/User.js - Thumbnail records
server/models/Thumbnail.js
Other components
- Creator
- MongoDB
- Groq AI
- Pollinations
Connections 30
- Creator → App routing: uses
- App routing → Sign in / up: routes to
- App routing → Generate studio: routes to
- App routing → My generations: routes to
- App routing → Community feed: routes to
- Sign in / up → HTTP client: submits credentials
- Sign in / up → Auth session: saves session
- Auth session → HTTP client: loads profile
- Generate studio → HTTP client: requests generation
- My generations → HTTP client: requests library
- Community feed → HTTP client: requests feed
- HTTP client → API server: sends requests
- API server → Auth routes: dispatches
- API server → AI routes: dispatches
- API server → Thumbnail routes: dispatches
- Auth routes → Account logic: invokes
- AI routes → JWT guard: checks token
- AI routes → Generation logic: invokes
- Thumbnail routes → JWT guard: checks token
- Thumbnail routes → Library and feed: invokes
- JWT guard → User records: loads user
- Account logic → User records: reads and writes
- Generation logic → Prompt and image helpers: optimizes and builds
- Generation logic → Thumbnail records: creates thumbnail
- Generation logic → User records: deducts credit
- Library and feed → Thumbnail records: reads and updates
- Prompt and image helpers → Groq AI: optimizes prompt
- Prompt and image helpers → Pollinations: builds image request
- User records → MongoDB: persists
- Thumbnail records → MongoDB: persists