Skip to content

sarahcodeland/SHOPPING_CART_APP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SHOPPING_CART_APP πŸ›’

πŸš€ Overview

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.

✨ Features

  • βœ… User Authentication (Google & GitHub Login)
  • βœ… Product Listing & Details
  • βœ… Shopping Cart & Checkout
  • βœ… Stripe Payment Integration πŸ’³
  • βœ… Responsive & Fast UI
  • βœ… PostgreSQL Database with Prisma ORM

πŸ› οΈ Technologies Used

  • ⚑ 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)

πŸ“ Project Structure

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

πŸ“₯ Installation & Setup

To run this project locally, follow these steps:

1️⃣ Clone the repository

git clone https://github.com/sarahmaheen/SHOPPING_CART_APP.git
cd SHOPPING_CART_APP

2️⃣ Install dependencies

# Frontend
cd client
npm install

# Backend
cd ../admin
npm install

3️⃣ Set Up Environment Variables

Create a .env file in both client/ and admin/ directories with the necessary variables.

πŸ“‚ Admin .env (Backend)

# 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

πŸ“‚ Client .env (Frontend)

# 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

4️⃣ Start Development Servers

# Start Backend (Server)
cd server
npm run dev

# Start Frontend (Client)
cd ../client
npm run dev

🌐 App will run at: http://localhost:3000


🌍 Deployment

πŸš€ Deploy Frontend (Vercel)

  1. Push the latest code to GitHub
  2. Connect the repository to Vercel
  3. Set the root directory to client/
  4. Configure:
    • Framework: Vite
    • Build Command: npm run build
    • Output Directory: dist
  5. Add environment variables
  6. Click Deploy

πŸš€ Deploy Backend (Render)

  1. Push the latest code to GitHub
  2. Create a new web service in Render
  3. Set the root directory to server/
  4. Configure:
    • Start Command: npm start
    • Environment Variables: Paste from .env
  5. Click Deploy

🀝 Contributing

Want to contribute? Follow these steps:

  1. Fork the repository
  2. Clone it:
    git clone https://github.com/sarahmaheen/SHOPPING_CART_APP.git
  3. Create a new branch:
    git checkout -b feature-xyz
  4. Commit changes:
    git commit -m "Added XYZ feature"
  5. Push to your branch:
    git push origin feature-xyz
  6. Open a Pull Request πŸš€

πŸ“œ License

This project is licensed under the MIT License.


πŸŽ‰ Acknowledgements

πŸ”Ή Beautifully created by Sarah Maheen πŸ’–

Releases

No releases published

Packages

No packages published