Decouple frontend from Rails, establish pnpm workspace dev workflow
Strip the Chatwoot frontend down to a standalone Vite + Vue 3 SPA that talks directly to the GoChat Go backend — no Ruby/Rails required. Deleted from frontend/ (all Rails-only): - Ruby: Gemfile, Gemfile.lock, config.ru, Capfile, Rakefile, bin/ (binstubs), config/ (application/boot/environment/routes/initializers/environments/locales), app/helpers/ (*.rb), app/views/ (ERB/jbuilder), app/assets/ (administrate scss) - Enterprise overlay (enterprise/ — pure Ruby/jbuilder, zero JS) - Infra: Procfile*, docker-compose*, docker/, deployment/, swagger/, .circleci/, .devcontainer/, .qlty/, .codegraph/, .windsurf/, .github/, .vscode/, .husky/ - Lint/config: .rubocop.yml, .scss-lint.yml, .rspec, rubocop/, .bundler-audit.yml, .annotaterb.yml, .all-contributorsrc, crowdin.yml, histoire.config.ts, etc. - Stale frontend/pnpm-lock.yaml (replaced by root workspace lockfile) Kept (frontend build essentials): - app/javascript/ (all Vue SPA source — dashboard/widget/sdk/portal/superadmin/survey/v3) - package.json, vite.config.ts, tailwind.config.js, postcss.config.js - theme/, vitest.setup.js, .prettierrc Key decoupling changes: - vite.config.ts: removed vite-plugin-ruby, added explicit rollupOptions.input for all 7 entrypoints + dev-server proxy (/api,/platform,/cable,/health → GoChat) - index.html: created static SPA entry that injects window.chatwootConfig / window.globalConfig (previously done by Rails ERB vueapp.html.erb) - package.json: renamed @gochat/frontend, removed vite-plugin-ruby/histoire/husky, scripts now use plain vite dev/build - tailwind.config.js: removed enterprise ERB content paths - markdownEmbeds.js: relocated markdown_embeds.yml into app/javascript/dashboard/config/ Root pnpm workspace: - package.json: dev:backend (air), dev:frontend (vite), dev (concurrently) - pnpm-workspace.yaml: frontend as workspace package - .gitignore: node_modules/, frontend/dist/, frontend build artifacts Verified: pnpm install + vite build succeeds (4446 modules, all 7 entrypoints produce JS+CSS chunks in dist/).
This commit is contained in:
+6
-4
@@ -34,6 +34,7 @@ storage/
|
||||
|
||||
# Dependencies
|
||||
vendor/
|
||||
node_modules/
|
||||
|
||||
# Air temp files
|
||||
tmp/
|
||||
@@ -45,8 +46,7 @@ build-errors.log
|
||||
*.test
|
||||
/gochat
|
||||
|
||||
# Frontend (Chatwoot Vue app) — exclude build artifacts & deps,
|
||||
# but keep bin/ binstubs and vendor/ assets that the Rails/Vite toolchain needs.
|
||||
# Frontend (Chatwoot Vue app) — exclude build artifacts & deps.
|
||||
frontend/node_modules/
|
||||
frontend/tmp/
|
||||
frontend/log/
|
||||
@@ -54,5 +54,7 @@ frontend/coverage/
|
||||
frontend/public/packs/
|
||||
frontend/storage/
|
||||
frontend/.tmp/
|
||||
!frontend/bin/
|
||||
!frontend/vendor/
|
||||
frontend/dist/
|
||||
frontend/.codegraph/
|
||||
frontend/.vscode/
|
||||
frontend/Procfile.test
|
||||
|
||||
Reference in New Issue
Block a user