feat(web): add bilingual website and central account frontend
This commit is contained in:
commit
622f396364
20 changed files with 1315 additions and 0 deletions
25
docs/design.md
Normal file
25
docs/design.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# Website direction
|
||||
|
||||
VNOX is a self-hosted place for people to talk, built around a native desktop client and independently operated community servers. The website introduces that ownership model and provides the central account entry point.
|
||||
|
||||
- Palette: graphite `#19191b`, raised charcoal `#232325`, paper `#efede8`, muted stone `#aaa6a0`, sand `#dac5a6`, quiet sage `#aabcaa` for verified status only.
|
||||
- Type: system humanist sans (`Segoe UI`, `Noto Sans`, sans-serif), large tightly set headings, comfortable 1.55 body leading. All assets stay on the same origin.
|
||||
- Layout: broad left-aligned headline, an interactive communication diagram on the right, then an asymmetrical project explanation, actual native-client screenshot and a simple development roadmap. Account is a focused single workspace with clear loading, unauthenticated, authenticated and failure states.
|
||||
- Distinction: the approved V doubles as a visual connection joining two people; one small voice diagram supplies the expressive moment. No decorative statistics, testimonials, gradient cards or fictitious downloads.
|
||||
|
||||
```
|
||||
Vnox Project / Client / Roadmap RU EN Account
|
||||
|
||||
Own people. Interactive communication diagram
|
||||
Own connection. Text / Voice / Appearance
|
||||
Introduction clearly labelled as an illustration
|
||||
Account + project
|
||||
|
||||
One application. Native settings screenshot
|
||||
Your own server. feature detail and real source links
|
||||
|
||||
What's available / What's next FAQ
|
||||
Central status Footer
|
||||
```
|
||||
|
||||
Review: a giant neutral product screenshot alone would feel like any desktop-app page. The hero instead explains persistent voice while browsing text through an intentionally small, labelled diagram. Real native-client imagery appears where it supports the appearance/settings explanation. Sand is the approved V brand colour, not a secondary decorative accent.
|
||||
34
docs/nginx-static.conf
Normal file
34
docs/nginx-static.conf
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# Merge into the existing HTTPS server block; preserve certificates, ACME and auth proxy.
|
||||
# Set this to the immutable website release selected by the deployment symlink.
|
||||
root /opt/vnox-central/web/current;
|
||||
index index.html;
|
||||
|
||||
# Keep the existing /v1/auth/ location ABOVE the generic API location.
|
||||
# OAuth callback code/state must never be written to access/error logs.
|
||||
location ^~ /v1/auth/ {
|
||||
access_log off;
|
||||
error_log /dev/null;
|
||||
proxy_pass http://127.0.0.1:37623;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
location ^~ /v1/ {
|
||||
proxy_pass http://127.0.0.1:37623;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
}
|
||||
# Preserve the existing exact /health, /ready and /version proxy locations.
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-store" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header Referrer-Policy "no-referrer" always;
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' https://avatars.githubusercontent.com; connect-src 'self'; font-src 'self'; base-uri 'none'; form-action 'self'; frame-ancestors 'none'; object-src 'none'" always;
|
||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
||||
}
|
||||
# No OAuth credentials, session keys, SMTP configuration or .env files belong in this root.
|
||||
# dist/assets includes both vnox-mark.svg and vnox-mark.png, also used by Hub emails.
|
||||
23
docs/verification.md
Normal file
23
docs/verification.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Verification
|
||||
|
||||
Verified locally on 24 October 2026:
|
||||
|
||||
- `npm test`: 7 Node tests passed, including exact catalog parity, authentication request options, malformed-session checks, avatar-origin validation and encoded preview-path traversal.
|
||||
- `npm run build`: static build completed; assets normalized to mode 0644, directories 0755.
|
||||
- `node --check src/app.js`: JavaScript syntax check passed.
|
||||
- `python3 tests/browser_qa.py`: passed with the workstation's existing Playwright and `/usr/bin/chromium`; no browser or dependency was installed by this project.
|
||||
|
||||
The optional browser script requires the loopback preview from `npm run dev` or `npm run preview`. It replaces API responses with test fixtures and refuses non-loopback origins. It checks:
|
||||
|
||||
- Keyboard-operated illustration tabs and theme selection.
|
||||
- Runtime RU/EN changes and layouts at 320, 390, 768 and 1440 pixels, including account views.
|
||||
- Enabled, disabled and unavailable GitHub sign-in; retry after session failure.
|
||||
- Profile values rendered as text, rejected unsafe avatar URLs and no script execution from hostile profile fixtures.
|
||||
- CSRF-header/Origin/POST sign-out and expired-session handling.
|
||||
- Browser storage contains only the UI language; no account tokens are persisted.
|
||||
|
||||
Screenshots were visually inspected at `/tmp/vnox-web-qa/desktop-hero.png`, `mobile-full.png`, `account-login-mobile.png` and `account-profile-desktop.png`. Screenshot profile data is explicitly a browser fixture, absent from production assets.
|
||||
|
||||
## Limits
|
||||
|
||||
These frontend tests do not authorize a real GitHub user, verify provider consent or exercise Hub database/session internals. A live end-to-end GitHub authorization requires the account owner to complete provider consent. The loopback preview intentionally has no backend. Production deployment and HTTPS/security-header checks belong to the site's operator and must preserve the Hub's OAuth callback and cookie configuration.
|
||||
Loading…
Add table
Add a link
Reference in a new issue