Skip to content

Code Overlap With someli-platform

Both repos are Nuxt 2 / Vue 2 SPAs that bundle a Polotno editor. They started from a shared template (or one forked from the other) and have diverged significantly.

Top-level shape comparison

Concern someli-platform Someli-Designer
Framework Nuxt 2.18.1 + Vue 2.7.16 Nuxt 2.18.1 + Vue 2.7.16
Mode ssr: false ssr: false
Auth @nuxtjs/auth local + complex middleware chain @nuxtjs/auth local + simple apptype-only interceptor
Routing nested under _accid segment + many feature modules flat 73-page pages/
Store many feature modules (post/, chat/, dashboard/, plan/, ...) + api.js caching layer single store/index.js
Components many in components/ (verify count) only 4
Polotno editor polotno-editor/ subproject (~25 files; AI-rich) polotno-editor/ subproject (~15 files; leaner)
Polotno bundle size ~221 KB ~50 KB
Server middleware api/ Express scaffolding (YouTube proxy, Twitter helpers — mostly commented) none

Polotno editor — file-by-file (from CODE-OVERLAP-MATRIX.md)

Only in someli-platform/polotno-editor/: - aiContent/, aiImage.js — AI content + image panels - common/, customTextSection/, helper/ — shared helpers (organised) - favouritesPannel.js (note typo: "Pannel") - ImageLibraryPanel.js

Only in Someli-Designer/polotno-editor/: - alltemplatesPanel.js - CustomPageControls.js, CustomWorkspace.js - helper.js (single file vs someli-platform's helper/ directory)

Different file names (same purpose): - brandkitpanel.js (customer) vs brandkitPanel.js (designer)

Same name, diverged content: - App.js, app.css, carousaltemplatesPanel.js, customUploads.js, icons.js, index.html

Same patterns

Both repos:

  • Use @nuxtjs/auth local strategy with webauthenticate endpoint
  • Use apptype base64 header on every request (via axios interceptor)
  • Have ssr: false SPA mode
  • Build Polotno into polotno-bundle.js at root
  • Use BootstrapVue (v2) + Bootstrap (v5 CDN) — both inherit the same "two Bootstraps" issue
  • Use a userdetail cookie (verify; someli-platform uses several cookies, Someli-Designer's middleware/guest.js reads userdetail)

Different patterns

someli-platform Someli-Designer
Cache layer store/api.js with 5-min TTL none
Store organisation feature modules single file
Auth-redirect middleware middleware/redirect.js is load-bearing (does login routing) none — middleware/guest.js is the only one (for guest-only routes)
Server middleware api/index.js, api/twitter.js, api/test-middleware.js (mostly commented) none
_accid URL segment yes (/<accountId>/contentplanner) no (flat)
Components many only 4
Pages nested by feature flat
Polotno license (verify location) (verify location)

What this implies

  • A fix in someli-platform's polotno editor does not auto-port to Someli-Designer's. The two are forks.
  • The customer FE has accumulated more conventions (caching, auth redirects, server middleware); the designer FE is simpler but with fewer guard rails.
  • Both repos suffer the same Vue 2 EOL pressure.

Recommendations

ID Recommendation Effort
O-1 Decide on the Polotno editor strategy: keep two forks (current), or merge into one customizable core Large
O-2 Port someli-platform's store/api.js caching pattern to this repo Medium
O-3 Port middleware/redirect.js-style auth redirect logic to this repo if not present Medium
O-4 If/when migrating to Vue 3, do both repos together to amortise the migration work Large
O-5 Document the FE-shared-conventions (apptype header, userdetail cookie, role IDs) in someli-doc/PLATFORM-OVERVIEW.md (already done) Done

Cross-cutting concerns

Some bugs / improvements affect both FEs:

  • Bootstrap-Vue v2 + Bootstrap v5 conflict — fix in both
  • Role-ID inline literals — centralise in both
  • Lack of TypeScript — both
  • No tests — both
  • No CI workflow file in repo — verify per repo

A platform-wide FE-modernisation epic could address several of these at once.