Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.66 KB

File metadata and controls

43 lines (28 loc) · 1.66 KB

app-web

The main Languages Learner web application — React, Vite, custom SSR, and Supabase.

Purpose

The primary product. It is a custom SSR app (not a framework): an Express server orchestrates rendering and proxies /api/* to the backend, while the React UI is built by Vite for both client and server. Architecture details are in docs/architecture/web-ssr.md.

Structure

Two independent TypeScript projects under src/:

  • src/server/ — Express SSR server (src/server/main.ts), middlewares populate res.locals.
  • src/ui/ — React app, organized by Feature-Sliced Design (app → pages → widgets → features → entities → shared).

Aliases inside src/ui: @/*src/ui/*, @@/* → repo root, shared/*src/shared/*, locales/*src/locales/*.

Depends on

  • @languages-learner/api, data-source, form-components, uikit, zod, class-names, locale, react-router-utils, react-utils, tailwind.

Used in

  • Nothing imports the app; it is the top of the graph.

Notes

  • res.locals is the SSR contract — see web-ssr.md for the five points any server-derived state touches.
  • Supabase credentials are runtime config — no VITE_-prefixed copies.
  • Not containerised — do not add a web service to docker-compose.dev.yml.
  • The /api/* proxy middleware must stay registered before Vite's middlewares.
  • i18n uses hash-based message IDs — see i18n.md.

Links