User Roles
The app supports two primary user roles, each with distinct permissions and capabilities:Sales Manager
Full team oversight with inventory management, team analytics, and communication tools
Salesperson
Personal dashboard with inventory tracking, sales logging, and performance metrics
Registration Flow
Manager Registration
Sales Managers can create an account with the following information:Access Registration
From the login screen, tap “Sign up as a Manager” to navigate to the manager registration form.The
SignUpSalesManager activity handles the registration process at Registration/SignUpSalesManager.java:37.Complete Required Fields
Enter all required information:
- Full Name
- Email Address
- Mobile Number (validated format)
- Organization Name
- Password (minimum 6 characters)
All fields are validated before submission. Email and phone numbers must be in valid formats.
Firebase Authentication
The app creates your account in Firebase Authentication and stores your profile in the Firebase Realtime Database:Source:
SignUpSalesManager.java:141-145Salesperson Registration
Salespersons register by connecting to an existing Sales Manager:Access Registration
From the login screen, tap “Sign up as a Salesperson” to open the salesperson registration form.
Enter Details and Manager Name
Complete all required fields including:
- Full Name
- Email Address
- Mobile Number
- Manager Name (must match an existing manager)
- Password
Inventory Initialization
When you join a team, the manager’s inventory items are automatically copied to your account:Source:
SignUpSalesperson.java:223-224Login Flow
Accessing Your Account
Enter Credentials
On the main login screen (
MainActivity), enter:- Email address
- Password
- Select your role (Manager or Salesperson) using the radio button
Role Verification
The system verifies your email matches the selected role:Source:
MainActivity.java:142-174If you select the wrong role, you’ll see an error: “This email is not registered as [role]!”
Auto-Login
The app remembers your login state:MainActivity.java:57-72
Password Recovery
Forgot your password? The app includes a password reset feature:Request Reset
Tap the “Forgot Password” button. The system sends a password reset email:Source:
MainActivity.java:228-240Profile Management
Both Managers and Salespersons can view and update their profile information through the “My Account” section in the navigation drawer.Viewing Your Profile
Access your profile by:- Opening the navigation drawer (tap the hamburger menu)
- Selecting “My Account”
- The
AccountManageractivity displays your profile information
Data Model
Sales Manager Profile:Security Features
Password Security
Password Security
- Minimum 6 characters required
- Stored securely in Firebase Authentication
- Password reset available via email
Email Validation
Email Validation
The app validates email format using Android’s Patterns utility:
Phone Validation
Phone Validation
Mobile numbers are validated to ensure proper format:
Session Management
Session Management
User sessions are managed using SharedPreferences with user ID and role stored locally. Sessions persist until explicit logout.
Role-Based Access
Role-Based Access
Each role has access to different features:
- Managers: Team management, global inventory control, analytics
- Salespersons: Personal inventory, sales tracking, leaderboard
Common Issues
Registration fails with 'Manager does not exist'
Registration fails with 'Manager does not exist'
When registering as a Salesperson, ensure you enter the exact name of your manager as they registered. Names are case-sensitive and must match exactly.
Login fails with 'Email not registered as [role]'
Login fails with 'Email not registered as [role]'
Verify you’ve selected the correct role (Manager or Salesperson) that matches how you originally registered.
Password too short error
Password too short error
Passwords must be at least 6 characters long. Use a combination of letters, numbers, and symbols for better security.
Already registered email
Already registered email
Each email can only be used once in the system. Use a different email address or reset your password if you’ve forgotten it.
Best Practices
For Managers
- Share your exact registered name with your team
- Use a professional email address
- Keep your organization name consistent
For Salespersons
- Verify manager name spelling before submitting
- Use a unique email address
- Contact your manager if registration fails