How ashish-maurya531/apps works
Project type and purpose
• This is a JavaScript/TypeScript monorepo (pnpm workspace) housing two main end-user applications:
• A Next.js web application (“webapp” package) served on Vercel.
• A browser extension (“extension” package) targeting Chromium and Firefox.
• It also includes a “shared” component library (React UI, hooks, GraphQL clients), storybook for component development, plus linting and formatting configs.
File-structure analysis
• Top-level:
• pnpm-workspace.yaml, package.json, CI/CD configs, Dockerfiles for local development (Gitpod, Tilt, docker-compose).
• /packages directory with subfolders: eslint-config, prettier-config, shared, extension, storybook, webapp.
• Patterns: each package is isolated, builds independently, but “webapp” and “extension” both depend on “shared.”
• Build tools: Next.js for webapp, webpack for extension, storybook with Vite, pnpm for dependency management.
README insights
• Monorepo to ensure feature parity across extension and webapp.
• Shared components and hooks power both applications.
• CI via CircleCI / GitHub workflows; deployments: Vercel for webapp, browser stores for extension.
a. Main components
1. Monorepo root (pnpm workspace)
2. Shared library (packages/shared)
3. Web application (packages/webapp – Next.js SSR/SSG)
4. Browser extension (packages/extension – background script, content script, popup/companion UI, newtab page)
5. Storybook (packages/storybook – UI sandbox)
6. Dev configs (eslint-config, prettier-config)
7. CI/CD pipelines (CircleCI / GitHub Actions)
8. External services: daily.dev GraphQL API backend, Vercel hosting, Chrome Web Store / Firefox Add-ons.
b. Relationships and interactions
• Shared → consumed by webapp, extension, storybook.
• Developers → commit to monorepo → CI builds & tests each package → deploy.
• Webapp ↔ GraphQL API (queries, mutations, subscriptions).
• Extension background & content scripts ↔ GraphQL API (via fetch, webextension-polyfill).
• Storybook ↔ Shared library for UI component previews.
c. Architectural patterns
• Monorepo workspace: isolated packages, single source of truth.
• Component-driven development: shared React components + Storybook.
• Next.js MVC: pages, API routes (if any), SSR/CSR.
• Extension MV* separation: background, content, UI popups.
• CI/CD as code: workflows trigger builds, tests, deployments.
d. Key technologies/frameworks
• pnpm workspaces
• Next.js, React, TypeScript
• Webpack (extension), Vite (storybook)
• GitHub Actions & CircleCI
• Docker, Tilt, Gitpod
• GraphQL client/hooks
Final advice
• Be exhaustive: capture all package-level components rather than individual files.
• Environment boundaries: local development (Docker/Gitpod), CI, production.
• Use layering: top layer (monorepo & CI), middle layer (packages and dependencies), bottom layer (external services and deployment targets).