3.7 KiB
3.7 KiB
System Discovery
Current Architecture
The Canino Iran system is structured around an active customer storefront and a NestJS REST API backend.
Active Core Applications
- React / Vite Storefront Application (
src/): React 19 + Vite 6 Single Page Application for customer product discovery, supplement dosage recommendation, pet registration, health tracking, and wallet management. - NestJS Backend Service (
backend/src/): Modular NestJS 11 backend service providing business logic, authentication, pet data, catalog management, orders, and system settings. - Database Layer: PostgreSQL database modeled via Prisma ORM 5.22 (
backend/prisma/schema.prisma). - Caching & Session Layer: Redis via
ioredisfor throttling, caching, and session storage.
Excluded / Non-Auditable Artifacts
frontend/application: Next.js build/cache placeholder containing only.next/,tsconfig.tsbuildinfo,next-env.d.ts, andnode_modules/. Lacks an activepackage.jsonor source tree. Excluded from code audit.frontend/admin-panel: Placeholder directory containing onlynode_modules/. Excluded from code audit.
Major Business Domains Discovered
- User & Wallet Domain: User profile, authentication (JWT), multi-address support, wallet deposit/withdrawal ledger.
- Pet & Health Domain: Pet registration, breed/weight profiling, medical conditions tracking, daily health logs, dosing reminders.
- Product & Dosage Domain: Supplement catalog, dosage logic calculation based on pet weight and species, category listings, ingredient/symptom mapping.
- Order & Charity Domain: Checkout workflow, coupon validation, tracking numbers, automatic charity donation allocations.
- Settings & Content Domain: Administrative UI text updates and scientific glossary definitions.
Technical Architecture Summary
- Authentication / Authorization: JWT tokens issued via NestJS Passport strategy (
backend/src/auth). Supported roles in schema:User_PetOwnerandAdmin. - API Architecture: REST endpoints documented via NestJS Swagger OpenAPI (
backend/src/main.ts) and rootswagger.yml. - Database & Migration: PostgreSQL managed by Prisma ORM (
backend/prisma/schema.prisma). - Container Infrastructure: Multi-stage Dockerfiles and
docker-compose.ymlforfrontend,backend,postgres,redis,nginx, andprometheus.
Evidence-Based Status Matrix
| Component / Finding | Classification | Supporting Evidence |
|---|---|---|
| Root Storefront App (React 19 + Vite 6) | Active Application | package.json, vite.config.ts, src/App.tsx |
| NestJS Backend Service | Active Application | backend/package.json, backend/prisma/schema.prisma, backend/src/main.ts |
| PostgreSQL & Prisma ORM Layer | Active Database Layer | backend/prisma/schema.prisma, backend/package.json |
| Redis In-Memory Store | Active Cache/Throttle | backend/src/redis/, backend/package.json |
| Docker Compose Environment | Active Infrastructure | docker-compose.yml, Dockerfile, backend/Dockerfile |
frontend/application |
Excluded Placeholder | Lacks package.json and src/. Contains only build artifacts (.next/, next-env.d.ts). |
frontend/admin-panel |
Excluded Placeholder | Lacks package.json and src/. Contains only node_modules/. |
| Standalone Admin Panel App | Non-Existent | No source tree found in frontend/admin-panel or src/components/Admin*. Admin API capabilities exist in backend (backend/src/settings). |
| Live Payment Gateway Integration | Inferred / Unknown | Frontend relies on mock checkout; schema supports transactions. |
| Automated CI/CD Pipelines | Missing / Unknown | No .github/workflows or equivalent discovered. |