<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sumit sharma</title>
    <description>The latest articles on DEV Community by sumit sharma (@sumit_sharma31).</description>
    <link>https://dev.to/sumit_sharma31</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1530677%2F29c098b3-c4f0-4e49-845e-26afd20a74bf.png</url>
      <title>DEV Community: sumit sharma</title>
      <link>https://dev.to/sumit_sharma31</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sumit_sharma31"/>
    <language>en</language>
    <item>
      <title>I built a full-stack AI blogging platform "gen-Blog" that writes, images, and publishes its own posts</title>
      <dc:creator>sumit sharma</dc:creator>
      <pubDate>Sat, 18 Apr 2026 20:27:04 +0000</pubDate>
      <link>https://dev.to/sumit_sharma31/i-built-a-full-stack-ai-blogging-platform-that-writes-images-and-publishes-its-own-posts-4bao</link>
      <guid>https://dev.to/sumit_sharma31/i-built-a-full-stack-ai-blogging-platform-that-writes-images-and-publishes-its-own-posts-4bao</guid>
      <description>&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  What if a blog could write itself?
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;That was the question I started with. Six weeks later, I shipped GenBlog — a full-stack AI-assisted content platform that generates complete, SEO-optimized articles (with a relevant featured image, tags, and meta description) from a single topic prompt. Or on a schedule, with zero human input.&lt;/p&gt;

&lt;p&gt;Live demo: &lt;a href="//gen-blog.vercel.app"&gt;gen-blog.vercel.app&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem I wanted to solve
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Content-driven websites have a brutal cold-start problem. You need posts to get traffic, but writing quality posts takes hours. Tools like ChatGPT help, but you're still copy-pasting into a CMS, sourcing images manually, writing your own meta descriptions, and publishing by hand.&lt;/p&gt;

&lt;p&gt;I wanted a system that handles all of that automatically — and still produces content that actually looks good and reads well.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What GenBlog does&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Give it a topic. It returns a full article — structured markdown, a title, a slug, tags, a meta description, and a contextually relevant high-resolution featured image. You can trigger this manually from the admin dashboard, or let a cron job fire it automatically on a schedule.&lt;/p&gt;

&lt;p&gt;Generated drafts land in the admin portal where you can review, edit, publish, or delete. Published posts are immediately live on the reader-facing frontend with full SEO metadata and beautiful markdown rendering.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7scf6ebjr9vyeja6yyr8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7scf6ebjr9vyeja6yyr8.png" alt=" " width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The stack&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Frontend&lt;/strong&gt; — Next.js 16 (App Router) with React 19, Tailwind CSS 4, React Markdown with GFM support, and Next Themes for dark/light mode. State is handled purely with React hooks and context — no Redux, no Zustand. Icons are Lucide React for consistency. API calls go through Axios with custom interceptors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend&lt;/strong&gt; — Express.js running on Node.js v22+. MongoDB + Mongoose for data persistence. JWT for secure admin authentication. Node-Cron for scheduled generation. The two external APIs doing the heavy lifting are Google Gemini Pro for content generation and Unsplash for images.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment&lt;/strong&gt; — Frontend lives on Vercel (edge network, seamless Next.js integration). Backend is a Web Service on Render so the cron jobs keep running persistently and don't get killed by serverless cold starts.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  How the AI pipeline works
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
When a generation is triggered (manually or by cron), the backend service builds a detailed prompt and sends it to the Gemini Pro API. The prompt asks for structured output — a title, meta description, comma-separated tags, and a long-form markdown body. Once the content comes back, a second call goes to the Unsplash API using the generated title as the search query to find the best-matching featured image. Both pieces get assembled into a Mongoose document and saved as a draft.&lt;/p&gt;

&lt;p&gt;The whole thing takes about 8–12 seconds end-to-end. Not instant, but fast enough that the admin UX doesn't feel painful.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Things I learned the hard way
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
Prompt engineering matters a lot. Early versions returned inconsistently formatted markdown — sometimes with extra preamble, sometimes with missing sections. I eventually added strict output formatting instructions and a few few-shot examples directly in the system prompt. Quality improved dramatically.&lt;/p&gt;

&lt;p&gt;Cron jobs and serverless don't mix. I started with a serverless function on Vercel for the backend. The cron would schedule fine but the function would time out or get killed mid-generation. Moving to a persistent Render Web Service fixed this entirely.&lt;/p&gt;

&lt;p&gt;Unsplash rate limits are real. The free tier is 50 requests/hour. For a blog that auto-generates posts, that ceiling can come up fast. I added basic caching on the image lookup so repeated topics don't burn unnecessary requests.&lt;/p&gt;

&lt;p&gt;SEO from day one. Next.js App Router makes dynamic metadata generation clean, but you have to plan your data model around it. I made sure every post has a slug, meta description, and OG image field from the very first schema design — retrofitting it later would have been messy.&lt;br&gt;
**&lt;/p&gt;

&lt;h2&gt;
  
  
  Project structure
&lt;/h2&gt;

&lt;p&gt;**&lt;br&gt;
&lt;code&gt;GenBlogs/&lt;br&gt;
├── frontend/&lt;br&gt;
│   ├── src/app/        # App Router pages &amp;amp; layouts&lt;br&gt;
│   ├── src/components/ # UI components&lt;br&gt;
│   └── src/lib/        # Axios client &amp;amp; utilities&lt;br&gt;
└── backend/&lt;br&gt;
    ├── src/models/     # Mongoose schemas&lt;br&gt;
    ├── src/routes/     # API endpoints&lt;br&gt;
    ├── src/services/   # Gemini &amp;amp; Unsplash logic&lt;br&gt;
    └── src/index.js    # Entry point&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;**A few things I'm planning to add:&lt;/p&gt;

&lt;p&gt;Multi-model support — let users choose between Gemini, Claude, and GPT for generation&lt;br&gt;
Content quality scoring before auto-publish (checking readability, length, keyword density)&lt;br&gt;
Newsletter integration — auto-send a digest when new posts go live&lt;br&gt;
Analytics dashboard to track which AI-generated topics actually get traffic.&lt;/p&gt;

&lt;p&gt;If you've built something similar or have opinions on the Gemini vs GPT-4 quality tradeoffs for long-form content, I'd love to hear them in the comments. And if you check out the live site, let me know what you think!&lt;/p&gt;

&lt;p&gt;&lt;a href="//gen-blog.vercel.app"&gt;gen-blog.vercel.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>nextjs</category>
      <category>genblog</category>
    </item>
  </channel>
</rss>
