User Registration¶
Create your GreenCop account to start monitoring environmental conditions.
Registration Process¶
Step 1: Access Registration Page¶
- Open GreenCop in your web browser
- If not logged in, you'll see the login page
- Click "Don't have an account? Register" link below the login form
Step 2: Fill Registration Form¶
Required fields:
Email Address:
- Valid email format required
- Used for login and account recovery (future)
- Example: yourname@example.com
Username:
- 6-12 characters
- Letters and numbers allowed
- Must be unique
- Example: admin123
Password:
- Minimum 8 characters
- Must contain:
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- Example: MySecurePass123
Step 3: Submit Registration¶
- Review your information
- Click Register button
- Wait for confirmation (1-2 seconds)
- Automatically redirected to login page
Step 4: Login¶
- Enter your email and password
- Click Login
- Receive JWT token (stored automatically)
- Redirected to dashboard
Validation Rules¶
Username Validation¶
- ✅ Valid:
admin123,user01,sensor_admin - ❌ Invalid:
abc(too short),verylongusername(too long),user!@#(special chars)
Password Validation¶
- ✅ Valid:
Password123,MySecure1,Admin2024 - ❌ Invalid:
password(no number),PASSWORD123(no lowercase),Pass1(too short)
Email Validation¶
- ✅ Valid:
user@example.com,admin.user@company.org - ❌ Invalid:
notanemail,@example.com,user@
After Registration¶
First Steps¶
- Create Server Rooms: Organize your monitoring locations
- Register Sensors: Add ESP32 sensors to rooms
- Configure Alerts: Set temperature/humidity thresholds
- Explore Dashboard: View real-time data
Account Details¶
Your account includes: - Unique customer ID (auto-generated) - Secure password hash (bcrypt) - JWT authentication tokens - Unlimited rooms and sensors
Security¶
Password Storage¶
- Passwords hashed with bcrypt
- Salt automatically added
- Never stored in plain text
- Cannot be retrieved (only reset)
JWT Tokens¶
- 30-minute expiration
- HS256 algorithm
- Stored in browser localStorage
- Automatically included in API requests
Troubleshooting¶
"Email already exists"¶
Cause: Email is already registered
Solution: - Use different email address - Or login with existing account - Password reset (future feature)
"Username already exists"¶
Cause: Username is taken
Solution: Choose a different username
Validation Errors¶
Symptoms: Red error messages
Solutions: - Check username length (6-12 chars) - Ensure password meets requirements - Verify email format - Review all error messages
Registration Button Disabled¶
Cause: Form validation failing
Solution: Ensure all fields are filled and valid
API Details¶
Endpoint: POST /api/v1/customers/register
Request Body:
Response (Success):
Response (Error):