DEV Community

Martin Machava
Martin Machava

Posted on

SnapNews (build in public)

It's been a while, but I've finally taken the plunge to create and launch a new product! 🚀

https://snapnews.me

The Concept: AI-Driven Personalized Newsletters 📰ðŸĪ–

Ever wondered how to stay updated on your favorite topics without endlessly scrolling through Twitter or Google? ðŸĪ”

Imagine receiving tailored news summaries on your interests, delivered right to your inbox!

Whether you prefer daily, weekly, or monthly updates, this service has got you covered. After scouring the web for similar offerings and coming up empty-handed, I decided to build it myself.

Crafting the Prototype ⚙ïļ

The journey began with a simple question: How challenging would it be to bring this idea to life?

Recently, I made the switch from ChatGPT to Perplexity, attracted by its multiple LLM models and integrated search engine. The PPLX API, though limited to a single endpoint, seemed perfect for my needs.

One Friday evening, post-9-to-5 grind, I rolled up my sleeves and whipped up a prototype using ExpressJS. It could take a user's topic of interest and summarize search results into a newsletter. A promising start!

My mantra this time: Ship fast, focus on one core feature, and attract those first users!

Initially, I considered using Discord as the primary interaction channel to bypass the need for a frontend. But as we know, plans often evolve...

Diving into Discord Integration ðŸŽŪ

While Discord integration was new territory for me, it wasn't insurmountable. However, I soon realized that Discord's character limits for posts would hinder my ability to showcase full newsletter previews.

This realization led me to develop a frontend for:

  • Real-time newsletter previews
  • Stripe pricing integration

The backend needed to handle:

  • Discord user authentication and registration
  • Slash command processing
  • /preview 👉 Instant newsletter previews
  • /create-newsletter 👉 Set up recurring newsletters
  • /manage-newsletters 👉 Review or cancel existing subscriptions

I also added a nifty feature allowing users to copy newsletters they admire from others, embracing the community aspect of Discord.

Crafting the Perfect Landing Page 🛎

With a functional frontend in place, it seemed only natural to create an enticing landing page to showcase the product and potentially boost conversion rates.

Challenge accepted! 🍚

Having recently dabbled with Angular and finding it more to my liking than React, I decided to stick with it. For styling, I opted for Tailwind CSS, using it first time ever and I love it!, resulting in a sleek and professional look.

Building a Smarter AI Search Engine 🔍ðŸĪ–

While Perplexity API was functional, it lacked options for controlling result dates and providing source references. Determined to offer fresh, verifiable news, I spent a weekend crafting a custom AI search engine.

The process involves several steps:

  1. GPT-4o mini 👉 Interprets the topic and generates 3 Google search queries
  2. Google Search API 👉 Fetches 10 results per query within the specified timeframe
  3. Google Search API 👉 Queries for "negative" results outside the timeframe to filter out dated news
  4. GPT4o mini 👉 Reviews and filters results for relevance and freshness
  5. Perplexity API 👉 Processes filtered links to create the final newsletter

And of course, the newsletter is then delivered straight to the user's inbox!

If you've made it this far and want to experience AI-powered personalized news for yourself, check out SnapNews 👈

You can also find more details about my journey on Indie Hackers.

(SEO backlink)

Top comments (0)