A robust RESTful API for e-commerce applications featuring user authentication, product management, shopping cart functionality, order processing, and digital wallet integration.
-
User Authentication
- JWT-based registration/login
- Password hashing with bcrypt
- Protected routes
-
Product Management
- CRUD operations for products
- Product categories
- Product ratings and reviews
-
Shopping Cart
- Add/remove items
- Quantity adjustment
- Automatic price calculation
- Cart persistence
-
Order Processing
- Order creation from cart
- Order status tracking
- Order history
-
Digital Wallet
- Wallet balance management
- Transaction support
- MySQL with TypeORM entities:
- Users
- Products
- Carts
- CartItems
- Orders
- OrderDetails
- Wallets
- Rates
- Categories
| Endpoint | Method | Description |
|---|---|---|
/api/users |
POST | Register new user |
/api/users/login |
POST | User login |
/api/products |
GET | Get all products |
/api/cart |
POST | Add item to cart |
/api/orders |
POST | Create new order |
/api/wallets |
GET | Get wallet balance |
- Backend: Node.js, Express
- Database: MySQL with TypeORM
- Authentication: JWT
- Language: TypeScript
- File Upload: Multer
- Node.js (v18 or higher)
- npm or yarn
- Database (PostgreSQL recommended)
- Clone the repository:
git clone https://github.com/ayobamiseun/typescript-ecommerce-api.git cd typescript-ecommerce-api