How aprkal12/codiit-refactor works
Codiit is an Express e-commerce backend supporting buyer and seller accounts, stores and products, carts, orders and payments, inquiries, reviews, real-time notifications, and seller analytics. The principal workflow is an HTTP request routed through middleware to a domain controller and service, which applies business rules and persists data through repositories. Authentication, uploads, and order expiry are additional runtime branches. The README documents the layered request flow and capabilities; sampled source confirms app routing, authentication, review handling, SSE, and the expiry worker. Other domain internals are represented from documented capabilities and the source tree, not inspected in full.
Main entry points: app.ts Express API · order.service.ts Order Processing · notification.service.ts Notifications · order.repository.ts Data Repositories
Components 23
HTTP Platform
- Express API
src/app.ts - Request Middleware
src/common/middlewares - Metadata API
src/domains/metadata/metadata.controller.ts
Commerce
- Store Management
src/domains/store/store.service.ts - Product Catalog
src/domains/product/product.service.ts - Shopping Cart
src/domains/cart/cart.service.ts - Order Processing
src/domains/order/order.service.ts - Payments
src/domains/payment/payment.service.ts - Image Uploads
src/domains/s3/s3.service.ts
Customer Engagement
- Product Inquiries
src/domains/inquiry/inquiry.service.ts - Product Reviews
src/domains/review/review.service.ts - Notifications
src/domains/notification/notification.service.ts - SSE Connections
src/common/utils/sse.manager.ts - Seller Dashboard
src/domains/dashboard/dashboard.service.ts
Identity & Accounts
- Authentication
src/domains/auth/auth.service.ts - User Management
src/domains/user/user.service.ts
Runtime Services
- Data Repositories
src/domains/order/order.repository.ts - PostgreSQL
- Order Expiry Worker
src/workers/orderExpiryWorker.ts - Redis Queue
src/config/redis.ts
Other components
- HTTP Client
- AWS S3
- Portone
Connections 25
- HTTP Client → Express API: sends requests
- Express API → Request Middleware: applies middleware
src/app.ts - Express API → Authentication: routes requests
src/app.ts - Express API → User Management: routes requests
src/app.ts - Express API → Store Management: routes requests
src/app.ts - Express API → Product Catalog: routes requests
src/app.ts - Express API → Shopping Cart: routes requests
src/app.ts - Express API → Order Processing: routes requests
src/app.ts - Express API → Payments: routes requests
src/app.ts - Express API → Product Inquiries: routes requests
src/app.ts - Express API → Product Reviews: routes requests
src/app.ts - Express API → Notifications: routes requests
src/app.ts - Express API → Seller Dashboard: routes requests
src/app.ts - Express API → Metadata API: routes requests
src/app.ts - Express API → Image Uploads: routes requests
src/app.ts - Authentication → User Management: looks up users
src/domains/auth/auth.service.ts - Product Reviews → Data Repositories: reads and writes
src/domains/review/review.service.ts - Order Processing → Notifications: uses notification service
src/domains/order/order.service.ts - Notifications → SSE Connections: uses SSE manager
src/domains/notification/notification.controller.ts - Order Processing → Data Repositories: accesses data
src/domains/order/order.service.ts - Data Repositories → PostgreSQL: queries
- Order Expiry Worker → Order Processing: expires orders
src/workers/orderExpiryWorker.ts - Order Expiry Worker → Redis Queue: monitors queue
src/workers/orderExpiryWorker.ts - Image Uploads → AWS S3: stores images
- Payments → Portone: integrates payments