Devshop is an online electric gadgets shopping website built with MERN stack.
- Frontend: React, Redux, TailwindCSS, shadcn/ui
- Backend: Node.js, Express.js
- Databases: MongoDB
- Payment: Stripe
- Search engine: Elasticsearch
- Meida API: Cloudinary
- Deployment: AWS EC2, GitHub Actions, Vercel
- Elasticsearch for fast product search
- Node.js REST API with service-oriented architecture.
- OAuth 2.0 for secure authorization
- Support for products with diverse variations
- Stripe for secure payment
- React lazy loading to optimize performance
- Cloudinary for media management
- Automated CI/CD deployments with GitHub Actions
- Node.js
- Docker (includes Docker Compose)
- Google OAuth 2.0 credentials (Client ID)
- Stripe (Publishable and Secret Keys)
- Cloudinary (Name, API Key and API Secret)
Clone the DevShop repository to your local machine: bash Copy code
git clone https://github.com/devltt404/devshop
cd devshop-
Navigate to the
clientfolder:cd client -
Install Dependencies
npm i
-
Setup env variables
Copy the
.env.development.exampleto.env.development.cp .env.development.example .env.development
Important
You must provide values for VITE_STRIPE_PK and VITE_GOOGLE_CLIENT_ID
-
Navigate to the
serverfolder:cd ../server -
Install client dependencies
npm i
-
Setup env variables
Copy the
.env.development.exampleto.env.developmentand update the variables.cp .env.development.example .env.development
Important
You must provide values for CLOUDINARY_NAME, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET, STRIPE_PK (publishable key) and STRIPE_SK (secret key)
We use Docker Compose to set up and run MongoDB, Elasticsearch and Kibana services locally.
-
Start services
docker-compose -f docker-compose.local.yml up -d
-
Verify running Containers
docker ps
You should see the following services listed:
- mongodb on port
27018 - elasticsearch on port
9200 - kibana on port
5601
Import sample data to MongoDB and elasticsearch
npm run setupnpm run devAccess the website through your browser at: http://localhost:5173
