This is a Next.js project bootstrapped with create-next-app
.
Access the webpage for user-management-application here.
I made some dummy data to understand this. Here are some loginInfo for dummy logins: ( Note: You cannot change password or register with this data, because mails are not real, so one won't be able to successfully verify. )
admin
:
- Email:
[email protected]
- Password:
tenet
- Organization:
admin.org
manager
:
- Email:
[email protected]
- Password:
tenet
- Organization:
ABC Inc.
user
:
- Email:
[email protected]
- Password:
tenet
- Organization:
ABC Inc.
- LoginPage: It asks for
Email
,Password
andOrganization
details for login. You can onlylogin
afterregistration
andemail verification
. - RegisterPage: It asks for
Full Name
,Email
,Password
andOrganization
details for registering. Youcannot register if you are verified with this email with this organization
. You canregister with same email but for another organization
but again verifying your email. - ResetPage: It asks for
Email
andOrganization
details forpassword-reset
. Will send a mail with a link for resetting the password.
- Dashboard: The user dashboard shows information about the current logged in user's
Name
,Email
,Organization
andPermission
(which is given by role) - There are two buttons on the dashboard:
- Fetch Data: This button fetches the data of all members present in the database ( however, it somehow depends on the user role ).
- Log Out: Moves out of the session and sign out the user.
- Roles are of 3 types:
admin
2)manager
3)user
(by default every new user added in database is givenuser
role)admin
: I limit theadmin
to only be one user, who can maintain positions, roles and even delete any data from the database. This role has no scope of boundaries.manager
: This role is given to the head of a single organization ( like moderators, given to zero or many users ). The user can only fetch list of data from his organization.user
: This is the default role given to every new user, which can be changed by manager and admin.- Both
user
can fetch data of their organization, but admin has no limit of scope.
I used Vercel to deploy the Nextjs application. Check out our Next.js deployment documentation for more details.