Backend Setup Plan

This is the foundation that turns Mirror Masters Salon from a front-end website into a real salon operating system.

Login System

  • Client accounts
  • Staff accounts
  • Owner/Admin accounts
  • Password reset
  • Role-based access

Database

  • Save bookings permanently
  • Save client profiles
  • Track services and add-ons
  • Connect payments
  • Feed dashboards with real data

Payments

  • Deposits
  • Full payments
  • Tips
  • Refunds
  • Product checkout

Database Tables

TablePurposeMain Fields
usersLogin accounts for clients, staff, admins, and owner.id, name, email, phone, password_hash, role, created_at
clientsClient profile details.user_id, birthday, favorite_master, favorite_service, notes, rewards_points
staffMaster profiles and permissions.user_id, title, bio, specialties, profile_image, role_level, active
servicesMain services offered by each Master.id, staff_id, category, name, description, price, duration, active
addonsAdd-ons connected to services.id, staff_id, name, price, duration, active
appointmentsEvery booking made through the website.id, client_id, staff_id, service_id, date, time, status, total, deposit_paid
appointment_addonsAdd-ons selected for each appointment.appointment_id, addon_id
paymentsDeposits, balances, tips, refunds, and product sales.id, appointment_id, client_id, staff_id, amount, type, status, processor_id
productsShop products and merchandise.id, name, category, price, inventory, image, active
ordersProduct and merchandise orders.id, client_id, total, status, pickup_or_shipping, created_at
reviewsClient reviews after appointments.id, client_id, staff_id, rating, comment, created_at
rewardsRewards activity.id, client_id, points, reason, created_at

Access Rules

RoleAccess
Owner — Ty LeonardFull access to personal information, staff information, client information, entire shop revenue, reports, products, appointments, and settings.
Admin — Breunsha JonesFull access to personal information, staff information, client information, entire shop revenue, reports, products, appointments, and settings.
EmployeePersonal revenue, personal appointments, personal deposits, personal product sales, personal service breakdown, personal reports, personal alerts, entire shop appointments view, entire shop clients view.
ClientOwn profile, appointments, receipts, rewards, reviews, favorites, and booking history.

Recommended Tech Stack

Frontend

Current HTML/CSS/JavaScript can continue as the design foundation. Later we can move to React or Next.js if needed.

Backend

Node.js + Express or Supabase backend. Supabase is fastest because it includes database, login, and security rules.

Payments

Stripe or Square. Square may fit salon and product checkout well; Stripe is strong for custom web payments.

SQL Starter Blueprint

CREATE TABLE users ( id UUID PRIMARY KEY, name TEXT NOT NULL, email TEXT UNIQUE, phone TEXT, password_hash TEXT, role TEXT CHECK (role IN ('owner','admin','employee','client')), created_at TIMESTAMP DEFAULT NOW() ); CREATE TABLE staff ( id UUID PRIMARY KEY, user_id UUID REFERENCES users(id), title TEXT, bio TEXT, specialties TEXT, profile_image TEXT, active BOOLEAN DEFAULT TRUE ); CREATE TABLE services ( id UUID PRIMARY KEY, staff_id UUID REFERENCES staff(id), category TEXT, name TEXT NOT NULL, description TEXT, price DECIMAL(10,2), duration_minutes INT, active BOOLEAN DEFAULT TRUE ); CREATE TABLE appointments ( id UUID PRIMARY KEY, client_id UUID REFERENCES users(id), staff_id UUID REFERENCES staff(id), service_id UUID REFERENCES services(id), appointment_date DATE, appointment_time TIME, status TEXT DEFAULT 'pending', total DECIMAL(10,2), deposit_paid DECIMAL(10,2), created_at TIMESTAMP DEFAULT NOW() );

Build Order

StepWhat Gets Built
1Choose backend provider: Supabase, Firebase, custom Node.js, or WordPress/WooCommerce style backend.
2Create database tables for users, staff, services, add-ons, appointments, and payments.
3Connect client signup/login to My Mirror.
4Save real appointment bookings into the database.
5Feed Owner/Admin dashboard and Staff dashboard from real appointment data.
6Add payment processing and deposit rules.
7Add product store and inventory tracking.