Skip to content

A sample online store order form application. Made with React, TypeScript, Formik, SCSS

Notifications You must be signed in to change notification settings

cat-street/flatstack-orderform

Repository files navigation

React Order Form Task

A sample frontend project on React-TypeScript-SCSS

React Order Form Task

A sample order form application imitating the ordering process at an online store.


Usage

  • Installing dependencies:
npm install
  • Run in development mode:
npm start

Features

  • A multi-step ordering form
  • Uses fields and form validation
  • Each next step is available after previous step successful validation
  • Custom error messages appear on field blur or on submitting attempt
  • A custom country select input based on a list of countries with filtering capability
  • Prompts to detect a user location at loading
  • Fetches an address from an external API using detected coordinates (if detecting is allowed)
  • Fills a country, a city and a post code fields if address is detected
  • Formats entered card number and expiration date
  • Detects Visa cards
  • Allows to print a printer-optimized order summary at the final stage

Technology

  • React (functional components, hooks, Context, views/logic separation)
  • Formik + Yup validation
  • TypeScript
  • JavaScript (ES6)
  • SASS, CSS Modules
  • Adaptive layout, semantic HTML
  • BEM model
  • Geolocation API
  • LocationIQ API for address fetching
  • Airbnb-typescript ESLint codestyle

Possible improvements

  • Automated testing
  • Card system detection and validation
  • Card input formatting algorithm improvement
  • Using state manager for entered data
  • Using routes for form steps

About

A sample online store order form application. Made with React, TypeScript, Formik, SCSS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published