SHOPPING_CART_APP is a modern and scalable e-commerce web application built with Vite, Tailwind CSS, Express.js, Stripe, Google & GitHub Auth, Firebase, PostgreSQL, and Prisma. It provides a seamless shopping experience for users with secure authentication, smooth UI, and integrated payment solutions.
- β User Authentication (Google & GitHub Login)
- β Product Listing & Details
- β Shopping Cart & Checkout
- β Stripe Payment Integration π³
- β Responsive & Fast UI
- β PostgreSQL Database with Prisma ORM
- β‘ Vite (Frontend)
- π’ Express.js (Backend)
- π PostgreSQL (Database)
- π₯ Firebase (Authentication & Storage)
- β² Vercel (Frontend Deployment)
- π¨ Tailwind CSS (Styling)
- π³ Stripe API (Payments)
- π± Prisma ORM (Database Management)
- π Google & GitHub Auth (OAuth Authentication)
- π Render (Backend Deployment)
SHOPPING_CART_APP/
βββ client/ # Frontend with Vite + React
β βββ public/ # Static assets
β βββ src/ # Components & pages
β βββ .env # Frontend environment variables
β βββ package.json # Frontend dependencies
β βββ vite.config.js
βββ admin/ # Backend with Express & Prisma
β βββ prisma/ # Database schema & migrations
β βββ src/ # API routes & controllers
β βββ .env # Backend environment variables
β βββ package.json # Backend dependencies
β βββ index.js
βββ README.md # Project documentation
βββ LICENSE # Project license
To run this project locally, follow these steps:
git clone https://github.com/sarahmaheen/SHOPPING_CART_APP.git
cd SHOPPING_CART_APP
# Frontend
cd client
npm install
# Backend
cd ../admin
npm install
Create a .env
file in both client/
and admin/
directories with the necessary variables.
# Server Port
PORT=8000
# Database Configuration (PostgreSQL)
DATABASE_URL=your_database_url
# CORS Settings
ORIGIN=http://localhost:5173 # Update this after deploying the frontend
# Stripe API Key (For Payment Gateway)
STRIPE_SECRET_KEY=your_stripe_secret_key
# Email Service (Brevo API)
BREVO_API_KEY=your_brevo_api_key
SENDER_EMAIL=your_email@yourdomain.com
# Backend API URL
VITE_PUBLIC_URL=your_backend_api_url
# Firebase Configuration
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
VITE_FIREBASE_PROJECT_ID=your_firebase_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_firebase_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_firebase_messaging_sender_id
VITE_FIREBASE_APP_ID=your_firebase_app_id
VITE_FIREBASE_MEASUREMENT_ID=your_firebase_measurement_id
# Firebase Authentication Provider
VITE_FIREBASE_AUTH_PROVIDER="google"
# Enable Firestore (If using Firestore database)
VITE_FIREBASE_FIRESTORE=true
# Enable Firebase Storage (If using file storage)
VITE_FIREBASE_STORAGE=true
# GitHub Authentication
VITE_GITHUB_CLIENT_ID=your_github_client_id
VITE_GITHUB_CLIENT_SECRET=your_github_client_secret
# Start Backend (Server)
cd server
npm run dev
# Start Frontend (Client)
cd ../client
npm run dev
π App will run at: http://localhost:3000
- Push the latest code to GitHub
- Connect the repository to Vercel
- Set the root directory to
client/
- Configure:
- Framework: Vite
- Build Command:
npm run build
- Output Directory:
dist
- Add environment variables
- Click Deploy
- Push the latest code to GitHub
- Create a new web service in Render
- Set the root directory to
server/
- Configure:
- Start Command:
npm start
- Environment Variables: Paste from
.env
- Start Command:
- Click Deploy
Want to contribute? Follow these steps:
- Fork the repository
- Clone it:
git clone https://github.com/sarahmaheen/SHOPPING_CART_APP.git
- Create a new branch:
git checkout -b feature-xyz
- Commit changes:
git commit -m "Added XYZ feature"
- Push to your branch:
git push origin feature-xyz
- Open a Pull Request π
This project is licensed under the MIT License.
πΉ Beautifully created by Sarah Maheen π