Skip to content

Welcome to Grocers Bay, our online grocery application offering a seamless shopping experience. We've employed a microservices architecture, React.js for the frontend, Node.js and Python for the backend, and PostgreSQL as the database. This setup showcases my expertise in web development, microservices, and database management. Deployed in GCP.

Notifications You must be signed in to change notification settings

soham04/grocers-bay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grocers Bay - Online Grocery Ecommerce

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

Table of Contents

  1. Status

  2. Key Features

  3. Backend Architecture

  4. Technologies Used

  5. API Reference

Status

Backend successfully hosted on Google Kubernetes Engine (GKE) and the frontend of render.com

Remaining Tasks

  • 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

Key Features

  • 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.

Backend Architecture

/docs/architecture.drawio.png

  1. 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.

  2. Product Service: Manages product information and inventory. Also handles validation of the cart for the order service.

  3. Order Service: Handles order processing, payment, and order history.

  4. 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.

  5. Communication: RESTful APIs for communication between microservices via API's.

  6. API Gateway: Still in development

Technologies Used

This project showcases proficiency in a variety of technologies and tools, including:

API Reference

  1. 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.

  2. 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.

  3. 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.

About

Welcome to Grocers Bay, our online grocery application offering a seamless shopping experience. We've employed a microservices architecture, React.js for the frontend, Node.js and Python for the backend, and PostgreSQL as the database. This setup showcases my expertise in web development, microservices, and database management. Deployed in GCP.

Topics

Resources

Stars

Watchers

Forks