You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7 KiB

Nexo desktop-first redesign + demo restructure Move servers/dating → demos/dating/server and the dating route's co-located _components/_lib/_design assets → demos/dating/web. Single `npm run dating:dev` boots both server and web via concurrently. Replace the warm-paper / raspberry-pink Claude Design adaptation with a sober desktop-first system: - Tokens: slate neutrals + violet accent, Inter family, dark mode via prefers-color-scheme + explicit data-theme. - Inline SVG icon set (Icon.svelte, Feather-style) — no Unicode glyph placeholders. - Layout shell: 240px rail nav on desktop, bottom tab bar on mobile; auth + onboarding own their own shell. - Discover: square photo carousel (dots + chevrons), name/age/location overlay, action buttons floating off the photo edge, sticky context panel on desktop. - Matches: clean conversation list with unread dot + chevron-on-hover. - Chat: 3-column on desktop (threads + thread + match context), 2-col on tablet, single thread on mobile. Day separators, retry/dismiss on failed messages, autogrow composer with Enter-to-send. - Profile: sticky hero card + 3-section form, dirty/saved indicator. - Photos: dropzone + grid with hover-only cell toolbar (set primary, reorder, delete). - Onboarding: sidebar stepper (320px) + content panel. - Auth: split layout (form left, brand quote right) on ≥900px. Server boot: env loader's repo-root resolution corrected after the move (../../.. instead of ../..) so .env.local at the repo root is picked up again. Hoist BRAND.md and SECURITY.md into docs/, drop superseded audit notes that were already closed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 months ago
# Nexo dating server
Servidor independiente para la demo `Nexo`. No vive dentro de SvelteKit y no usa `+server.ts`; expone una API HTTP propia para que el cliente la consuma despues.
## Arranque
Desde la raiz del repo:
```bash
npm run dating:server
```
Por defecto escucha en:
```txt
http://127.0.0.1:8787
```
PocketBase se configura con las variables locales ya guardadas en `.env.local`:
- `POCKETBASE_URL`
- `POCKETBASE_SUPERUSER_EMAIL`
- `POCKETBASE_SUPERUSER_PASSWORD`
Variables opcionales:
- `DATING_SERVER_HOST`
- `DATING_SERVER_PORT`
- `DATING_ALLOWED_ORIGINS`
- `DATING_SESSION_COOKIE`
- `DATING_SECURE_COOKIES`
## Endpoints
- `GET /health`
- `POST /api/auth/register`
- `POST /api/auth/login`
- `POST /api/auth/logout`
- `POST /api/auth/reset`
- `POST /api/auth/mfa/verify`
- `GET /api/session`
- `GET /api/profile/me`
- `PUT /api/profile/me`
- `POST /api/profile/photos`
- `DELETE /api/profile/photos/:filename`
- `PATCH /api/profile/photos/order`
- `PATCH /api/profile/photos/main`
- `GET /api/discover`
- `POST /api/likes`
- `GET /api/matches`
- `GET /api/matches/:matchId/messages`
- `POST /api/matches/:matchId/messages`
- `POST /api/safety/block`
- `POST /api/safety/report`
- `GET /api/admin/reports`
- `POST /api/admin/reports/:id/resolve`
- `GET /api/devtools/snapshot`
## Sesion
El servidor usa una cookie HTTP-only llamada `dating_session`. Tambien acepta `Authorization: Bearer <token>` para pruebas locales, aunque el cliente deberia usar cookies con `credentials: "include"`.
## Fotos
Las fotos se guardan en PocketBase, campo `dating_profiles.photos`, usando el filesystem local de PocketBase (`pb_data/storage`). El servidor valida tipo, tamano y permisos antes de enviar el archivo a PocketBase.

Powered by TurnKey Linux.