How imdeepanshukashyap/ai-ads-generator-editor- works
AdGen-Studio is a web application for creating AI-generated product-ad images and videos, managing generations, and sharing or publishing social content. The main user flow is routed through the React client to authenticated project APIs, which invoke Google AI generation and persist project data; payment, social publishing, and administration are distinct capabilities. The README provides no further product detail, so feature coverage relies on the source index and shown route/controller excerpts; unsampled page behavior is not inferred.
Main entry points: App.tsx React app routes · server.ts HTTP server · axios.ts HTTP client · projectController.ts Project generation API
Components 31
Web client
- React app routes
client/src/App.tsx - Ad generator
client/src/pages/Genetator.tsx - Generation results
client/src/pages/Result.tsx - My generations
client/src/pages/MyGenerations.tsx - Community feed
client/src/pages/Community.tsx - Share dialog
client/src/components/ShareModal.tsx - Plans and checkout
client/src/pages/Plans.tsx - HTTP client
client/src/configs/axios.ts
API and access
- HTTP server
server/server.ts - Project routes
server/routes/projectRoutes.ts - User authentication
server/middlewares/auth.ts
Ad creation
- Project generation API
server/controllers/projectController.ts - Google AI generation
server/services/googleAiService.ts - Project data
server/configs/prisma.ts - Cloudinary media
Payments and admin
- Payment routes
server/routes/paymentRoutes.ts - Payment API
server/controllers/paymentController.ts - Payment and credits
server/services/paymentService.ts - Razorpay gateway
server/services/razorpayGateway.ts - Admin routes
server/routes/adminRoutes.ts - Admin API
server/controllers/adminController.ts - Admin queries
server/services/adminService.ts - Model library API
server/controllers/modelLibraryController.ts
Social publishing
- Social routes
server/routes/socialRoutes.ts - Social account and post API
server/controllers/socialController.ts - Social feed and sharing
client/src/pages/Community.tsx - Platform publishing
server/services/social/meta.ts - YouTube publishing
server/services/social/youtube.ts - Scheduled publisher
server/jobs/publisher.ts - Social account data
server/configs/prisma.ts
Other components
- User
Connections 37
- User → React app routes: uses
client/src/App.tsx - React app routes → Ad generator: routes to
client/src/App.tsx - React app routes → Generation results: routes to
client/src/App.tsx - React app routes → My generations: routes to
client/src/App.tsx - React app routes → Community feed: routes to
client/src/App.tsx - React app routes → Plans and checkout: routes to
client/src/App.tsx - Ad generator → HTTP client: calls API
- Generation results → HTTP client: calls API
- My generations → HTTP client: calls API
- Community feed → HTTP client: calls API
client/src/pages/Community.tsx - Share dialog → Community feed: used by
client/src/components/ShareModal.tsx - Plans and checkout → HTTP client: calls API
- HTTP client → HTTP server: sends requests
- HTTP server → Project routes: mounts
server/server.ts - Project routes → User authentication: protects
server/routes/projectRoutes.ts - Project routes → Project generation API: dispatches
server/routes/projectRoutes.ts - Project generation API → Google AI generation: generates media
server/controllers/projectController.ts - Project generation API → Project data: reads and writes
server/controllers/projectController.ts - Project generation API → Cloudinary media: uploads media
server/controllers/projectController.ts - HTTP server → Payment routes: mounts
server/server.ts - Payment routes → Payment API: dispatches
server/routes/paymentRoutes.ts - Payment API → Payment and credits: handles checkout
server/controllers/paymentController.ts - Payment and credits → Razorpay gateway: uses gateway
- HTTP server → Admin routes: mounts
server/server.ts - Admin routes → Admin API: dispatches
server/routes/adminRoutes.ts - Admin routes → Model library API: dispatches
server/routes/adminRoutes.ts - Admin API → Admin queries: delegates queries
server/controllers/adminController.ts - HTTP server → Social routes: mounts
server/server.ts - Social routes → Social account and post API: dispatches
server/routes/socialRoutes.ts - Social feed and sharing → Share dialog: opens
client/src/components/ShareModal.tsx - Social account and post API → Platform publishing: publishes to Meta
server/controllers/socialController.ts - Social account and post API → YouTube publishing: uploads to YouTube
server/controllers/socialController.ts - Social account and post API → Social account data: reads and writes
server/controllers/socialController.ts - HTTP server → Scheduled publisher: starts scheduler
server/server.ts - Scheduled publisher → Platform publishing: publishes to Meta
server/jobs/publisher.ts - Scheduled publisher → YouTube publishing: publishes to YouTube
server/jobs/publisher.ts - Scheduled publisher → Social account data: loads scheduled posts
server/jobs/publisher.ts