/InCard

Frontend Assessment: A Next.js application featuring simple authentication using CSR & SSR

Primary LanguageTypeScript

Take-Home Assessment

Frontend NextJs app handeling authentication

Report Bug  ยท  Request Feature

Demo-Home Demo-Auth-Page

Introduction:


I was tasked with building a web application to manage basic authentication. To meet this requirement, I opted to use Next.js and TypeScript, ensuring support for both server-side and client-side rendering and strong typing.

Authentication and session management were implemented using NextAuth library, utilizing JWT tokens with a maximum age of 3 minutes, users can renew their tokens with a single click; however, if the time elapses, they will prompted to reauthenticate.

Notably, the application's UI matches that of InCard.

Note

For Authentication you can use the following for both username and password:

 incard

๐Ÿ”‘ Assessment Requirements:


REQUIRED FEATURES:
  • โœ” Includes at least two pages: login and home.

  • โœ” Ensures functionality (e.g., successful login redirects users to the home page).

  • โœ” Implements modern form validation.

  • โœ” Handles errors effectively (e.g., incorrect details entered or session expiry).

  • โœ” Fully responsive website.

  • โœ” Deployed version of the solution.


STRETCH FEATURES:
  • โœ” Supports both Server-Side Rendering (SSR) and Client-Side Rendering (CSR).

  • โœ” Maintains persistent session (login status retained on page reload).

  • โœ” Provides both protected & unprotected pages.

  • โœ” Automatically redirects to the login page upon session expiry.

  • โœ” Includes a suite of demo unit and integration tests.


BONUS FEATURES:
  • โœ” Mimics InCard authentication and home page styles.

  • โœ” Includes toast notifications for user-friendly feedback.

  • ๐Ÿ‘จโ€๐Ÿ’ป Includes a suite of demo end-to-end tests.


(back to top)