Skip to content

refactor: migrate from ERB to TurboRepo monorepo structure #3705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

FrancisVarga
Copy link

Summary

Complete architectural transformation from Electron React Boilerplate (ERB) to a modern TurboRepo monorepo structure with pnpm workspaces.

  • Remove ERB legacy code: Removed old webpack configs, build scripts, and boilerplate files
  • Add monorepo structure: Implemented TurboRepo with pnpm workspaces for multiple apps and services
  • Configure build system: Set up dependency-aware task scheduling and workspace management
  • Add applications: Desktop Electron app, Next.js dashboard, GitHub notes app, and Docusaurus docs
  • Add services: API service layer and GitHub integration service
  • Add shared packages: UI components, TypeScript configs, ESLint configs, and utilities

Architecture Changes

New Structure

apps/
├── desktop/        # Electron wrapper for dashboard
├── dashboard/      # Main Next.js UI (port 10000)  
└── github-notes/   # GitHub notes app (port 10001)

services/
├── api/           # API service layer
└── github-service/ # GitHub integration

packages/
├── ui/            # Shared shadcn/ui components
├── core/          # Core business logic
├── shared/        # Shared utilities and types
├── typescript-config/ # Shared TypeScript configs
└── eslint-config/ # Shared ESLint configs

gutenberg/         # Docusaurus documentation site

Key Features

  • TurboRepo: Dependency-aware task scheduling and caching
  • pnpm workspaces: Efficient dependency management
  • Port allocation: Dedicated ports starting from 10000
  • Development workflow: Unified dev commands with pnpm dev
  • Build optimization: Parallel builds with shared configurations

Test Plan

  • Install dependencies: pnpm install
  • Start development: pnpm dev
  • Verify desktop app loads dashboard from localhost:10000
  • Test individual app development workflows
  • Verify build commands work: pnpm build
  • Test desktop packaging: pnpm desktop:package

🤖 Generated with Claude Code

FrancisVarga and others added 5 commits July 7, 2025 01:45
Remove legacy Electron React Boilerplate (ERB) configuration files,
webpack configs, build scripts, and assets to prepare for monorepo
migration to TurboRepo structure.

- Remove .erb/ configuration directory and webpack configs
- Remove old assets/ directory with icons and images
- Remove legacy src/ directory structure
- Remove package-lock.json files from old structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Transform package.json from ERB single-app configuration to
TurboRepo monorepo with pnpm workspace support.

- Add TurboRepo and workspace configuration
- Update scripts for monorepo development workflow
- Configure build and development commands for multiple apps
- Set up proper dependency management for workspace packages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Implement complete monorepo architecture with TurboRepo and pnpm workspaces:

- Add apps/ directory with desktop, dashboard, and github-notes applications
- Add services/ directory with api and github-service backend services
- Add packages/ directory for shared libraries and components
- Add gutenberg/ documentation site with Docusaurus
- Configure pnpm workspace with workspace.yaml
- Add TurboRepo configuration with turbo.json
- Include proper dependency management with pnpm-lock.yaml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update gitignore patterns to support TurboRepo monorepo with multiple
applications and services:

- Add TurboRepo cache directory (.turbo/)
- Add pnpm and workspace-specific patterns
- Add Next.js and Node.js build artifacts
- Add Electron build directories and output files
- Add IDE and editor configuration patterns
- Remove ERB-specific patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add comprehensive development documentation and AI code editor configuration:

- Add CLAUDE.md with project structure and development workflow
- Add .claude/ directory with project-specific configurations
- Add ai-code-editors-files/ with development rules and guidelines
- Include TypeScript, Python, and architecture guidelines
- Add command templates for common development tasks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Copilot Copilot AI review requested due to automatic review settings July 6, 2025 17:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Complete migration from an Electron React Boilerplate to a TurboRepo-based monorepo with pnpm workspaces, reorganizing applications, services, and shared packages.

  • Removed legacy ERB boilerplate and app entry point.
  • Added turbo.json and pnpm-workspace.yaml to orchestrate builds, dev, lint, test, and clean across workspaces.
  • Introduced new services (api, github-service) and shared UI/utility packages under packages/ui, along with monorepo apps in apps/.

Reviewed Changes

Copilot reviewed 166 out of 244 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
turbo.json Defines TurboRepo tasks for build, dev, lint, start
pnpm-workspace.yaml Lists workspace packages and onlyBuiltDependencies
src/renderer/App.tsx Removed legacy Electron React Boilerplate UI
services/github-service/* New Hono-based GitHub integration service
services/api/* API client package with shared-logic import
packages/ui/* Shared UI components, hooks, and utilities
Files not reviewed (1)
  • release/app/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

services/github-service/package.json:4

  • [nitpick] Only a dev script is defined here. For consistency and clarity in production workflows, consider adding build and start scripts to document how to package and launch the service.
    "dev": "bun run --hot src/index.ts"

@@ -0,0 +1,9 @@
import { Hono } from 'hono'
Copy link
Preview

Copilot AI Jul 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The service defines a Hono app but never starts listening on any port. Add an app.listen(PORT) call or export a handler that your runtime can invoke for requests.

Copilot uses AI. Check for mistakes.

Comment on lines +13 to +16
"dependsOn": ["^build"]
},
"lint:fix": {
"dependsOn": ["^build"]
Copy link
Preview

Copilot AI Jul 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The lint and lint:fix tasks depend on build, which forces a full build before linting. Consider removing that dependency so linting runs independently and faster.

Suggested change
"dependsOn": ["^build"]
},
"lint:fix": {
"dependsOn": ["^build"]
},
"lint:fix": {

Copilot uses AI. Check for mistakes.

@@ -0,0 +1,726 @@
"use client"
Copy link
Preview

Copilot AI Jul 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This Sidebar component file is over 700 lines long, making it difficult to navigate. Consider splitting it into smaller subcomponents or modules for improved readability and maintainability.

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant