Skip to content

Coral3la/TechStore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

TechStore

A small full-stack e-commerce demo: browse a product catalog and create an account. The frontend is a React + TypeScript single-page app built with Vite; the backend is an Express + TypeScript JSON API with an in-memory data store.

Tech stack

Layer Stack
Frontend React 19, TypeScript, Vite, React Router 7, CSS Modules
Backend Node.js, Express 5, TypeScript, CORS
Tooling ESLint, ts-node-dev

Project structure

my-shop-project/
├── my-shop-frontend/        # React SPA (Vite)
│   └── src/
│       ├── components/Navbar/
│       ├── pages/           # Home, Products, Signup
│       ├── types.ts         # Shared TS interfaces
│       └── App.tsx          # Routes
└── my-shop-backend/         # Express API
    └── src/index.ts         # Routes + in-memory database

Getting started

Prerequisites

  • Node.js 18+ and npm

1. Start the backend

cd my-shop-backend
npm install
npm run dev

The API runs at http://localhost:3001.

2. Start the frontend

In a second terminal:

cd my-shop-frontend
npm install
npm run dev

The app runs at http://localhost:5173. Vite proxies any /api request to the backend, so both servers need to be running.

API reference

Base URL: http://localhost:3001

Method Endpoint Description
GET /api/products List all products
GET /api/products/:id Get a single product by id
POST /api/signup Create a user account

POST /api/signup

Request body:

{
  "name": "Jane Smith",
  "email": "jane@example.com",
  "password": "secret123"
}

Validation rules: all fields are required, the email must be well-formed, and the password must be at least 6 characters. Returns 201 on success, or 400 / 409 on validation or duplicate-email errors.

Available scripts

Frontend (my-shop-frontend/)

Script Description
npm run dev Start the Vite dev server with HMR
npm run build Type-check and build for production
npm run preview Preview the production build
npm run lint Run ESLint

Backend (my-shop-backend/)

Script Description
npm run dev Start the API with live reload
npm run build Compile TypeScript to dist/
npm run start Run the compiled server

Notes

  • Data is stored in memory on the backend — products are seeded on startup and registered users are lost whenever the server restarts.
  • Passwords are validated but not persisted or hashed; this project is a demo and is not production-ready.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors