β‘ Techno World β Thailand's Premium Tech Store
A full-featured cyberpunk-themed e-commerce web application built with React , Vite , and Firebase . Features a real-time admin dashboard, bank transfer payment verification, secure role-based authentication, Cloudinary image uploads, and a complete order management system.
Home Page
Product Page
Product Detail
Cart
Orders
Profile
Dashboard
Products
Orders
Customers
Categories
Bank Accounts
Settings
Product Browsing β Filter by category, price range, and star rating via a dynamic sidebar
Product Details β Multi-image gallery with lightbox viewer, stock status, reviews & ratings
Smart Cart β Add/remove items, adjust quantities, real-time totals
Bank Transfer Checkout β Upload payment slip; admin verifies before order is confirmed
Real-time Order Tracking β Status updates live (Pending β Processing β Shipped β Delivered)
Order Success Page β Reflects payment confirmation in real-time without refresh
User Profile β Manage personal info and shipping address (auto-filled at checkout)
Reviews & Ratings β Leave and view product reviews
Wishlist β Save products for later
Authentication β Email/password and Google sign-in via Firebase Auth
Overview Dashboard β Live stats: total sales, orders, products, and real-time activity feed
Product Management β Full CRUD with multi-image Cloudinary uploads, category assignment, real-time stock updates
Order Management β Confirm or reject bank transfer payments; stock only deducted on confirmation
Customer Management β View all users, order counts, and total spend (excludes cancelled/rejected orders)
Category Management β Create, edit, and delete product categories
Bank Account Management β Manage payment accounts shown to customers at checkout
Settings & Access Control β Grant or revoke admin access per user; update shipping fee settings
Activity Log β Real-time feed of all admin actions with admin identity (name + avatar)
Separate Admin Login β Admins and customers use completely separate login flows
Technology
Purpose
React 18 + Vite
UI framework & build tool
Tailwind CSS
Utility-first styling
Lucide React
Icon library
React Context API
Auth, Cart, Wishlist global state
React Router DOM
Client-side routing
Firebase Auth
Authentication
Firebase Firestore
Real-time database
Cloudinary
Product image hosting & uploads
βοΈ Installation & Setup
Node.js v18+
A Firebase project with Authentication and Firestore enabled
A Cloudinary account with an unsigned upload preset
git clone https://github.com/kweephyo-pmt/e-commerce.git
cd e-commerce
3. Configure Environment Variables
Create a .env file in the root directory:
# Firebase
VITE_FIREBASE_API_KEY = your_api_key
VITE_FIREBASE_AUTH_DOMAIN = your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID = your_project_id
VITE_FIREBASE_STORAGE_BUCKET = your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID = your_sender_id
VITE_FIREBASE_APP_ID = your_app_id
# Cloudinary
VITE_CLOUDINARY_CLOUD_NAME = your_cloud_name
VITE_CLOUDINARY_UPLOAD_PRESET = your_unsigned_upload_preset
Tip: Copy .env.example and fill in your values.
4. Start the Development Server
Open http://localhost:5173 in your browser.
βββ src/
β βββ components/ # Reusable UI (Navbar, Toast, FilterSidebar, CloudinaryUpload, etc.)
β βββ context/ # Global state (AuthContext, CartContext, WishlistContext)
β βββ pages/ # All pages
β β βββ Home.jsx
β β βββ Products.jsx
β β βββ ProductDetails.jsx
β β βββ Cart.jsx
β β βββ Checkout.jsx
β β βββ OrderSuccess.jsx
β β βββ Orders.jsx
β β βββ Profile.jsx
β β βββ Wishlist.jsx
β β βββ Login.jsx
β β βββ AdminLogin.jsx
β β βββ AdminDashboard.jsx # Main admin shell + sidebar
β β βββ AdminOrders.jsx
β β βββ AdminCustomers.jsx
β β βββ AdminCategories.jsx
β β βββ AdminBankAccounts.jsx
β β βββ AdminSettings.jsx
β βββ utils/
β β βββ logActivity.js # Shared activity logging utility
β βββ config/
β β βββ firebase.js # Firebase initialization
β βββ App.jsx
βββ firestore.rules # Firestore security rules
βββ vercel.json # Vercel deployment config
βββ public/
βββ favicon.png
βββ Techno World.png # OG share image
βββ TechnoWorld/ # App screenshots
Collection
Read
Write
users
Authenticated users
Own doc or admin
products
Public
Admin (create/delete/update)
orders
Own orders or admin
Own orders (create); admin (update/delete)
reviews
Public
Authenticated (create); own or admin (update/delete)
categories
Public
Admin only
carts
Own cart
Own cart
activityLogs
Admin only
Authenticated users (create); admin (update/delete)
settings
Public (read)
Admin only
Customers log in via /login β admin accounts are blocked here
Admins log in via /admin β redirected to /admin/dashboard
Regular users attempting to access /admin/dashboard are redirected to /
Customer uploads bank transfer slip at checkout (stored via Cloudinary)
Stock is not deducted until admin confirms payment
Admin confirms β stock decremented, order moves to Processing
Admin rejects β order cancelled, stock untouched
The project includes a vercel.json for SPA routing. Deploy in one command:
Or connect the GitHub repo directly in the Vercel dashboard and add your .env variables under Project β Settings β Environment Variables .
This project is licensed under the MIT License .