feat: add AI-powered social media poster application#1208
feat: add AI-powered social media poster application#1208siddartha1192 wants to merge 1 commit intogitroomhq:mainfrom
Conversation
Build a complete AI-enabled social media posting app in ai-poster/ with: - NestJS backend with 12 modules (auth, posts, campaigns, templates, calendar, AI, media, analytics, integrations, webhooks, platform-adapters, users) - 14 platform adapters (Twitter, LinkedIn, Facebook, Instagram, YouTube, TikTok, Reddit, Pinterest, Threads, Discord, Slack, Mastodon, Bluesky, Dribbble) - React + Vite + Tailwind frontend with 15 pages and 46 components - BullMQ background worker with 5 queues and 5 processors - Prisma schema with 20+ models covering posts, campaigns, templates, platform profiles, approvals, analytics, and webhooks - Three content modes: fully automated, semi-automated, and manual - Template system with brand context, tone, platform overrides, and inspiration - Interactive content calendar with month/week/day/list views - Approval workflow with version history and regeneration - AI content generation with platform-aware prompt builder https://claude.ai/code/session_01Sesvnwus3EBBhqJdBRZZPE
|
@claude is attempting to deploy a commit to the Listinai Team on Vercel. A member of the Team first needs to authorize it. |
| } | ||
|
|
||
| const plainText = stripHtml(data.content); | ||
| const group = crypto.randomUUID(); |
There was a problem hiding this comment.
Bug: The code calls crypto.randomUUID() without importing the crypto module, which will cause a ReferenceError at runtime during post creation.
Severity: CRITICAL
Suggested Fix
Add the import statement import * as crypto from 'crypto'; to the top of ai-poster/backend/src/modules/posts/posts.service.ts to make the crypto module and its methods available.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: ai-poster/backend/src/modules/posts/posts.service.ts#L97
Potential issue: The `create()` method in `posts.service.ts` uses `crypto.randomUUID()`
on line 97, but the `crypto` module is not imported in the file. This will lead to a
`ReferenceError: crypto is not defined` when the method is executed, causing the post
creation feature to fail. The TypeScript compiler does not catch this due to the
`noImplicitAny: false` setting. A similar file, `webhooks.service.ts`, correctly imports
the module with `import * as crypto from 'crypto'`.
Did we get this right? 👍 / 👎 to inform future reviews.
| image_url: { | ||
| // For local files, use a base64 data URI | ||
| // TODO: Read the file from disk and convert to base64 | ||
| url: imagePath, |
There was a problem hiding this comment.
Bug: The analyzeImageWithVision method incorrectly passes a local file path to the OpenAI Vision API, which requires a URL or base64 data, causing image processing to fail.
Severity: HIGH
Suggested Fix
In process-image.processor.ts, before calling the OpenAI API, check if the imagePath is a local path. If it is, either convert it to a full public URL (e.g., ${APP_URL}/uploads/${media.path}) or read the file from disk and convert it to a base64 data URI, as noted in the TODO comment.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: ai-poster/worker/src/processors/process-image.processor.ts#L207
Potential issue: The `analyzeImageWithVision` method in `process-image.processor.ts`
passes a local file path directly to the OpenAI Vision API at line 207. The API requires
a public HTTP URL or a base64-encoded image, not a local path. This will cause image
analysis jobs to fail for any user-uploaded media, as the system will not correctly
construct a full URL or convert the file to base64 data before making the API call. This
issue only affects uploaded images, not AI-generated ones which already have a remote
URL.
Did we get this right? 👍 / 👎 to inform future reviews.
|
Looks like another publica.co, marked as spam. |
Build a complete AI-enabled social media posting app in ai-poster/ with:
https://claude.ai/code/session_01Sesvnwus3EBBhqJdBRZZPE
What kind of change does this PR introduce?
eg: Bug fix, feature, docs update, ...
Why was this change needed?
Please link to related issues when possible, and explain WHY you changed things, not WHAT you changed.
Other information:
eg: Did you discuss this change with anybody before working on it (not required, but can be a good idea for bigger changes). Any plans for the future, etc?
Checklist:
Put a "X" in the boxes below to indicate you have followed the checklist;