System Requirements
Before installing Beils Dashboard, ensure your system meets these requirements:Minimum Requirements
Server Requirements
- OS: Linux (Ubuntu 20.04+), macOS 10.15+, or Windows 10+
- RAM: 2GB minimum, 4GB recommended
- Storage: 5GB free space
- CPU: 2 cores minimum
Software Requirements
- Node.js: v18.0.0 or higher (v20.x recommended)
- pnpm: v8.0.0 or higher
- MariaDB/MySQL: v10.6 or higher
- Git: v2.20 or higher
Prerequisites Installation
- Ubuntu/Debian
- macOS
- Windows
Verify installations by running:
node --version(should be v18+)pnpm --versionmysql --versionormariadb --versiongit --version
Development Installation
Install Dependencies
Install all required npm packages:This installs the following key dependencies:
Framework & Core
Framework & Core
[email protected]- Full-stack Vue framework[email protected]- Progressive JavaScript framework[email protected]- Official Vue router@pinia/[email protected]- State management
Database & ORM
Database & ORM
@prisma/[email protected]- Type-safe database client@prisma/[email protected]- MariaDB adapter[email protected]- Prisma CLI and schema toolsmariadb@^3.5.1- MariaDB connector
Authentication & Security
Authentication & Security
bcryptjs@^3.0.3- Password hashingjsonwebtoken@^9.0.3- JWT token generation/verification[email protected]- Schema validation
UI & Styling
UI & Styling
@tailwindcss/[email protected]- Tailwind CSS v4[email protected]- Utility-first CSS frameworkdaisyui@^5.5.19- Tailwind component library[email protected]- Icon library
Data Fetching & State
Data Fetching & State
@tanstack/[email protected]- Powerful data synchronization[email protected]- Vue state management
Additional Features
Additional Features
[email protected]- Internationalizationecharts@^6.0.0- Data visualization chartsvue-echarts@^8.0.1- Vue wrapper for EChartshtml2pdf.js@^0.14.0- PDF generation[email protected]- Scroll animations
Prisma Setup
Initialize Prisma and generate the client:The Prisma schema is located at
prisma/schema.prisma and includes:- User management with roles (ADMIN, USER)
- Client CRM (consents, questionnaires, revokes)
- Product catalog (brands, categories, subcategories, tags)
- Services and packs
- Marketing tools (coupons, bonuses, gift cards)
- Point of sale (carts, cart items, debts)
- Appointment booking system
Database Migration
Apply the schema to your database:This creates all tables, indexes, foreign keys, and constraints defined in the schema.
Migration name will be “init” by default. The migration files are stored in
prisma/migrations/.Database Seeding
Populate the database with initial data:The seed script (
seeds/seed-db.ts) creates:Users (25 total)- 1 Admin:
[email protected]/password123 - 2 Staff members (ADMIN role)
- 22 Clients (USER role)
- Masglo
- Bioline Jato
- 0-3 consent forms per client
- 0-2 questionnaires per client
- 0-5 bookings per client (past and future)
Start Development Server
Launch the application:The server will start at
http://localhost:3000 with:- Hot module replacement (HMR)
- TypeScript type checking
- Automatic compilation
- API routes at
/api/*
- Email:
[email protected] - Password:
password123
Production Installation
Build the Application
Create an optimized production build:This generates:
- Minified JavaScript bundles
- Optimized CSS
- Pre-rendered pages
- Server-side code in
.output/
Deployment Options
Option 1: Traditional Server (VPS/Dedicated)
Option 2: Docker Deployment
Create aDockerfile:
docker-compose.yml:
Option 3: Platform-as-a-Service
- Vercel
- Netlify
- Railway
Ensure your database is accessible from Vercel’s infrastructure (may require whitelisting IPs or using managed database).
Database Management
Prisma Commands
| Command | Description |
|---|---|
pnpm prisma:generate | Generate Prisma Client |
pnpm prisma:migrate | Create and apply migrations |
pnpm prisma:pull | Pull schema from existing database |
pnpm prisma:reset | Reset database (delete all data) |
pnpx prisma studio | Open Prisma Studio (database GUI) |
Backup and Restore
Backup database:SSL/TLS Configuration
For production, always use HTTPS:Performance Optimization
Database Optimization
Application Optimization
Monitoring and Logs
Application Logs
Database Logs
Troubleshooting
Build fails with Prisma errors
Build fails with Prisma errors
Database connection timeout
Database connection timeout
- Check firewall rules allow port 3306
- Verify database host is reachable:
ping your-db-host - Increase connection timeout in
prisma.config.ts - Check database user permissions
Port already in use
Port already in use
JWT token errors
JWT token errors
- Ensure JWT_SECRET is set in .env
- Verify token hasn’t expired (24h default)
- Check for special characters in secret that need escaping
- Clear browser cookies/localStorage and re-login
Memory issues in production
Memory issues in production
Security Checklist
Environment Variables
- Use strong JWT_SECRET (64+ characters)
- Never commit .env to version control
- Use different credentials for dev/prod
- Rotate secrets periodically
Database Security
- Use strong database passwords
- Limit database user privileges
- Enable SSL for database connections
- Regular backups and backup testing
Application Security
- Enable HTTPS with valid SSL certificate
- Keep dependencies updated:
pnpm update - Configure CORS properly
- Implement rate limiting on API routes
- Regular security audits:
pnpm audit
Next Steps
API Reference
Explore the complete API documentation
Administration
Learn how to configure and manage your Beils Dashboard