You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interfaceRoadmapItem{id: string;userId: string;repoId: string;issueId: number;title: string;body: string;status: 'planned'|'in-progress'|'completed';upvotes: number;voterIds: string[];githubIssueUrl: string;labels: string[];linkedEntryId?: string;// When moved to changelogcreatedAt: Date;updatedAt: Date;}// KV Key: roadmap:${userId}:${repoId}:${issueId}
3. API Endpoints
3.1 Widget Endpoints
Endpoint
Method
Auth
Description
/api/widget/generate
POST
User
Generate widget for repo
/api/widget/config
GET
User
Get widget config
/api/widget/config
PUT
User
Update widget config
/api/widget/[widgetId]
GET
None
Public widget data
/api/widget/track
POST
None
Track impression/click
3.2 Social Endpoints
Endpoint
Method
Auth
Description
/api/social/generate/twitter
POST
User
Generate Twitter thread
/api/social/generate/linkedin
POST
User
Generate LinkedIn post
/api/social/drafts
GET
User
Get all social drafts
/api/social/draft/[id]
DELETE
User
Delete draft
3.3 Email Endpoints
Endpoint
Method
Auth
Description
/api/email/subscribe
POST
None
Subscribe to digest
/api/email/unsubscribe
POST
None
Unsubscribe
/api/email/confirm
GET
None
Confirm subscription
/api/email/send
POST
User
Send release email
/api/email/sync-mailchimp
POST
User
Sync to Mailchimp
3.4 Analytics Endpoints
Endpoint
Method
Auth
Description
/api/analytics/track
POST
None
Track page view
/api/analytics/upvote
POST
None
Upvote entry
/api/analytics/views
GET
User
Get view stats
/api/analytics/leaderboard
GET
User
Get most viewed
3.5 Roadmap Endpoints
Endpoint
Method
Auth
Description
/api/roadmap/sync
POST
User
Sync GitHub Issues
/api/roadmap/items
GET
User/Public
Get roadmap items
/api/roadmap/upvote
POST
None
Upvote roadmap item
/api/roadmap/status
PUT
User
Update item status
4. AI Prompts
4.1 Twitter Thread Generator
consttwitterPrompt=`You are a social media manager creating a Twitter thread for a product changelog.Rules:- Create 2-5 tweets- Each tweet must be ≤280 characters- Use engaging language with emojis- Include 2-3 relevant hashtags- Last tweet includes link to changelog- Thread should tell a story: problem → solution → impactChangelog Entry:Title: {{title}}Category: {{category}}AI Rewrite: {{aiRewrite}}Labels: {{labels}}Generate Twitter thread (JSON array of tweets):`;
4.2 LinkedIn Post Generator
constlinkedinPrompt=`You are a professional content writer creating a LinkedIn post for a product update.Rules:- Write 1000-1300 characters- Professional but approachable tone- Start with a hook- Explain the problem and solution- Include business impact- Add 3-5 relevant hashtags- End with clear CTA and linkChangelog Entry:Title: {{title}}Category: {{category}}AI Rewrite: {{aiRewrite}}Labels: {{labels}}Generate LinkedIn post:`;
5. Component Specifications
5.1 Widget Component
// src/shared/components/widgets/embeddable-widget.tsxinterfaceEmbeddableWidgetProps{widgetId: string;config: WidgetConfig;entries: ChangelogEntry[];}// Features:// - Displays badge with "What's New" + count// - Dropdown shows latest 3-5 entries// - Click entry → opens full changelog// - Tracks impressions on load// - Tracks clicks on entry selection// - Responsive design// - Customizable via config
5.2 Social Post Preview
// src/shared/components/social/post-preview.tsxinterfaceTwitterPreviewProps{tweets: string[];authorName: string;authorHandle: string;authorImage: string;}interfaceLinkedInPreviewProps{post: string;authorName: string;authorTitle: string;authorImage: string;}// Features:// - Mimics actual platform UI// - Shows character count// - Displays link preview card// - Copy button per post/thread
5.3 Email Template
// src/features/email/templates/release-email.tsxinterfaceReleaseEmailTemplateProps{repoName: string;entries: ChangelogEntry[];publishedAt: string;viewOnlineLink: string;unsubscribeLink: string;branding: {logo?: string;primaryColor: string;};}// Features:// - HTML email (table-based for compatibility)// - Mobile responsive// - Works in Gmail, Outlook, Apple Mail// - Includes all entries by category// - "View Online" link// - Unsubscribe link (required)
5.4 Analytics Dashboard
// src/app/(dashboard)/analytics/page.tsx// Features:// - Overview cards (total views, unique visitors, upvotes)// - Most viewed entries leaderboard// - Time period filter (7d, 30d, all-time)// - Trend indicators (↑ ↓)// - Chart of views over time (optional)// - Export to CSV (optional)