SHOPPING_CART_APP Tailwind Templates

Shopping_cart_app

A modern, full-stack e-commerce web app with authentication, Stripe payments, and a responsive UI. šŸš€šŸ›’

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
[email protected]

šŸ“‚ 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 šŸ’–

Top categories

Loading Svelte Themes