How larchliu/stargram works
Project type and purpose
• This is a full-stack, monorepo application called “Stargram” that lets users capture and manage starred pages across the web.
• It comprises three main deliverables:
• A Chrome extension (app/extension/chrome) for capturing and interacting with starred content.
• A Nuxt3-based web front-end and API server (server/nuxt3) for configuration, storage, and bot integrations.
• A shared core library (packages/core) plus auxiliary packages (packages/plugins, packages/webHub) that provide data processing, LLM integration, storage adapters, and route generation.
File-structure overview and architectural patterns
• Top-level orchestration (pnpm, turbo):
• pnpm-workspace.yaml, turbo.json define the multi-package workspace.
• app/extension/chrome:
• Chrome extension built with Vue 3 + Vite: background scripts, content scripts, pop-up and settings UIs.
• packages/core:
• Business logic (chain, LLM wrappers for OpenAI/GoogleAI, storage adapters for Postgres/Chroma/Supabase/Notion, web scraping).
• Provides a programmatic API consumed by both the extension and server side.
• packages/plugins/generate-routes and packages/webHub:
• Unplugin/Vite/Nuxt plugins to auto-generate routes or website pages based on metadata.
• server/nuxt3:
• Nuxt3 full-stack app with pages, components, composables, service-worker for PWA.
• server/api folder implements serverless endpoints (Slack, Telegram, Stargram chain, webcard generation).
• Integration points with external platforms (Slack Bot, Telegram Bot, Notion).
README insights
• Title “Stargram” and tagline “Manage all your Starred Pages” confirm capture + management use case.
• Deployment on Railway hints at cloud deployment with environment variables.
a. Main components
• Chrome Extension (UI + background)
• Nuxt3 Server (SSR Frontend + Serverless API)
• Core Library (LLM, Storage, Web scraping)
• Auxiliary Plugins (Route generation, WebHub)
• External Services (OpenAI/GoogleAI, Postgres/Supabase/Chroma/Notion, Slack API, Telegram API)
b. Interactions and data flow
1. User stars a page → Extension content script captures metadata and sends API call to Nuxt3 server.
2. Nuxt3 API routes invoke core library to process text (LLM), save to selected storage adapter.
3. Server pushes updates via service-worker or webhooks to clients or bots.
4. Slack/Telegram bots call serverless endpoints (via Webhook) → core library processes commands and returns results.
5. The web dashboard (Nuxt3 pages) reads from storage via server API.
c. Architectural patterns and principles
• Monorepo with workspace management (pnpm, Turborepo)
• Shared domain logic in packages/core (DRY).
• Plugin-based extensibility for routes and site generators.
• Serverless functions for each API route (Nuxt3 server/api).
• PWA and service-worker for offline/notification support.
d. Key technologies
• Vue 3 + Vite (extension + server)
• Nuxt3 (SSR + serverless)
• TypeScript monorepo (pnpm + turbo)
• OpenAI/GoogleAI SDKs
• Storage adapters: Postgres, Supabase, Chroma, Notion
• Slack & Telegram Bot frameworks
Final advice
• Be very detailed: break down server/api into logical groups (stargram, slack, telegram, webcard).
• Storage adapters and LLM flows inside the core module.