ShopSwift Backend is a feature-rich RESTful API built with Node.js and Express.js, forming the backbone of the ShopSwift e-commerce platform. This backend handles secure user authentication, product and order management, and seamless shopping cart functionality. Using MongoDB for robust data storage, it ensures an efficient and scalable e-commerce experience.
- User Authentication: Secure user sign-up, login, and profile management with JSON Web Tokens (JWT).
- Product Listings: Browse a wide range of products with detailed descriptions, prices, and stock availability.
- Shopping Cart: Add items to your cart, update quantities, and proceed to checkout.
- Order Management: Create, view, and track orders with real-time status updates.
- Scalable Backend: Optimized for performance and capable of handling large-scale data.
- Node.js: Server-side JavaScript runtime.
- Express.js: Fast and lightweight web framework for handling HTTP requests.
- MongoDB: Flexible NoSQL database for storing product, user, and order data.
- Mongoose: Simplifies MongoDB interactions with a schema-based approach.
- JWT (JSON Web Tokens): Provides secure authentication mechanisms.
POST /api/auth/register
➜ Register a new userPOST /api/auth/login
➜ Log in an existing userPOST /api/auth/logout
➜ Log out the current userPOST /api/auth/refresh
➜ Refresh the JWT tokenPOST /api/auth/products
➜ Get products by current user's user
GET /api/users/:id
➜ Get user details about userGET /api/users/:id/products
➜ Get products created by user
GET /api/products
➜ Retrieve all productsGET /api/products/:id
➜ Retrieve a specific product by IDPOST /api/products
➜ Add a new productPATCH /api/products/:id
➜ Update product detailsDelete /api/products/:id
➜ Delete a product
GET /api/orders
➜ Retrieve all ordersPOST /api/orders
➜ Place a new order
GET /api/cart
➜ Retrieve the current user's shopping cartPOST /api/cart
➜ Add items to the cartDELETE /api/cart/:id
➜ Remove an item from the cartGET /api/cart/pricing
➜ Get pricing detail
- Source Code: Backend Repository
- Live API: Shopswift API
- Frontend Code: Frontend Repository