Skip to content

Saurabhkr952/Book-Store-MERN-Stack

 
 

Repository files navigation

Book Store MERN Stack Project

Lessons

  • Lesson 01: Create Node.js project from scratch
  • Lesson 02: Create our first HTTP Route
  • Lesson 03: Add MongoDB and Mongoose to Node.js
  • Lesson 04: Create Book model with Mongoose
  • Lesson 05: Save a new Book with Mongoose
  • Lesson 06: Get All Books with Mongoose
  • Lesson 07: Get One Book by ID with Mongoose
  • Lesson 08: Update a Book with Mongoose
  • Lesson 09: Delete a Book with Mongoose
  • Lesson 10: Refactor Node.js with Express Router
  • Lesson 11: CORS Policy in Node.js and Express.js
  • Lesson 12: Create React Project, Vite, Tailwind CSS
  • Lesson 13: SPA and Add React Router DOM
  • Lesson 14: Show Books List in React
  • Lesson 15: Show Book Details in React
  • Lesson 16: Create Book in React
  • Lesson 17: Edit Book in React
  • Lesson 18: Delete Book in React
  • Lesson 19: Show Books List as Card
  • Lesson 20: Make Book Card a Single Component
  • Lesson 21: Add Book Modal
  • Lesson 22: Improve User Experience (UX) with Beautiful Alert

Recent Updates

Kubernetes Deployment

mern

In a recent update, I've extended the capabilities of this project by configuring it for Kubernetes (K8s) deployment. These changes include:

  • MongoDB Configuration: I've made adjustments to the backend/config.js file to configure the MongoDB URL. This modification allows our backend to seamlessly interact with a MongoDB database deployed within our Kubernetes cluster.

  • Docker Image Optimization: To ensure efficient image management, I've created Dockerfiles for both the backend and frontend components. These Dockerfiles are designed to use minimal base images, reducing image size and enhancing performance.

  • Development Environment Simplification: A docker-compose.yaml file has been introduced to simplify the setup of the development environment. This Docker Compose file orchestrates the deployment of the application's components, streamlining development.

  • Kubernetes Manifests: To further enhance the scalability and manageability of the project, I've added a series of Kubernetes manifests:

    • frontend.yaml: This file contains definitions for the frontend service and deployment.
    • backend.yaml: It includes configurations for the backend service and deployment.
    • database.yaml: This manifest defines the MongoDB deployment and service.
    • database-secrets.yaml: For enhanced security, MongoDB username and password are stored as secrets.
    • mongo-express.yaml: This file contains deployment and service definitions for the Mongo Express admin interface.
    • mongo-express-secrets.yaml: Safely stores MongoDB credentials and URL.
    • ingress.yaml: By configuring this file, we enable access to our application via the domain book-store.com.

These updates are strategically aimed at improving the project's scalability and making it easier to deploy and manage within a Kubernetes environment.

Future Improvements

Our project is an ongoing work in progress, with plans for further enhancements in the pipeline. Stay tuned for more updates and new features!

About

This is a repository for my Book Store MERN Stack tutorial. I've extended the capabilities of this project by configuring it for Kubernetes (K8s) deployment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 96.9%
  • Dockerfile 1.5%
  • HTML 1.4%
  • CSS 0.2%