Installation
This guide will walk you through setting up the BMS Point-of-Sale System on your local machine. The installation process takes approximately 10-15 minutes.Prerequisites
Before you begin, ensure you have the following installed on your system:Required software
Node.js 18 or higher
.NET 8.0 SDK
PostgreSQL 13+ or Supabase account
Option A - Local PostgreSQL:
- Download from postgresql.org
- Create a database named
bms_pos
- Create a free account at supabase.com
- Create a new project
- Note your connection details from Project Settings → Database
Optional software
- Git - For cloning the repository and version control
- Code editor - VS Code, Visual Studio, or your preferred editor
- Barcode scanner - USB or Bluetooth barcode scanner for product scanning
Installation steps
Clone the repository
Clone the BMS POS repository to your local machine:
Replace the repository URL with your fork if you’re planning to contribute changes.
Install Node.js dependencies
Install all frontend and Electron dependencies:This installs the following key packages:
- Electron 37.3.0 - Desktop application framework
- React 19.1.1 - UI library
- Vite 7.1.4 - Build tool and dev server
- Tailwind CSS 4.1.12 - Styling framework
- TypeScript 5.9.2 - Type safety
Configure environment variables
Create a Edit the
.env file from the provided template:.env file with your database credentials:.env
Getting Supabase credentials
If you’re using Supabase:- Log in to your Supabase project
- Go to Project Settings → Database
- Copy the connection details:
- Host: Use the Pooler connection string for better performance
- User: Usually
postgres - Password: Your database password (set during project creation)
- Port:
5432 - Database:
postgres
Verify API configuration
The API connection string is configured in The
BMS_POS_API/appsettings.json:BMS_POS_API/appsettings.json
${VAR} placeholders are automatically replaced with values from your .env file.Run the development environment
Start all services with a single command:This script automatically:
- Starts the .NET API server on
http://localhost:5002 - Starts the Vite dev server on
http://localhost:3001 - Launches the Electron desktop application
- Applies database migrations
- Creates the default manager account
Post-installation
Initial setup
On first run, the system automatically:- Creates database tables - All required tables are created via Entity Framework migrations
- Enables real-time - Supabase real-time subscriptions are enabled for live updates
- Seeds default data - A default manager account is created:
- Employee ID:
0001 - PIN:
1234 - Role: Manager
- Employee ID:
First login
- Launch the application (if not already running)
- Enter Employee ID:
0001 - Enter PIN:
1234 - Select Role: Manager
- Click Sign In
Development workflow
Available npm scripts
Thepackage.json file defines several useful scripts:
API-only development
If you only need to run the backend API:http://localhost:5002/swagger
Directory structure
After installation, your project structure will look like this:Troubleshooting
Port already in use
If you see errors about ports 5002 or 3001 being in use:Database connection failed
If the API fails to connect to the database:- Verify credentials in your
.envfile - Check Supabase status - Ensure your project is running
- Test connection manually:
- Check logs for detailed error messages:
Migration errors
If database migrations fail:Electron won’t start
If the Electron application doesn’t launch:-
Check Vite dev server is running on port 3001:
-
Check API server is running on port 5002:
-
Run Electron manually with debug output:
Frontend connection issues
If the frontend can’t connect to the API:- Verify API URL in frontend configuration
-
Check CORS settings in
BMS_POS_API/Program.cs: -
Test API endpoint directly:
Next steps
Now that you have BMS POS installed and running, proceed to the quickstart guide to complete your first sale transaction.Quickstart guide
Complete your first sale in under 5 minutes
System architecture
Understand how all the components work together
API reference
Explore the REST API endpoints
Development guide
Learn how to extend and customize the system