Coder Social home page Coder Social logo

my-stable-wallet's Introduction

This is a short technical assessment exercise developed in ~6 hours with complete setup of NextJS application, creation of client components, layout and routing. Below I will explain some technical decisions and next steps to be done if we would like to implement a full production ready product.

Keep in mind that UI is very simplified, but it is able to demo some of UI variations accordingly to stubbed data.

The main goal of my implementation is to demonstrate:

  • Enterprise-level project structure
  • Definition of data models
  • Separation of components & dry techniques
  • Attention to number formatting (presentation)
  • Usage of React hooks

Technical decisions

Functionalities

  • Validate input number
  • Validate address length
  • Show intermediate (fee) calculation
  • Show transactions of different types reflected on UI ()
  • Copy receive address to clipboard

With assumption that most difficult logic is around currency input validation I levereged usage of parsing function that considers grouping separator and decimal cases precision. However, for real case I would look to implement much complex logic for Currency input which would format user input on blur accordingly to currency precision.

You can check a similar example implemented in React Native here: CurrencyConverterExercise, with complex multi-regional number formatting and user input parsing.

Things For Future

Business logic wise for this context: more advanced input components. Technically wise: I would definitely extract some of the hooks logic into functions and cover them with unit tests. Also review rendering cycles to look for potential caching improvement with more usage of useMemo, useCallback hooks.

Using tailwind.css is great and fast to do, but for more scalable case I would evaluate usage of component library and potentially shift for css-in-js.

Responsive: since UI was free to define I made a simple approach where simple stacking is enough, but for real production app I would explore complex UIs for Desktop with more data and simple UIs for mobile with less. This would potentially result into creation of separate components by platform to avoid complex unmaintainable codebases.

Preview

Main screen Main screen

Setup & Run

First, run the development server:

npm install
npm run dev 

Exercise

Frontend Developer Task: Stablecoin Wallet Overview

Objective:

  • Create a simplified stablecoin wallet overview page using Next.js and TypeScript, demonstrating basic functionalities and clean coding practices.

Requirements:

  • Wallet Overview Page: Display the user's stablecoin balance, recent transactions (mocked data), and a simple form to simulate sending stablecoins to another address.
  • Mock Data Integration: Use static JSON to mock user data and transactions. No need for real-time updates or external APIs.
  • Responsive Layout: Ensure the page is responsive and usable on both desktop and mobile devices using CSS Grid or Flexbox.
  • Basic State Management:Manage the application state (e.g., form input state) using React hooks without external state management libraries.

Submission Guidelines:

  • Provide a GitHub repository with clear README on setup instructions.
  • Emphasize code readability, component structure, and use of TypeScript.

my-stable-wallet's People

Contributors

mkmule 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.