Personalized Newsletter App Overview

Complete architecture overview, repository links, high-level flow diagram, and prerequisites for the newsletter reference app.

What You Will Build

By the end of this walkthrough, you will have a fully functional personalized newsletter application that:

  • Authenticates users via Humanity Protocol OAuth 2.0 with PKCE

  • Detects social connections (LinkedIn, Twitter/X, Discord, GitHub, Telegram)

  • Verifies credentials using preset verification (connected accounts, travel preferences)

  • Personalizes content based on user's digital identity

  • Fetches and categorizes news from external APIs

  • Provides real-time dev console showing API calls and responses

  • Stores user preferences and news articles in MongoDB

  • Runs automated sync jobs for content updates

Repository

The complete source code for this demo is available at:

High-Level Architecture

What You Need Before Starting

1. Development Environment

  • Node.js: v22.14.0 or later

  • Package Manager: npm, yarn, or bun

  • MongoDB: Docker (recommended) or local installation

  • Git: For cloning the repository

⚠️ Note for Windows Users

We strongly recommend using WSL 2arrow-up-right for this tutorial.

2. Humanity Protocol Sandbox Access

  1. Sign in or create a developer account

  2. Click "Create Application"

  3. Give your app a name (e.g., "Newsletter Demo")

  4. Save and copy your:

    • Client ID (starts with app_)

    • Client Secret (starts with sk_)

  5. Set your Redirect URI to: http://localhost:3100/callback

  6. Select the scopesarrow-up-right your application will request

  7. Note: This guide uses Connect SDK v0.1.0 or later

3. External API Keys

GNews API (for news content):

4. MongoDB Setup

Install MongoDB locally following the instructions for your OS: https://www.mongodb.com/docs/manual/installation/arrow-up-right

Alternative: Use Docker

If you prefer Docker or encounter system-level compatibility issues:

Your connection string will be: mongodb://localhost:27017

Last updated