chore(frontend): remove the legacy vanilla-JS frontend and its tooling
The SvelteKit app under /frontend has fully superseded the legacy
vanilla-JS/CSS frontend in /static, which was only ever served by a
debug `cargo run` / `PROFILE=dev` and never shipped to production.
Remove it together with the whole subsystem that existed only to
support it (~54k lines).
Frontend & assets:
- Delete /static (js/, css/, *.html, sw.js, basemaps/, locales symlink).
- Relocate the brand/PWA assets (logo/, favicon.ico, manifest.webmanifest)
to frontend/static/ so they ship with the SPA. This also fixes the
favicon, which app.html referenced but was missing from the prod bundle.
- Migrate the Nextcloud login-flow redirects from /nextcloud-error.html
to the SvelteKit /nextcloud/error route.
Web layer:
- Simplify resolve_static_path: drop the PROFILE=dev branch; always prefer
the Vite static-dist/ build, fall back to the configured path.
- Resolve i18n locales from the served SPA dir with a frontend/static
fallback so `just dev` works without a prior build.
Build:
- Prune build.rs from 1262 to ~70 lines (git metadata only); the Rust asset
pipeline and the OXICLOUD_RUST_ASSETS rollback flag are gone.
- Drop the now-unused build-dependencies (oxc_*, lightningcss).
- Remove the COPY static lines from the Dockerfile (cacher + builder).
Tooling & docs:
- Delete biome.json, jsconfig.json, tools/check-*.py, identifier.sh.
- Remove the legacy front-* justfile recipes; repoint the design-system
scripts (locales, dead-tokens, brand-drift, token-docs) at the frontend,
and drop check-contrast/check-headings (coupled to the old token
taxonomy / multi-page HTML).
- Repoint docs/DESIGN-SYSTEM.md links; remove 5 superseded docs/plan/*.
Backend dead code:
- Remove the dead `folder_repo` field from FileBlobWriteRepository.
- Remove the deprecated GET /api/folders/{id}/listing endpoint
(superseded by /resources).
Verified: cargo clippy (all-features/all-targets) clean, cargo test
--workspace 448 passed, cargo fmt clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-6
@@ -20,9 +20,8 @@ RUN npm run build
|
||||
FROM base AS cacher
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
# build.rs + static/ are needed so the build script can run and set OUT_DIR
|
||||
# build.rs runs during the dependency build; it only injects git metadata.
|
||||
COPY build.rs ./
|
||||
COPY static static
|
||||
# Create a minimal project to download and cache dependencies
|
||||
RUN mkdir -p src/bin && \
|
||||
echo 'fn main() { println!("Dummy build for caching dependencies"); }' > src/main.rs && \
|
||||
@@ -37,10 +36,9 @@ WORKDIR /app
|
||||
# Copy cached dependencies (only target dir and cargo registry)
|
||||
COPY --from=cacher /app/target target
|
||||
COPY --from=cacher /usr/local/cargo/registry /usr/local/cargo/registry
|
||||
# Copy source, build script, and static assets
|
||||
# Copy source, build script, and migrations
|
||||
COPY Cargo.toml Cargo.lock build.rs ./
|
||||
COPY src src
|
||||
COPY static static
|
||||
COPY migrations migrations
|
||||
# askama templates — read at *compile time* by the derive macro, so
|
||||
# they must be present in the build stage even though they're embedded
|
||||
@@ -52,8 +50,8 @@ ARG DATABASE_URL="postgres://postgres:postgres@localhost/oxicloud"
|
||||
# test-only bins (e.g. load-seed) even if `required-features` gating
|
||||
# changes upstream.
|
||||
RUN DATABASE_URL="${DATABASE_URL}" cargo build --release --bin oxicloud --bin generate-openapi --bin migrate-nfc-filenames
|
||||
# The SPA is built by the frontend stage; bring it in for the runtime copy below.
|
||||
# (build.rs no longer generates static-dist unless OXICLOUD_RUST_ASSETS=1.)
|
||||
# The SPA is built by the Vite frontend stage; bring it in for the runtime copy
|
||||
# below (build.rs has no asset pipeline — it only injects git metadata).
|
||||
COPY --from=frontend /static-dist ./static-dist
|
||||
|
||||
# ─── Stage 4: Minimal runtime image ──────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user