StarTech is a complete electronic e-commerce site, providing end-to-end functionality for browsing, filtering, and purchasing electronic products online.
- Browse products by category
- View detailed product specifications
- Responsive design for desktop and mobile
- Product filtering
- Built with React (frontend) and Node.js/Express/PostgreSQL (backend)
frontend/— React app (Vite)backend/— Express API server
- Node.js
- npm or yarn
- PostgreSQL
cd frontend- Install dependencies:
npm install - Create
.envfile in thefrontend/directory withVITE_BACKEND_URL=http://localhost:5000 - Start dev server:
npm run dev
cd backend- Install dependencies:
npm install - Configure your database in
backend/config/db.js - Set up your backend
.envfile in thebackend/directory with your PostgreSQL credentials (e.g.,PGHOST,PGDATABASE,PGUSER,PGPASSWORD,PGPORT). - Start server:
npm run dev
Create a PostgreSQL database and a table named products with the following columns:
id(SERIAL PRIMARY KEY): Unique identifier for each product.name(VARCHAR): Name of the product.description(TEXT): Short description of the product.category(VARCHAR): Category name (e.g., "laptops", "phones").main_image(VARCHAR): URL or path to the main product image.price(NUMERIC): Product price.
- Visit
http://localhost:5173to use the app. - Click on a category from the homepage to view products.
- Click on a product for specifications.
MIT