|
@@ -45,7 +45,8 @@ Replace the current “anonymous root URL → login/admin app” experience with
|
|
|
- Else → `landing.html`.
|
|
- Else → `landing.html`.
|
|
|
3. Do **not** redirect anonymous `/` to `/login`.
|
|
3. Do **not** redirect anonymous `/` to `/login`.
|
|
|
4. Keep `/api/*` auth unchanged.
|
|
4. Keep `/api/*` auth unchanged.
|
|
|
-5. Optional: `GET /app` → admin when authed, else `/login` (deep link from landing CTAs if desired). Landing primary CTAs may simply use `/register` and `/login`.
|
|
|
|
|
|
|
+5. **Caching:** Root HTML responses that depend on session (`GET /` landing vs admin) MUST be non-cacheable: e.g. `Cache-Control: private, no-store` (and prefer the same for `landing.html` / `index.html` HTML documents) so proxies/browsers do not stick a visitor on the wrong shell after login.
|
|
|
|
|
+6. **`/app` alias:** out of MVP; primary CTAs use `/register` and `/login` only.
|
|
|
|
|
|
|
|
## Information Architecture (single page)
|
|
## Information Architecture (single page)
|
|
|
|
|
|
|
@@ -101,6 +102,16 @@ Replace the current “anonymous root URL → login/admin app” experience with
|
|
|
- Product name, Log in, Register, optional GitHub link
|
|
- Product name, Log in, Register, optional GitHub link
|
|
|
- Copyright line
|
|
- Copyright line
|
|
|
|
|
|
|
|
|
|
+## Static sample content policy
|
|
|
|
|
+
|
|
|
|
|
+Landing is **fully static** (no authenticated API on first paint).
|
|
|
|
|
+
|
|
|
|
|
+- Use **placeholders** for host/base URL: `https://mail.example.com`, host `mail.example.com` (or “your MailHub host” in prose).
|
|
|
|
|
+- Document **default public SMTP ports** from product defaults: `25` (smtp), `587` (smtp/STARTTLS), `465` (smtps), `2525` (smtp). Do not hardcode a specific production hostname from env.
|
|
|
|
|
+- **Forbidden in MVP:** unauthenticated config API for landing; build-time injection of production `.env` into landing assets.
|
|
|
|
|
+- API sample fields match product helpers: `from`, `to`, `subject`, `text`; header `Authorization: Bearer <USER_API_TOKEN>`.
|
|
|
|
|
+- Webhook samples: events `sent` | `bounced` | `failed`; payload `type` `email.sent` / `email.bounced` / `email.failed`; header `X-MailHub-Signature: t=…,v1=…`.
|
|
|
|
|
+
|
|
|
## Visual Design
|
|
## Visual Design
|
|
|
|
|
|
|
|
- CSS variables aligned with admin redesign:
|
|
- CSS variables aligned with admin redesign:
|
|
@@ -120,14 +131,15 @@ Replace the current “anonymous root URL → login/admin app” experience with
|
|
|
|
|
|
|
|
## Engineering
|
|
## Engineering
|
|
|
|
|
|
|
|
-### Build
|
|
|
|
|
|
|
+### Build (committed path)
|
|
|
|
|
|
|
|
-Add Vite multi-page entry alongside existing `index` and `login`:
|
|
|
|
|
|
|
+**Vite multi-page entry only** (same pipeline as `index` / `login`):
|
|
|
|
|
|
|
|
-- Source: `landing.html` at repo root (or under a dedicated path) + `src/frontend/landing/main.ts` + `landing.css`
|
|
|
|
|
|
|
+- Source: repo-root `landing.html` + `src/frontend/landing/main.ts` + `landing.css` + i18n dictionary
|
|
|
|
|
+- `vite.config.ts` input key: `landing`
|
|
|
- Output: `public/landing.html` + hashed assets under `public/assets/`
|
|
- Output: `public/landing.html` + hashed assets under `public/assets/`
|
|
|
|
|
|
|
|
-Alternatively pure static files under `public/` without TS if simpler—prefer Vite entry for consistency with login/admin pipeline.
|
|
|
|
|
|
|
+Do not maintain a parallel hand-written-only `public/landing.html` source of truth outside the Vite build.
|
|
|
|
|
|
|
|
### Client behavior
|
|
### Client behavior
|
|
|
|
|
|