Welcome to Salon Management

Documentation for the Salon Management web application

About Salon Management

Salon Management is a full-stack application for salons and spas. It centralizes appointments, calendar views, point of sale (services and retail products), invoicing, inventory (products, purchase orders, suppliers), staff and availability, payroll, expenses, and reports—with role-based access for admins, receptionists, and staff.

The implementation uses a Node.js Express server with EJS views, a MySQL database via Sequelize (migrations and seeders), JWT authentication, i18next for localized UI strings, and optional scheduled demo data refresh for showcase environments.

  • Administrators can configure the salon, manage users and roles, view reports, and access all operational modules.
  • Receptionists can book appointments, serve customers at POS, and manage customer records.
  • Staff can view their appointments according to permissions; sensitive areas such as reports and payroll remain admin-focused.

Core Modules

  • Dashboard: Operational overview and key metrics.
  • Appointments: Booking with services, duration, and conflict avoidance.
  • Calendar: Daily, weekly, and monthly views with staff context.
  • Staff & availability: Profiles, working hours, blocked slots.
  • POS: Checkout with services and products; ties to invoices.
  • Invoices & payments: Billing, line items, and payment records.
  • Customers: Contact details, history, and relationship to appointments.
  • Services & categories: Catalog, pricing, and gender/type options.
  • Products & categories: Retail and internal-use inventory.
  • Suppliers & purchase orders: Procurement and payment tracking.
  • Product usage logs: Internal consumption tracking.
  • Expenses & categories: Operational cost tracking.
  • Payroll & commission: Periods, entries, and payouts.
  • Settings: Store, receipt, email (SMTP), and general preferences.
  • Audit logs: Record of important actions for accountability.

System Requirements

  • Node.js: Version 18 or higher recommended, with npm
  • MySQL: 8.0+ recommended; a user with rights to create the application database and run migrations
  • Git and a terminal (PowerShell, Bash, or zsh)
  • RAM: At least 4GB (8GB recommended when developing with browser dev tools and local MySQL)
  • Storage: Space for node_modules, the database, and uploaded assets (e.g. logos)
  • OS: Windows 10+, macOS 10.15+, or a current Linux distribution

UI & views

EJS templates + Express

Static assets under public

i18next multi-language UI

Backend

Express 4 HTTP API & routes

Sequelize ORM + mysql2

JWT auth, Joi validation

Data & files

MySQL schema via migrations

Seeders for roles, settings & demo data

Multer for uploads where configured

Operations

node-cron optional demo re-seed

Configurable via environment

Audit logging for key events

Quick Start Guide

  1. Install Node.js (LTS), MySQL, and Git if you do not already have them.
  2. Clone or copy this repository and open it in your editor.
  3. Create an empty MySQL database whose name matches DB_NAME in your server environment (see example below).
  4. Open the server folder and run npm install.
  5. Copy or create server/.env with database credentials, optional JWT settings, and port as needed.

Example server .env

NODE_ENV=development
PORT=3000

DB_HOST=127.0.0.1
DB_PORT=3306
DB_NAME=salon_management
DB_USER=root
DB_PASSWORD=your_password

JWT_SECRET=change_me_in_production
JWT_EXPIRES_IN=7d

# Optional: demo showcase — truncates data and re-runs seeders on a schedule
# DEMO_SEED_CRON_ENABLED=true
# DEMO_SEED_CRON_TZ=UTC
  1. From server, run npm run db:migrate to create tables.
  2. Run npm run db:seed to load default roles, permissions, settings, demo users, and sample business data.
  3. Start the application with npm run dev (nodemon) or npm start. By default the app listens on http://127.0.0.1:3000 (or your PORT).
  4. Open /auth/login in a browser (the home route redirects there). Sign in with a seeded account (see Demo credentials).

Demo credentials (after seeding)

These accounts are created or updated by the credential seeders. Use them only in non-production environments; change passwords for real deployments. All listed accounts use the same password: Admin@1234.

  • Admin: admin@salon.com
  • Receptionist: reception@salon.com
  • Staff: staff@salon.com, staff02@salon.com, staff03@salon.com

If DEMO_SEED_CRON_ENABLED=true, the server may periodically reset demo data; disable this for persistent installations.

Windows Setup

For Node, MySQL Installer, .env-example, and demo logins on Windows, open the Windows setup guide.

Install Node.js LTS from the official installer, MySQL (MySQL Installer or MySQL Server for Windows), and Git for Windows. Ensure the MySQL service is running and that the user and password in server/.env can connect and use your application database.

  • Use PowerShell or Git Bash from the repository root; all CLI steps below run inside server.
  • If port 3000 is in use, set a different PORT in .env or stop the conflicting process.
  • Windows Firewall may prompt the first time Node listens on the network; allow for local development if prompted.

Linux Setup

For a full walkthrough (Ubuntu/Debian, RHEL, Arch, MySQL, PM2), open the Linux setup guide.

Install Node.js (e.g. NodeSource LTS or your distribution’s packages), MySQL server, and Git. Create the database and grant your application user full rights on that database.

  • Run migrations and seeders from the server directory as described in Quick Start.
  • Bind address and firewall rules must allow your browser to reach PORT when testing remotely.

macOS Setup

For Homebrew, Node options (including NVM), MySQL, and PM2, open the macOS setup guide.

Install Node (official installer or nvm), MySQL (mysql.com DMG or Homebrew mysql), and Xcode Command Line Tools for Git.

  • Start MySQL (for example brew services start mysql if installed via Homebrew).
  • Follow the same migration and seed flow from the server folder, then npm run dev.

Server configuration

For production deployment, TLS, nginx/Apache, PM2, backups, and security, see the server configuration guide.

  • PORT: HTTP port comes from process.env.PORT or defaults to 3000.
  • Database: DB_HOST, DB_PORT, DB_NAME, DB_USER, and DB_PASSWORD override Sequelize config defaults.
  • JWT: Set JWT_SECRET in production; optional JWT_EXPIRES_IN controls token lifetime.
  • Demo cron: When enabled, periodically truncates data tables (except migration metadata) and re-runs seeders—intended for demos only.

Troubleshooting

For a longer list of symptoms and fixes (database, migrations, uploads, demo cron), see the troubleshooting guide.

  • Cannot connect to database: Confirm MySQL is running and that DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, and DB_NAME are correct. Ensure the database exists before migrating.
  • Login fails or 401 errors: Run seeders so demo users exist; verify JWT_SECRET is stable between restarts in development.
  • Migrations fail: Check MySQL version and user privileges; review migration error output for conflicting schema state.
  • Missing translations or wrong language: Confirm i18n resources are loaded and query parameters or cookies match your locale configuration.