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 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 2 for this tutorial.
2. Humanity Sandbox Access
Sign in or create an account
Click "Create Application"
Give your app a name (e.g., "Newsletter Demo")
Save and copy your sandbox credentials
Client ID (starts with
app_)Client Secret (starts with
sk_)
Set your Redirect URI to:
http://localhost:3100/callbackSelect the scopes your application will request
Note: This guide uses Connect SDK v0.1.0 or later
3. External API Keys
GNews API (for news content):
Sign up at https://gnews.io
Get your free API key (100 requests/day)
Note: GNews is mandatory for this demo to function
4. MongoDB Setup
Install MongoDB locally following the instructions for your OS: https://www.mongodb.com/docs/manual/installation/
Alternative: Use Docker
If you prefer Docker or encounter system-level compatibility issues:
Your connection string will be: mongodb://localhost:27017
Last updated