GithubHelp home page GithubHelp logo

acumulus8 / tinyhouse-client Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.51 MB

AirBnB clone. Client code. Built in conjunction with the masterclass from NewLine

Home Page: https://tiny-house-app.com/

HTML 2.18% TypeScript 83.12% CSS 14.70%
antdesign google-location-api google-people-api graphql graphql-client react stripe-payments typescript

tinyhouse-client's Introduction

TinyHouse - Client-Side Code

A fullstack React GraphQL TypeScript Airbnb Clone.

  • View the live project here.
  • View the API code and documentation here.

Overview

The client-side code is bootstrapped with create-react-app-typescript and uses the following technologies:

  • React
  • TypeScript
  • GraphQL
  • Apollo Client
  • Ant Design

Types, queries, and mutations are defined in the server-side code and are automatically generated client-side using the graphql-codegen library.

Features

Users can view available listings, search by location, and book a listing for a fee.

Users can login with Google and create their own listings to be booked by other users. Booking transactions and payments are handled by Stripe.

Authentication is handled by passing a randomly generated token and cookie between the client and server. This process determines the viewer and what protected content they are able to access. A session is maintained for the lifetime of the cookie and token, and terminated upon logging out. Learn more about authentication at the server-side documentation here.

The app is fully responsive and works on all screen sizes.

Code Structure

├── src
│   ├── lib             # library of functonality and components
│   	├── components  # The smallest reusable bytes of UI
│   	├── graphql     # All generated types and queries/mutations
│   	├── hooks       # custom hooks
│   	├── utils       # Global utility functions
│   ├── sections        # The large, single-use portions of UI and app routes
│   ├── styles          # Global styles and assets
└──...

The Router is simple, along with the supporting markup and folder structure. All assets are scoped locally to their respective components. The only global styles are in the styles folder, which contains predefined CSS global styles. The viewer object lives at the highest level and is the only piece of global state. It is used to determine if the user is logged in and authorized to view certain pieces of information.

The hooks folder currently holds the ScrollToTop hook, but any additional reusable functionality would be stored here. The utils folder holds global functions that are used throughout the app, such as formatListingPrice and displayErrorMessage.


License

This project is licensed under the MIT License.




tinyhouse-client's People

Contributors

acumulus8 avatar

Stargazers

 avatar

Watchers

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