Available roles
The system defines four user roles:user-roles.enum.ts:1-6
Role overview
Client
Book appointments, view history, rate services, and manage profile
Specialist
Manage schedule, view client appointments, add diagnoses, and handle bookings
Admin
Full system access including user management and system configuration
User
Default role for general users with basic access
User base model
All users share a common base model:user-base.model.ts:3-17
Client role
Clients are users who book appointments and receive services.Client model
client.model.ts:3-7
Client capabilities
Book appointments
Book appointments
Clients can request new appointments by selecting a specialty, specialist, and preferred time slot.
View appointment history
View appointment history
Access to all past, current, and upcoming appointments with full details.
Cancel appointments
Cancel appointments
Cancel pending appointments with the option to provide a cancellation reason.
Rate services
Rate services
After completion, clients can rate appointments on a scale of 1-5 and leave comments.
Manage profile
Manage profile
Update personal information, profile picture, height, and weight.
Client dashboard access
Clients are redirected to/dashboard/client after login:
auth.facade.ts:188-190
Specialist role
Specialists provide services and manage their schedules.Specialist model
specialist.model.ts:3-8
Specialist capabilities
Manage appointments
Manage appointments
View all appointments, filter by status (pending, completed, canceled), and update appointment details.
Set availability
Set availability
Configure working hours and available time slots using preset schedules or custom availability.
Add diagnoses
Add diagnoses
Record diagnosis details and annotations for completed appointments.
View client history
View client history
Access completed appointment history for returning clients.
Cancel appointments
Cancel appointments
Cancel appointments with clients, providing a reason for cancellation.
Manage specialties
Manage specialties
Specialists can have multiple specialties (e.g., haircut, beard trim, coloring).
Specialist dashboard access
Specialists are redirected to/dashboard/specialist after login:
auth.facade.ts:191-193
Admin role
Administrators have full system access and management capabilities.Admin capabilities
- Manage all users (clients and specialists)
- View system-wide appointment data
- Configure specialties and services
- Access all dashboards and features
- Monitor system health and activity
Admin dashboard access
Admins currently use the specialist dashboard:auth.facade.ts:194-196
Admin users have access to specialist features plus additional administrative capabilities.
Route guards
BarberApp uses two types of guards to protect routes:Authentication guard
TheauthGuard ensures users are authenticated:
auth.guard.ts:5-21
Role guard
TheroleGuard restricts access based on user roles:
role.guard.ts:6-41
Using role guards
Apply role guards to routes that should only be accessible by specific roles:Registration with roles
During registration, users select their role (Client or Specialist):register-form.component.ts:62-63
register-form.component.ts:180-187
User status
In addition to roles, users have a status that determines if they can access the system:ACTIVE status can log in and use the system.
Next steps
Client Dashboard
Explore client-specific features and capabilities
Specialist Dashboard
Learn about specialist tools and workflows