Welcome to Grocers Bay, an online grocery application designed to provide users with a seamless and efficient shopping experience. The project leverages a microservices architecture, utilizing React.js for the frontend, Node.js for the backend, and PostgreSQL and MongoDB as the database. This comprehensive setup demonstrates a diverse range of skills in MERN Stack, Microservices, and Database management. The backend is hosted On Google Cloud Platform (till free credits last)
The frontend has a separate repo at https://github.com/soham04/grocers-bay-frontend
Backend successfully hosted on Google Kubernetes Engine (GKE) and the frontend of render.com
- Add SSL certificate for HTTPS support
- Integrate with the frontend (Waiting for SSL support)
- Add Horizontal scalling to the pods
- Integrate Kafka for inter service communication
- Write unit tests
- Improve error handling
- Make the frontend responsive
-
User Authentication: JWT token login sessions with the help of cookies.
-
Product Catalog: Browse and search for a wide range of grocery items.
-
Shopping Cart: Add and manage products in the cart before checkout.
-
Order Processing: Streamlined order placement, payment processing, and order history.
-
Payment Gateway - Secure payment possible powered by Stripe.
-
Microservices Architecture: Modular and scalable backend services.
-
Responsive Design: Ensures a consistent user experience across various devices.
-
User Service: Responsible for user authentication and token generation and validation. The user database is accessible from this service. It's also responsible for all user management.
-
Product Service: Manages product information and inventory. Also handles validation of the cart for the order service.
-
Order Service: Handles order processing, payment, and order history.
-
Database: PostgreSQL database for data storage for Users and Orders since they have a definite structure. MongoDB for storing product details since their structure might change depending upon the product.
-
Communication: RESTful APIs for communication between microservices via API's.
-
API Gateway: Still in development
This project showcases proficiency in a variety of technologies and tools, including:
-
Frontend:
-
React.js for building dynamic and interactive user interfaces.
-
React Context for state management.
-
-
Backend:
-
Node.js for microservices.
-
Express.js for building RESTful APIs.
-
Microservices architecture for scalability.
-
-
Database:
-
Authentication:
- JWT (JSON Web Tokens) for secure authentication
-
Deployment:
-
Docker for containerization
-
Microservices deployment and orchestration
-
Google Kubernetes Engine (GKE) for deployment of the backend.
-
Render.com for hosting the frontend.
-
Ingress Controller for load balancing and routing
-
-
Product service
-
GET
/product
- Get all the products -
GET
/product/search
- Search product with given keyword in title or description. -
GET
/product/:id
- Get details of the proudct with given product ID. -
POST
/cart/total
- Get subtotal, tax and total of the cart items.
-
-
Users service
-
POST
/customer/register
- Register a new user and send email with verification link. -
POST
/customer/login
- Authenticate the user with given login id and password, if the credentials match generate a token and set the cookies. -
GET
/customer/logout
- Delete the cookies making the user logout of the frontend. -
GET
/customer
- Authorize the user user via cookies and send the user details. -
GET
/verify/email/:uid/:otp
- Verify the user and OTP(One time password) sent to the user while registering. If values match, the user is marked as verified. -
GET
/verify/loggedin
- Authorize the user user via cookies and send the user certain details if the token is valid and the user is authenticated. -
GET
/verify/token
- Authorize the user user via the token and respond if the user is authenticated or not. This route is used by other services to authenticate the user request.
-
-
Order service
-
POST
order/
- Create order, authenticated via cookies. -
GET
order/
- Get all the orders, authenticated via cookies. -
GET
order/:id
- Get details of a particular order. -
POST
payment/
- Initialise payment intent for the given order via Stripe and return the secret key for the transaction to the frontend. -
POST
webhook/
- (Webhook) webhook called by Stripe upon completion of the payment.
-