Code Monkey home page Code Monkey logo

booking-react's Introduction

booking-react

Summary

Introduction

A simple and intuitive React TypeScript app for a booking website. A booking is when a guest selects a start and end date and submits a reservation on a property.

The main objective of this project is to show some development skills through some technologies and concepts:

  • ReactJS
  • React Hooks
  • TypeScript
  • CSS-in-JS (styled-components)
  • Unity tests (Jest + React Testing Library)
  • Linters (eslint, style-lint, lint-staged)
  • Formatters (editorconfig, prettier)
  • git hooks (husky: pre-commit, prepare-commit-message)
  • conventional-commits (commitizen)
  • Scaffolding (scaffdog)
  • Environment config (.vscode/*, .npmrc)
  • Thematization
  • Usability
  • Responsivity
  • Clean Code
  • SOLID
  • KISS: “Keep It Simple, Stupid!”
  • YAGNI: “You Ain’t gonna need it”
  • DRY: “Do not Repeat Yourself”

Features and requirements

  • Create a booking
  • Read a booking
  • Update a booking
  • Delete a booking
  • Store the state from bookings in a global state store
  • Have some logic in place to prevent double (overlapping) bookings.
  • Validate the start and end dates for a booking.
  • The webpages should be fully responsive for desktop and mobile.

Bonus features and implementations

  • Friendly messages to show the user some success/error status.
  • High level of quality (strong eslint/typescript rules, scaffolding, separation of responsibilities, tests, pre-commit with type-check/linting/tests etc).
  • Create a lot of components through the styled-components with a well organized structure of files (instead of using third part libraries).
  • Unity tests in the component styles, behaviors, snapshots etc.
  • Global tests configuration that provides a simple and standardized way to render the components through the React Testing Renderer or through React Testing Library, with the theme provider already embedded.
  • Create a thematization structure that allows you to create how many themes that you want.
  • Create a customized theme interface with some structures implemented (borders, colors and typography).
  • Implements responsiveness to allow any screen size by using @media queries and the Grid Layout.
  • Usage of React Context, React Hooks.
  • Usage of Typescript generics, union type and interface manipulation and interesting Type utilities.

Data consumed

  • ...

Installation

  • Make sure that you have nodejs installed in you computer. Preference: node 16.16.0.
  • yarn install if you have the yarn installed globally or npx yarn install, if not.

Running

  • yarn start or npm start

Another scripts

  • Typescript type check: yarn type-check
  • Prettier formating: yarn format
  • Linting code: yarn lint
  • Build: yarn build
  • Tests: yarn test
  • Scaffolding: yarn g

Critique

  • It could be done this or that way...

booking-react's People

Contributors

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