Skip to content

About

Second-hand electronics marketplace for phones, tablets, and wearables, with product search, listing management, and currency conversion.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Loopstation logo

Loopstation

A second-hand trading platform for phones, tablets and wearables

HTML / CSS / JavaScript · Node.js · Express · MySQL

Loopstation is a web platform for buying and selling used phones, tablets and wearables. Visitors browse and search listings and view a detailed test report for each device; administrators sign in to manage products and admin accounts.

Homepage Product detail with test report

Features

Module Description
Homepage Listings grouped into three categories: phones, tablets and wearables
Search Search products by name and type
Product detail Device photos and a test report: condition, battery health, warranty status, charge cycles and more
Currency conversion Switch the displayed price between currencies via the Fixer API
Admin login Sign-in with three roles: Boss, Product Manager and Tester
Product management Create, read, update and delete products
Admin management Create, edit, delete and search admin accounts

Architecture

Browser
   │
   ▼
frontend/  Express server for static pages (port 3031)
   │        HTML + CSS + vanilla JavaScript (fetch)
   ▼
backend/   Express REST API (port 5000)
   │
   ▼
MySQL      lsdb database (6 tables)

REST API

Method Path Purpose
POST /search Search products
POST /api/product Create a product
PUT /api/product/:id Update a product
DELETE /api/product/:id Delete a product
GET /api/productdetail/:id Get product details
POST /login Admin login
GET /admis List admins
POST /searchAdmi Search admins
POST /admi Create an admin
PUT /admi/:id Update an admin
DELETE /admi/:id Delete an admin

Database

Six tables: product, report, adm_login, adm_information, address and country. The schema is in app/backend/lsdb.sql.

ER diagram

Run locally

Requires Node.js and MySQL 8.

git clone https://github.com/Codooooooo/Loopstation.git
cd Loopstation/app

# 1. Install dependencies
npm install
npm install --prefix backend
npm install --prefix frontend

# 2. Create the database
mysql -u root -p < backend/lsdb.sql

# 3. Configure the database connection
cp backend/.env.example backend/.env   # then fill in your MySQL credentials

# 4. Start the frontend and backend together
npm start

Then open http://localhost:3031.

Credits

  • Exchange rates: Fixer API
  • Font: Bebas Neue (Google Fonts)
  • Product images are from apple.com and are used for demonstration only. All rights belong to Apple.

About

Second-hand electronics marketplace for phones, tablets, and wearables, with product search, listing management, and currency conversion.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages