User Profile
OneDay.Build provides you with a complete set of source code for User Profiles. It includes user registration/login, password recovery, and personal information modification, among other features.
This part of the functionality is crucial because every platform that requires user registration needs these features, and developing these essential platform features can be tedious and mandatory.
This project uses Next-Auth, Database, and Mail functionality. Additionally, a form built with shadcn/ui is provided on the user information modification page, and you don't need to remove it.
User Registration/Login
In the One Day.Build source files, you can find /app/[locale]/(site)/(auth)/login
and /app/[locale]/(site)/(auth)/register
addresses, which contain the source code for login and registration, respectively. The final display will look like this:
The left section is a video that you can replace with your brand promotional content. The layout file is located at /app/[locale]/(site)/(auth)/layout.js
.
Forgot Password
The process for users to reset their passwords is also a tedious but necessary feature. Therefore, we have provided you with a complete password reset flow, including entering the registered email address, sending a verification code (via email), entering the verification code, setting a new password, and successful modification.
The relevant files can be found in /app/[locale]/(site)/(auth)/change
. The pages are switched using the page state, and their content is located in the files starting with Change under the /components
directory.
-
ChangeIndex.jsx is the page where users enter their email address. It generates an OTP verification code and sends it to the email address.
-
ChangeOTP.jsx is the page where users enter the verification code.
-
ChangeReset.jsx is the page where users enter a new password.
-
ChangeReset-Success.jsx is the page displayed when the password has been successfully changed.
User Settings
After logging in, users can click on their avatar to access the profile settings page.
The profile settings page is located at /app/[locale]/(dashboard)/(route)/setting/[id]/
, where you can modify the user profile interface.
The form control styles are displayed under /app/[locale]/(dashboard)/(route)/UI
, and the controls are based on shadcn/ui.
To extend user profiles, find /prisma/schema.prisma
and add modifications under the model User. Then, update the database.
The submission address for user profiles is /api/user/
, where you can modify additional event handling.