Giter VIP home page Giter VIP logo

lendsqr-fe-test's Introduction

Project Description

This is a front-end assignment where you are required to build 4 pages - Login, Dashboard, User page, and User details page. The design for these pages can be found at this Figma link. The user pages will pull data from a mock API with 500 records. You will also need to use local storage or indexedDB to store and retrieve user details on the user details page. The page must be mobile responsive.

Tech Stack

The following tech stack is required for this project:

  • Next.js as the UI framework
  • TypeScript as the language of choice
  • SCSS for style processing

Some other technologies that were used are as follows:

  • JSON Web Token (JWT) for authentication
  • Axios for making HTTP requests
  • React Query for managing data fetching and caching
  • Storybook for developing UI components in isolation
  • Cypress for end-to-end testing of the application

Getting Started

To get started with the project, you will need to do the following:

  1. Clone the repository to your local machine
  2. Install dependencies by running pnpm install
  3. Run the development server by running pnpm run dev
  4. Visit http://localhost:3000 in your browser to view the application

You will be redirected to the login page. The login page has authentication implemtented using JWT. To enter the app, you have two options.

  1. When running locally, you can have ADMIN_EMAIL, ADMIN_PASSWORD set in your env file and those will be used.
  2. Use the default values
email='[email protected]'
password='password1234'

Usage

The Login page is the starting point for the application.
If you already logged in before(by checking the token in your local storage),
visiting the app base route will take you to the dashboard page,
otherwise you will be redirected to the login page.

From there, you can click on users and go to the users route.
All the users are cached in indexedDb, and the cache is invalidated every 1 minute.
Clicking on a user/using the action button will take you to the User details page.
The user details will also be stored indexedDB in a separate collection, and invalidated every 1 minute.

Structure of the app

In the src folder, you will find

Additional Information

The choice of Nextjs as a React framework was used given the nature of the app, it could greatly benefit with search engine optimization from the server-side rendering feature which Next js provides out of the box.

lendsqr-fe-test's People

Contributors

illegalcall avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.