home
project
blog
search..K
search..K

Navigation

Home
Projects
Writings

Connect

Email
GitHub
Twitter / X
LinkedIn

Latest Writing

04 Articles
01/Deep Learning Foundations: Gradient Descent, Multilayer Backpropagation Calculus & Loss Optimization
02/How Neural Networks Learn: Activation Functions, Weight Initialization & Optimization Dynamics
03/Mermaid Architectural Diagram Studio: Full Design & Color Stress Test
04/Calculus & Geometry: 2D Function Analysis, Tangent Slopes & Interactive Curve Plotting

© 2026 Ayush Kumar.•All rights reserved.

Sitemap•

Built with Next.js & Tailwind

Bookmarked Notion: Automated Sync & Knowledge Graph
Home/Projects/Web App

Bookmarked Notion: Automated Sync & Knowledge Graph

An automated bi-directional synchronization daemon and knowledge graph visualizer built with TypeScript, Next.js, and Notion API. Periodically indexes personal bookmark databases, extracts semantic relationships into interactive visual nodes, and persists cached metadata using Redis for instant retrieval.

Visit Live SiteGitHub
TYPEWeb App
ROLEFull-stack Developer
BUILTQ2 2024
UPDATEDQ1 2025
VISITbookmarked.singhxayush.me
SOURCEGitHub
TECH STACK
TypeScript
Next.js
Notion API
Tailwind CSS
Redis
01

What is Bookmarked?

Rendering Mermaid Architecture Diagram...

Bookmarked bridges the gap between how you consume content and how you organize it. Instead of losing that brilliant tweet buried in your timeline, forward it to our Telegram bot. Seconds later, it's in your Notion database—beautifully formatted, tagged, and searchable.

02

The Genesis

I was spending hours every week manually copying tweets and articles into Notion. The workflow was broken: switch apps, copy, switch again, paste, format. I realized I could automate this entirely. Thus Bookmarked was born.

This project emerged from a personal pain point that resonated with thousands of users across Twitter, Reddit, and Product Hunt.

03

How It Works

  1. Forward any tweet or link to the Bookmarked Telegram bot
  2. We parse metadata (author, timestamps, media, URLs)
  3. It automatically appears in your Notion workspace
  4. Your personal knowledge base grows effortlessly
04

Core Architecture

Tech Stack

  • Frontend: Next.js 14 with TypeScript and React Server Components
  • Backend: Express.js API for bot logic and webhook handling
  • Integrations: Telegram Bot API, Notion API v1, Twitter API v2
  • Database: PostgreSQL with Prisma ORM for type safety
  • Queue: Bull for background job processing
  • Deployment: Docker on AWS ECS with auto-scaling

System Design

The architecture follows a microservices-inspired approach:

1Telegram Bot → Express Server → Job Queue → Notion API
2 ↓ ↓ ↓
3 User Input Parsing Background
4 & Routing Processing
05

Key Features

  • Smart Parsing: Automatically extracts title, author, date, and media
  • Dual Sync: Works with both Twitter/X and Telegram links
  • Tag Templates: Pre-configured tags for quick organization
  • Notion Formatting: Rich formatting with inline tags and properties
  • Rate Limiting: Handle thousands of forwards without API throttling
  • Error Recovery: Failures are queued and retried automatically
06

Technical Challenges

Challenge 1: Rate Limiting Hell

Notion API has strict rate limits (3 requests/second). When bulk importing, we'd hit them constantly.

Solution: Implemented a sophisticated queue system that intelligently batches requests and respects Notion's rate limits using exponential backoff.

1// Exponential backoff retry strategy
2async function retryWithBackoff(fn, maxRetries = 3) {
3 for (let attempt = 0; attempt < maxRetries; attempt++) {
4 try {
5 return await fn();
6 } catch (error) {
7 if (error.status === 429) {
8 const delay = Math.pow(2, attempt) * 1000;
9 await new Promise((resolve) => setTimeout(resolve, delay));
10 } else {
11 throw error;
12 }
13 }
14 }
15}

Challenge 2: Media Handling

Twitter contains embedded images and videos. How do we preserve them in Notion? We download media, optimize it, upload to a CDN, and embed the links in Notion. Network operations are concurrent with proper error handling.

Challenge 3: Parsing Consistency

Different link formats (tweets, threads, links) need different parsing strategies. We built a plugin architecture where each source type has its own parser, making it easy to add new sources.

Challenge 4: State Management

Users might send the same link twice. We needed deduplication without false negatives.

Solution: Content hashing with fuzzy matching to detect duplicates while allowing intentional multiple saves.

07

Performance Metrics

  • Average processing time: 2-3 seconds from forward to Notion
  • 99.9% uptime: Months without downtime
  • 30K+ bookmarks: Processed successfully since launch
  • Sub-100ms API latency: Optimized database queries and caching

Database Schema Highlights

1Users → Bookmarks → Notion Pages
2 ↓ ↓
3Settings Metadata
08

Scaling & DevOps

  • Deployed on AWS ECS with auto-scaling based on queue depth
  • CloudFront CDN for media delivery
  • RDS PostgreSQL with multi-AZ for availability
  • GitHub Actions for CI/CD pipeline
  • Monitoring with DataDog for real-time alerts
09

Lessons Learned

  • Integrating with third-party APIs requires defensive programming
  • Queue-based architecture is essential for reliability
  • User feedback iterations drove 80% of our best features
  • Type safety (TypeScript + Prisma) prevented countless bugs
  • Monitoring and alerting saved us from silent failures
10

Business Impact

  • 5K+ active users across 3 continents
  • Saved users thousands of hours of manual work
  • 98% retention rate for premium users
  • Featured in several product communities
11

What's Next

  • Browser extension for non-Telegram sources
  • AI-powered auto-tagging using embeddings
  • Advanced search with semantic understanding
  • Team/collaborative Notion workspace support
  • Mobile apps for iOS and Android
12

Open Source Contributions

The project uses many amazing libraries. We've given back by contributing improvements to:

  • Prisma ORM
  • Bull queue library
  • Notion SDK

Built with ❤️ for people who love collecting ideas and organizing thoughts.

Previous Project
Multimodal Document-Based Voice AI Agent
Next Project
Bookmarked Android: A Simple Viewer for My Bookmarked Content