📝 docs: добавляет индекс памяти и обратную связь по API и SCSS архитектуре в проекте Daiting App Frontend
This commit is contained in:
5
.claude/memory/MEMORY.md
Normal file
5
.claude/memory/MEMORY.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Memory Index
|
||||
|
||||
- [Project: Daiting App Frontend](project_daiting.md) — Vue 3 + Vite + Tauri v2 dating app, stack, conventions, active views
|
||||
- [Feedback: API types](feedback_api_types.md) — **ALWAYS CHECK FIRST** — use types from `src/api/api.ts`, never invent local interfaces; ask user to add missing fields to backend
|
||||
- [Feedback: SCSS architecture](feedback_scss.md) — Use @use per-file, separate Tailwind CSS file from SCSS
|
||||
27
.claude/memory/feedback_api_types.md
Normal file
27
.claude/memory/feedback_api_types.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: feedback-api-types
|
||||
description: Always use types from src/api/api.ts — never invent local interfaces for API shapes
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: feedback
|
||||
originSessionId: 427527bf-bce1-4b1e-9bf1-b5f08ff29055
|
||||
---
|
||||
|
||||
Always use types directly from `src/api/api.ts` (auto-generated typed client) for any data that comes from or goes to the API. Never define local interfaces that duplicate or reinterpret API shapes.
|
||||
|
||||
**Why:** We hit this exact bug in `MatchesView.vue` — a hand-rolled `Match` interface drifted from the real `MatchDto`, causing `partnerProfile` to always be `undefined` at runtime. The generated client already has correct, schema-backed types.
|
||||
|
||||
**How to apply:**
|
||||
- Before writing any interface for API data, grep `src/api/api.ts` for an existing type (`MatchDto`, `ProfileResponseDto`, `ChatDto`, etc.).
|
||||
- Compose with `&` or extend when enrichment is needed: `type EnrichedMatch = MatchDto & { partnerProfile: ProfileResponseDto }`.
|
||||
- If a field is missing from a DTO (e.g. `partnerProfile` wasn't part of `MatchDto`), do NOT add it locally — ask the user to add it to the backend response so the generated client picks it up.
|
||||
- The same rule applies to request params: use generated `*Params` types, not hand-written `{ profileId: string }` objects.
|
||||
|
||||
**Pattern for enriched data:**
|
||||
```ts
|
||||
import type { MatchDto, ProfileResponseDto } from '@/api/api'
|
||||
type EnrichedMatch = MatchDto & { partnerProfile: ProfileResponseDto }
|
||||
```
|
||||
|
||||
**When something is missing from the schema — say so:**
|
||||
> "MatchDto doesn't include partnerProfile. Should I ask you to add it to the backend endpoint so the generated client has it?"
|
||||
16
.claude/memory/feedback_scss.md
Normal file
16
.claude/memory/feedback_scss.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
name: feedback-scss
|
||||
description: SCSS architecture patterns that work in this project
|
||||
metadata:
|
||||
node_type: memory
|
||||
type: feedback
|
||||
originSessionId: 46f569a9-d561-4376-8644-c0a07c47905c
|
||||
---
|
||||
|
||||
Each SCSS partial (`_typography.scss`, `_animations.scss`) must have its own `@use 'variables' as *;` at the top to access mixins, even when `main.scss` also imports it.
|
||||
|
||||
**Why:** Sass module system (`@use`) scopes imports per-file. Vite's `additionalData` only runs for component `<style lang="scss">` blocks, not for Sass-loaded partials.
|
||||
|
||||
**How to apply:** Any new SCSS partial that uses mixins/variables must include `@use 'variables' as *;` as its first line. Do NOT rely on Vite additionalData for partials loaded via `@use` in main.scss.
|
||||
|
||||
Tailwind v4 must be imported in a separate `src/styles/tailwind.css` (`@import "tailwindcss"`) and imported from `main.ts` before `main.scss`. Importing it inside a `.scss` file triggers Sass `@import` deprecation errors.
|
||||
53
.claude/memory/project_daiting.md
Normal file
53
.claude/memory/project_daiting.md
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
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
|
||||
Reference in New Issue
Block a user