feat: rename brand from canina to canino across codebase
This commit is contained in:
1 parent
2851ef8a25
commit
f69537a688
73 files changed
+577
-577
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Application Backend Integration & Refactoring Plan
|
||||
|
||||
This plan details the migration of the CaninaIran frontend application from using mock data to communicating entirely with the backend APIs, adding email/password authentication, and resolving issues with the pet profile forms.
|
||||
This plan details the migration of the CaninoIran frontend application from using mock data to communicating entirely with the backend APIs, adding email/password authentication, and resolving issues with the pet profile forms.
|
||||
|
||||
## User Review Required
|
||||
> [!IMPORTANT]
|
||||
@@ -18,15 +18,15 @@ This plan details the migration of the CaninaIran frontend application from usin
|
||||
### 1. Database & Backend Auth [Backend]
|
||||
Adds email/password authentication capabilities and standardizes the auth endpoints.
|
||||
|
||||
#### [MODIFY] [schema.prisma](file:///c:/Users/parsa/Desktop/work/caninairan/backend/prisma/schema.prisma)
|
||||
#### [MODIFY] [schema.prisma](file:///c:/Users/parsa/Desktop/work/caninoiran/backend/prisma/schema.prisma)
|
||||
- Add `password String? @db.VarChar(255)` to the `User` model.
|
||||
- Run `npx prisma migrate dev --name add_user_password`.
|
||||
|
||||
#### [MODIFY] [auth.controller.ts](file:///c:/Users/parsa/Desktop/work/caninairan/backend/src/auth/auth.controller.ts)
|
||||
#### [MODIFY] [auth.controller.ts](file:///c:/Users/parsa/Desktop/work/caninoiran/backend/src/auth/auth.controller.ts)
|
||||
- Add `@Post('register-email')` endpoint to accept `email`, `password`, `firstName`, and `lastName`.
|
||||
- Add `@Post('login-email')` endpoint to accept `email` and `password`.
|
||||
|
||||
#### [MODIFY] [auth.service.ts](file:///c:/Users/parsa/Desktop/work/caninairan/backend/src/auth/auth.service.ts)
|
||||
#### [MODIFY] [auth.service.ts](file:///c:/Users/parsa/Desktop/work/caninoiran/backend/src/auth/auth.service.ts)
|
||||
- Implement `bcrypt` hashing for `registerEmail` and password verification for `loginEmail`.
|
||||
- Update `sendOtp` to return the generated code in the response body (as a fallback before SMS panel is implemented) and add a `// TODO: Connect to SMS provider` comment.
|
||||
|
||||
@@ -34,7 +34,7 @@ Adds email/password authentication capabilities and standardizes the auth endpoi
|
||||
### 2. Frontend Auth (Storefront) [Frontend]
|
||||
Refactors the storefront authentication modal to remove mock tests and integrate real email/password + mobile/OTP login.
|
||||
|
||||
#### [MODIFY] [AuthModal.tsx](file:///c:/Users/parsa/Desktop/work/caninairan/frontend/application/components/AuthModal.tsx)
|
||||
#### [MODIFY] [AuthModal.tsx](file:///c:/Users/parsa/Desktop/work/caninoiran/frontend/application/components/AuthModal.tsx)
|
||||
- Remove the "ورود سریع تستی" (mock login) button entirely.
|
||||
- Implement two tabs: "ایمیل و رمز عبور" (Email/Password) and "شماره موبایل" (Mobile OTP).
|
||||
- Wire up the Email tab to `/auth/register-email` and `/auth/login-email`.
|
||||
@@ -45,11 +45,11 @@ Refactors the storefront authentication modal to remove mock tests and integrate
|
||||
### 3. Pet Profile Update Form [Frontend]
|
||||
Resolves the issue where updating the pet profile in the multi-step form sends an incomplete payload to the backend.
|
||||
|
||||
#### [MODIFY] [PetProfileWizard.tsx](file:///c:/Users/parsa/Desktop/work/caninairan/frontend/application/components/PetProfileWizard.tsx)
|
||||
#### [MODIFY] [PetProfileWizard.tsx](file:///c:/Users/parsa/Desktop/work/caninoiran/frontend/application/components/PetProfileWizard.tsx)
|
||||
- Update the `handleComplete` or `onSubmit` function to ensure it merges the state of all wizard steps (Name, Breed, Age, Weight, Activity Level, Medical Conditions).
|
||||
- Ensure the payload strictly matches what the backend `PUT /api/pets/:id` expects.
|
||||
|
||||
#### [MODIFY] [usePetStore.ts](file:///c:/Users/parsa/Desktop/work/caninairan/frontend/application/lib/store/usePetStore.ts)
|
||||
#### [MODIFY] [usePetStore.ts](file:///c:/Users/parsa/Desktop/work/caninoiran/frontend/application/lib/store/usePetStore.ts)
|
||||
- Verify `updatePet` action properly merges changes and reflects the server response.
|
||||
|
||||
---
|
||||
@@ -64,7 +64,7 @@ Currently, several sections in the Home page (`page.tsx`) rely on mock data or h
|
||||
> 4. **Categories/Links:** Links to `/shop` and `/wiki` are static HTML.
|
||||
> 5. **Hero Section:** Banners and text are static.
|
||||
|
||||
#### [MODIFY] [page.tsx](file:///c:/Users/parsa/Desktop/work/caninairan/frontend/application/app/page.tsx)
|
||||
#### [MODIFY] [page.tsx](file:///c:/Users/parsa/Desktop/work/caninoiran/frontend/application/app/page.tsx)
|
||||
- No immediate file changes if we just wanted the list, but we will wrap components to fetch data dynamically where applicable.
|
||||
- For `SmartAdvisor`, we will ensure it uses the real database.
|
||||
|
||||
@@ -72,7 +72,7 @@ Currently, several sections in the Home page (`page.tsx`) rely on mock data or h
|
||||
### 5. Blogs/Wiki Integration [Frontend & Backend]
|
||||
Connects the Wiki page to the real backend database instead of hardcoded articles.
|
||||
|
||||
#### [MODIFY] [wiki/page.tsx](file:///c:/Users/parsa/Desktop/work/caninairan/frontend/application/app/wiki/page.tsx)
|
||||
#### [MODIFY] [wiki/page.tsx](file:///c:/Users/parsa/Desktop/work/caninoiran/frontend/application/app/wiki/page.tsx)
|
||||
- Replace static blog cards with `api.get('/blogs')` or Server-Side Rendering (SSR) fetching from the database.
|
||||
- Create dynamic routing `/wiki/[slug]/page.tsx` for individual blog articles.
|
||||
|
||||
|
||||
Reference in new issue
Block a user