How sayalimkale1209/elabel_docker works
Project Type and Purpose
• This is a full-stack Wine Inventory Management System, consisting of a React/Tailwind frontend (client/) and an Express/Node.js backend (server/), with a PostgreSQL database (via Drizzle ORM) and file storage for uploads. It supports user authentication, product & ingredient CRUD, image uploads, and Excel import/export.
Main Components
a. Frontend (client/)
• React + TypeScript + Vite application
• UI layer: reusable components (forms, tables, modals, UI primitives)
• Pages: login, register, product/ingredient listings and forms
• Auth & data fetching: custom hooks and supabase.ts (JWT-based auth)
b. Backend (server/)
• Express.js server exposing REST endpoints (/api/auth, /api/products, /api/ingredients)
• Business logic: auth.ts, routes.ts, storage.ts (CRUD + import/export)
• File handling: Multer for image uploads (uploads/ directory)
• Excel processing: XLSX library for import/export
• JWT auth and email confirmation via external SMTP service
c. Database
• PostgreSQL with Drizzle ORM (drizzle.config.ts + shared/schema.ts)
• Tables: users, products, ingredients
d. File Storage
• Local filesystem (uploads/) for product images
e. External Services
• Email SMTP for account confirmation
• (Optional) Supabase if used for real‐time or auth
Component Relationships and Data Flow
1. User interacts with the React UI →
2. Frontend issues HTTP(S) requests to Express API →
3. Express routes call storage.ts → Drizzle ORM executes SQL against PostgreSQL
4. File uploads handled by Multer → stored in uploads/ → served via static file endpoint
5. Excel import/export handled in-memory via XLSX → data persisted or streamed back to frontend
6. Auth flows: JWT issued by backend, stored in client; email confirmation via SMTP service
Architectural Patterns & Principles
• Separation of concerns: UI vs API vs data layer
• RESTful API design
• Modular folder structure (client/, server/, shared/)
• Shared code (types/schemas in shared/) to guarantee end-to-end type safety
• Environment-driven configuration and containerization (Dockerfile, docker-compose.yml)
Essential Details to Capture
• All top-level modules (client/, server/, shared/)
• Key libraries/frameworks (React, Tailwind, Express, Drizzle)
• Data flows: user → UI → API → DB/Storage → UI
• Authentication & authorization path
• Import/export pipelines