Careeroza
Modules and API List
Modules
| Module | Responsibility | Key building blocks |
|---|---|---|
ConfigModule | Typed, validated env config | forRoot({ validate }) |
PrismaModule | Database access (global) | PrismaService |
AuthModule | Register, login, OTP, refresh | Passport local + JWT, bcrypt |
UsersModule | Profiles, addresses | Ownership checks |
CategoriesModule | Category tree | Cache interceptor |
ProductsModule | Catalogue, search, admin CRUD | Query DTO, pagination, Redis cache |
CartModule | Cart items per user | Validation, @CurrentUser |
OrdersModule | Checkout, order history, status | Transactions, gateway, events |
PaymentsModule | Razorpay orders, webhooks | Raw body, signature check, idempotency |
NotificationsModule | Email, SMS, push | BullMQ workers |
HealthModule | Liveness/readiness | Terminus |
The REST API
| Method and path | Auth | Purpose |
|---|---|---|
POST /api/v1/auth/register, /login, /refresh, /logout | Public / user | Accounts and tokens |
POST /api/v1/auth/otp/send, /otp/verify | Public, throttled | Mobile OTP login |
GET /api/v1/categories | Public | Category list (cached) |
GET /api/v1/products?q=&category=&sort=&page= | Public | Search and browse |
GET /api/v1/products/:id | Public | Product details |
POST/PATCH/DELETE /api/v1/products | Admin, seller | Manage catalogue |
GET/POST/PATCH/DELETE /api/v1/cart/items | Customer | Cart |
POST /api/v1/orders | Customer | Checkout (idempotent) |
GET /api/v1/orders, /orders/:id | Owner / admin | Order history |
PATCH /api/v1/orders/:id/status | Admin, seller | Ship, deliver, cancel |
POST /api/v1/webhooks/razorpay | Signature | Payment status |
GET /api/v1/health | Public | Health check |
WS /orders order:track | JWT | Live order status |