54 lines
2.8 KiB
Markdown
54 lines
2.8 KiB
Markdown
---
|
|
name: project-daiting
|
|
description: "Daiting dating app frontend — Vue 3, Vite, Tauri v2, pnpm. Full scaffold built, actively iterated."
|
|
metadata:
|
|
node_type: memory
|
|
type: project
|
|
originSessionId: 427527bf-bce1-4b1e-9bf1-b5f08ff29055
|
|
---
|
|
|
|
Vue 3 (Composition API + `<script setup>`) + Vite 6 + Tauri v2 + pnpm dating app called **Daiting**.
|
|
|
|
**Why:** User provided a comprehensive master prompt specifying full stack, aesthetic direction, and all features.
|
|
|
|
**How to apply:** Full scaffold is complete and builds. Implementation is actively iterated — check git log for latest state rather than relying on this snapshot.
|
|
|
|
## Stack
|
|
- **Frontend:** Vue 3, Vite 6, TypeScript, SCSS + Tailwind v4, pnpm
|
|
- **Desktop shell:** Tauri v2 (Rust)
|
|
- **API client:** auto-generated typed client at `src/api/api.ts` — always use its types, never invent local interfaces for API data (see [[feedback-api-types]])
|
|
- **State:** composables (`useAuth`, `useChat`, `useUi`, `useFeed`, etc.) — stores were migrated to composables
|
|
- **Router:** `src/router/index.ts` with guards and silent token refresh on navigation
|
|
|
|
## Auth
|
|
- Access token kept in-memory only
|
|
- Refresh token in localStorage
|
|
- `activeProfile` on `useAuth()` is the currently selected profile (one user can have many)
|
|
|
|
## API conventions
|
|
- `apiClient.api.*` — all requests go through here
|
|
- HTTP client unwraps `.data` automatically — methods return the DTO directly, not `{ data: DTO }`
|
|
- Generated types: `MatchDto`, `ProfileResponseDto`, `ChatDto`, `LikeDto`, `MessageDto`, etc. — all in `src/api/api.ts`
|
|
- If a DTO is missing a needed field, ask user to add it on the backend and regenerate — never patch it locally
|
|
|
|
## Key design decisions
|
|
- Aesthetic: dark base `#0d0d0d`, cream `#f0ebe0`, signal `#c45c3a`, Instrument Serif + DM Mono
|
|
- All UI text in Russian; brand name English
|
|
- Chat polling at 2s interval (comment marks WebSocket replacement point)
|
|
- Avatar = `profile.media[0]?.path` (first media item), not a dedicated `avatarUrl` field
|
|
- Age is computed from `profile.birthDate` (string `"YYYY-MM-DD"`) — no `age` field in DTO
|
|
|
|
## Views & components (scaffold complete)
|
|
- Feed: `FeedCard` (GSAP drag-to-swipe), `FeedCardStack`, `FeedFilters`, `FeedView`
|
|
- Matches: `MatchesView` — fetches `MatchDto[]`, enriches each with `profilesControllerFindOne` for partner profile
|
|
- Chat: `ChatsListView`, `ChatRoomView`
|
|
- Profile: `MyProfileView`, `ProfileDetailView`, `ProfileEditor`, `MediaGallery`
|
|
- Auth: `LoginView`, `RegisterView`, `ProfileSetupView` (4-step wizard)
|
|
- Other: `DatesView`, `ReportsView` (admin)
|
|
- Layout: `AppShell`, `SideNav`, `BottomNav`, `TauriTitlebar`
|
|
- Common: `AppButton`, `AppInput`, `AppModal`, `AppDrawer`, `AppToast`, `LoadingSpinner`, `EmptyState`
|
|
|
|
## Build status
|
|
`pnpm exec vite build` → ✓ (last verified early in project)
|
|
Dev server on port 1420
|