Task #140
openGuest Frontend – Enterprise Self Registration & Login
0%
Description
MODULE: Guest Frontend – Enterprise Self Registration & Login
Navigation: Public URL → Login / Register
🎯 TASK OBJECTIVE
Develop a public guest login system where:
User can login using username & password
If no account → register enterprise
After registration:
System auto-generates username
System auto-generates password
Email sent to registered email
User logs in → redirected to Home page
FRONTEND IMPLEMENTATION
-
Login Page UI
Public page (no authentication required).
Fields:
Username
Password
Login Button
Below Login button:
Doesn’t have an account? Register here!
(Register here → navigates to registration page) -
Registration Page UI
Fields required:
Name (Enterprise Name)
Mobile
Email
Address
Register Button -
After Registration (Frontend Flow)
On successful registration:
Show message:
Registration successful.
Login credentials have been sent to your email.
Redirect to Login page.
DATABASE CHANGES
We need changes in:
enterprise_master
users_login
enterprise_master (Should update during Registration)
id (PK)
enterprise_name
mobile
address
created_date
users_login(It should also create during registration)
id PK
password (hashed)
last_login (datetime)
is_superuser tinyint
username varchar(150)
first_name varchar(150)
last_name varchar(150)
email varchar(254)
is_staff tinyint(1)
is_active tinyint(1)
date_joined datetime(6)
enterprise_id (FK)
Backend Processing Steps:
Create new record in enterprise_master
Get enterprise_id (auto increment ID)
🔹 Generate Username
Format:
registration_name@enterprise_id
Example:
happy_pets@1
(Convert name to lowercase, remove spaces and replace underscore)
🔹 Generate Password
Format:
DDMMYYYYHHMMSS
Example:
17022025153045
(Use current date + time)
🔹 Insert into users table
enterprise_id
username
hashed password
is_active = TRUE
Send Email¶
Email should contain:
Subject:
Welcome to VETSLAB
Body:
Your enterprise has been registered successfully.
Enterprise Name: "Enterprice_name"
Username: enterprice_name@1
Password: DDMMYYYYHHMMSS
Login Here:
https://yourdomain.com/login
Thank you.
Validate:
Username exists
Password correct
is_active = True
VALIDATIONS REQUIRED
Registration:
✔ Email must be unique
✔ Mobile must be unique
✔ Name required
✔ Email format validation
✔ Password must be hashed
FLOW SUMMARY:
User opens website
Click Register
Fill form
System creates enterprise
System generates credentials
Email sent
User logs in
Redirect to Home