Giter Site home page Giter Site logo

win-frontend's People

Contributors

blecorre avatar bobetbat avatar dave-ok avatar galeaf11 avatar kostysh avatar mfw78 avatar micwallace avatar mtahon avatar silksil avatar tomashq avatar valera-rozuvan avatar xdaluca avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

win-frontend's Issues

story: Booking Page

Description:
A page after apartment selection, that navigates user through booking process personal data, payments etc.

Requirements:

  • #12
  • #11
  • Stages:
    • personal info step
    • payment step
    • success step

story: improve web3 UX

Description:
Set of handlers and UI components that makes web3 UX easier and smoother.
Required:

  • other web3 wallet providers:
    • WalletConnect
    • ???
  • Network(chain) switch:
    • Gnosis: xDAI
    • Polygon: USDC, mEUR
    • zkSync: DAI, USDC, USDT
    • ???
  • Smooth wallet connection:
    • add network to metamask (if user did not set)
    • listen for networks and switch both wallet and Dapp if one of them changes
    • ???
  • transaction confirmation and loading as modal window
  • ???

Image fallback

Description:
Add a fall back for images that did not load successfully

Search results a list of cards with base facility info:

flowchart TD

	subgraph state[App state]
		searchResults
	end

	subgraph filters
		price[price asc/desc]
		amenities_filter[amenities]
	end
	
	subgraph results[Search results]
		offers_view[Foto, name, price]
	end
	
	state <--> useAppState
	useAppState --> filters
	useAppState <--> results
	
	filters_ui --> filters
	filters --> results

	subgraph offer_details[Offer details PAGE]
		details_view[Gallery, name, description, price, amenities]
	end

	results -.-> offer_details
  • searchResults state is persistent app state
  • when searchResults is changing filters must be recalculated
  • using filters_ui user can adjust search results data set
  • when the user selects a concrete offer he should be moved to a separate page
  • Facility name
  • Short facility description
  • Number of days
  • Title image of the facility
  • Total prices range
  • Book now button (see below)
  • amenties? as icons

Booking wizard

Booking wizard (component)

flowchart TD
	details[Offers details PAGE] -.-> config[Offer configuration]
	config --> person[Personal information]
	person --> overview[Booking overview]
	overview -.-> book[Book now]
	
	

A booking wizard is definitely a wizard that guides the user through the three steps

  • Offer configuration (content should be discussed)
  • Personal information form
  • Booking request overview

At every step, it should be possible to move back

At the last step, the user should be able to start a booking process from the Book now component

At every step, the UI must demonstrate to the user offer an expiration time counter. If a timer is exhausted, the booking must be cancelled and the user should be moved to the search page.

Options terms list

This is the list of terms that is similar to the general terms list but these terms are strongly related to the options listed above. For example:
Remove breakfast
About how to display terms please see: Options and terms logic

Search service logic and data flow

flowchart
	subgraph state[App state]
		searchResults
	end

	subgraph useSearchForm
		validator
		queryBuilder
		querySender
	end

	subgraph form[Search form]
		address
		dates[check-in/out dates]
		guests
		num[Num rooms]
	end

	subgraph server
		search_api
	end

	querySender --> useDispatch
	useDispatch <--> state
	form <--> useSearchForm

	search[Search start] -.-> querySender

	querySender -.-> search_api
  • Address/city
  • Check-in/out dates selector
  • Guests (adult/children)
  • Num rooms

The Search form component should allow the following configuration*:

  • default address/city
  • default dates range

*This configuration must be provided via app config

useSearchForm hook accepts all the form properties as arguments.

  • When any of the arguments are changed in the state they must be validated and the search query is prepared to be sent to the server
  • When search is started by the user the querySender sends a request to the server

story: facility page

Description:
User should be redirected to Facility Page after choosing search option either from list or pin on map. Could be interpreted as a modal.

Required:

  • Facility info:
    • name
    • address
    • contacts(email, phone, web)
    • amenities?
    • description
    • images
  • List with Space info card list including :
    • book button
    • name
    • description
    • images
    • price per night
    • total price
    • checkin/checkout dates
    • space type
    • amenities?
  • waku Bid/Ask (or Availability&Booking) implementation:
    • Listener(observer) and handler for bids
    • Sending ask messages after getting h3indexes (waku will reply with bids)
    • Choose bid and make booking

story: Footer

Requirements:

  • About: should be a link to a separate page with the following information:
    • Project description/ideology
    • (maybe) Video introduction
    • WindingTree info
    • Project roadmap
  • Security info: should be a link to a separate page with the following information:
    • Security policy
    • Smart contracts audit reports
    • Bugs bounty
  • Legal info: should be a link to a separate page with the following information:
    • Terms of service
    • ???
  • Contacts: should be a link to a separate page with the following information:
    • Reference to the DAO
    • Discord (support chat)
  • FAQ: should be a link to a separate page with the following information:
    • How to setup Metamask
    • How to transfer DAI to Gnosis chain
    • How to buy crypto
    • How to search for accommodation
    • How to book
    • How to check in
    • How to refund
    • Why my deal is refused
    • How to report issues
    • ???
    • What is Videre protocol
    • How to start own node
    • How to withdraw earner crypto
    • How to exchange crypto into fiat
    • ???
  • Links:Just set of pictos:
    • Discord
    • Twitter
    • Youtube
    • WindingTree
  • Developers:should be a link to a separate page with the following information:
    • Team overview
    • Technology references
    • Links to Videre docs
    • Possible use cases to work on
    • Contribution guide
    • Events

Crypto-payments component

As a user, I want to pay booking costs in stable coins (crypto) or native tokens.
I want to be able to select a proper network and choose an allowed token to pay.
I want to have the following possible payment options:

  • payment with a native token (actual for Gnosis Chain with xDAI)
  • payment with prior tokens approval
  • payment with permit (as an alternative to approval)

After successful payment, the component must call a callback with payment details.

The payment component must accept the following payment request object as an input parameter:

interface Payment {
  currency: AssetCurrency;
  value: BigNumber;
  expiration: number;
  providerId: string;
  serviceId: string;
}

Asset for a selected network must be filtered by the currency parameter. If the selected network does not contain proper assets for the user should be displayed a message: This network does not support payments in ${currency}

Main page NO header

Description:
Current implementation of map does not properly fit into a screen. Suggest to make header transparent, so it gives addition space for map

Options list

Options list is the list of the options that belong to the booking. For example:
Breakfast
Adult TV channels
SPA voucher
About how to display options please see: Options and terms logic

story: Search page

Description:
A main page with Map view, search filters and results.

Required:

  • Search filters (City/Address, Check-In/Out date selector, Adults, Children)
  • Advanced filters (Amenities selector)
  • #9
  • #10
  • Bid expiration indicator

Crypto-payments flow diagram

As a developer (front & back), I want to know the detailed payment process flow across all parties involved in the process.

The following information is required:

  • conditions of payment (all stages)
  • data models
  • sequence of payment flow process

story: my bookings page

Description:
A page with all users bookings list.

Required:

  • List with bookings (including):
    • Hotel name (link to facility)
    • Check In/Out dates
    • Number days
    • Total price
    • Status (declined/confirmed/refunded/checkedin/checkedout)
    • QR code generation
    • Check In (by client)
    • Terms list
    • #5
    • #4
  • windingtree/win-stays#134

Book now

Book now (components)

flowchart
	subgraph book[Book now]
		network[Network selector]
		asset[Asset selector]
		guaranteeIdQuery
		cryptoPayment
		bookingFinalization
	end

	subgraph server
		booking[Booking API]
	end

	contract[Smart contract]

	offer[offer price, currency] --> book
	metamask <--> network
	asset -.-> balance
	guaranteeIdQuery -- request guaranteeId --> booking
	booking -.- guaranteeId -.-> guaranteeIdQuery
	guaranteeIdQuery -- guaranteeId --> cryptoPayment

	start[Start payment] -.-> cryptoPayment

	cryptoPayment <-- asset and price, guaranteeId, value --> contract

	cryptoPayment --> bookingFinalization
	bookingFinalization --> booking
	booking -.-> bookingFinalization

The Book now component accepts offer price and currency as params.

Network selector allows the user to select desired blockchain network (list of allowed networks must be configured via app config). When a user selects a network from the list the app must send special request to the Metamask wallet that changes the currently selected network.

Each network has its own set of crypto assets allowed for payments. Assets must be configured via app config.

The smart contract has two functions.

  • calc makes a calculation of the selected asset value and accepts the following arguments:
    • asset (asset Id listed in the smart contract)
    • booking price (fiat price)
  • pay makes crypto payment. Accepts the following arguments:
    • asset (asset Id listed in the smart contract)
    • booking price (fiat price)
    • guaranteeId (Simard Pay, obtained through the booking API) OR offerID (???)
    • asset value
    • expiration time (sec) if during the transaction this time will be reached the transaction will be reverted

When the user selected the network the asset the component must send a calculation request using the calc function. After the calculation is obtained the UI must demonstrate to the user the required asset value.

  • If the balance of the asset in the user’s wallet is not enough in the UI must be generated warning message.
  • If the balance of the asset is enough for payment in the UI must be shown a button for starting payment.

The transaction expiration time must be calculated according to the following rule: transaction expiration time must be less than the offer expiration time. The difference between these times must be enough for the completion of the booking procedure via the Glider API.

When the payment transaction is mined the bookingFinalization helper must send a request to the booking API for making the booking via the Glider API.

When booking via the booking API is finished in exchange should be returned a booking ID. This Id should be demonstrated to the user and saved to the local storage into myBookings persistent property.

flowchart

	subgraph state[App state]
		myBookings
	end

	state <--> useAppState
	useAppState <--> bookingFinalization

light image carousel

Description:
Grommet native carousel is not meet our requirements, its too laggy.
Requirement:

  • Search for alternative options
  • Make own if non fits

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.