-
Completed Tasks
- Set up the backend using the Node.js framework (Hapi.js).
- Completed API implementation for the following:
- API to search for tutors, with filter options for subject, price, school, curriculum, and tutor (supports partial string matching).
- API to fetch tutor profile details.
- API to request a tutor.
- Set up the frontend with Next.js, Tailwind CSS, and Shadcn.
- Integrated the APIs with the frontend.
- Implemented the following components:
- Search user interface:
- Tutor card
- Filters
- Pagination
- Mobile Responsive
- Profile interface:
- Tutor information
- Contact section
- Mobile Responsive
- Search user interface:
-
Pending
-
None, as per the assignment requirements.
-
The authentication flow is not implemented, so I will explain how it would work:
- When a user signs up, a JWT token will be generated on the server.
- This token will contain the necessary information to authenticate the user.
- After a successful signup, the JWT token is sent to the client.
- The user will use this token to request a resource, and it will be included in the header of each request.
- When a request is made, the server will first check if the user has a valid token and the required access.
- A middleware will be created to validate the token before processing the request.
- If the token is valid, the user will be granted access to the resource; otherwise, an unauthorized error will be thrown.
- Along with the access token, a refresh token will also be issued during signup or login.
- The access token has a short expiration time (e.g., 15 minutes) to enhance security, while the refresh token has a longer expiration (e.g., 7 days).
- When the access token expires, the client will send a request to the server with the refresh token to obtain a new access token.
- The server will verify the refresh token's validity.
- If the refresh token is valid, a new access token is issued and sent to the client.
- This process ensures that users don’t have to log in frequently, while maintaining security by keeping the access token short-lived.
- If the refresh token is invalid or expired, the user will be required to log in again.
-
- Setting up a monorepo and configuring it took more time than expected.
- Writing a search query to include all possible filters was a bit tricky but manageable.
- On the frontend, deciding the UI design and implementing the functionality was time-consuming but not overly challenging.
- Profile Views
- Profile views will provide tutors with insights into how appealing their profile is.
- It will also offer insights into the type of users interested in their profile, allowing tutors to target specific users.
- Introductory Video on Tutor Profiles
- An introductory video will help potential clients understand the tutor better.
- Descriptive Public Reviews
- Reviews will enable users to make informed decisions before hiring a tutor.
- Live Chat for Inquiries