How zurich123/pim works
Project type and purpose
• Full-stack web application named “Vibecoding.”
• Frontend: React + Vite (client/).
• Backend: Node.js + TypeScript (server/).
• Provides a RESTful API (routes.ts, swagger-routes.ts) and publishes client SDKs (javascript_client.js, python_client.py).
File structure
• Top-level:
– client/ (React app)
– server/ (API server)
– shared/schema.ts (shared DTOs and types)
– python_client.py & javascript_client.js (SDK entry points)
– API_DOCUMENTATION.md, CLIENT_INTEGRATION_GUIDE.md
• server/ modules:
– auth.ts (JWT auth logic)
– db.ts (Drizzle ORM → PostgreSQL)
– emailService.ts (external email provider)
– storage.ts (file store, e.g. S3)
– routes.ts (business-route wiring)
– swagger-routes.ts + swagger.ts (API docs)
• client/ is a typical component-based React structure but is ancillary for Python client engineers.
Main Components and Interactions (to represent
a. Python Client
– python_client.py
– Consumes shared/schema.ts definitions (you may mirror types in Python SDK).
– Implements HTTP calls (requests or httpx).
b. API Gateway / HTTP Server
– Express/Vite server (server/index.ts, vite.ts)
– Routes: authentication, products, analytics, categories, etc.
– Swagger UI endpoint for live API docs.
c. Business Logic Services
– Auth Service (auth.ts) → JWT issue/verify
– Data Service (db.ts via Drizzle ORM) → PostgreSQL
– Email Service (emailService.ts) → External SMTP or API
– Storage Service (storage.ts) → S3-style blob store
d. Data Stores & External Services
– PostgreSQL (via Drizzle)
– Object Storage (S3 or equivalent)
– Email Provider (e.g., SendGrid, SES)
e. (Optional) React Frontend
– Demonstrates web-UI usage of same APIs via javascript_client.js
Architectural Patterns
• Layered (Presentation → API Layer → Service Layer → Data Layer)
• Shared-schema for consistency between SDKs and server DTOs
• JWT-based stateless authentication
• OpenAPI/Swagger for discoverability and SDK generation