Skip to content

grigio/status-components-sandbox

Repository files navigation

Status Components

Just work on your React Native / React Native Web on packages/status-components

Usage:

yarn
cd packages/status-components
yarn storybook        # web (react-native-web)
yarn storybook:mobile # native (react-native via expo)

NOTES

  1. Currently Storybook 5 do not play with React Native (Storybook 4 works)
  2. Kiwi/Margarita is a big boilerplate but it actually works, there are many parts and helpers that depend on each others.
Margarita

Margarita

Showcasing the power of Tequila

This project is a living example of a client app you could start building with Tequila.

Search Results Bookings

Installing / Getting started

To get started, clone the repository, change directory and install the dependencies:

git clone https://github.com/kiwicom/margarita
cd margarita/
yarn

To launch the GraphQL server:

  • yarn server

To launch the client app, you have different options:

  • yarn web to launch the development web version;
  • yarn export; yarn build; yarn start to launch the production web version;
  • yarn mobile to start the mobile version.

Note: If yarn server is running and you get Network errors on Android, you need to forward your localhost:4000 to the emulator; this is achieved by running adb reverse tcp:4000 tcp:4000.

The other available scripts are:

  • yarn web:analyze to get an analysis of the bundle size to get the following yarn-analyze
  • yarn dev to run concurrently yarn server and yarn web;
  • yarn lint to ensure your code is properly formatted;
  • yarn flow to ensure your code is respecting the types given to your vaiables;
  • yarn test to run the test suites;
  • yarn test-ci to ensure your code should pass the Continuous Integration (CI) tests;
  • yarn relay to get the latest schema of the graphql server and compile your queries and fragments to generate Flow types, among other things;
  • yarn landing-page to run the landing page of the app;
  • yarn docs to run the documentation website, available at http://localhost:1337;
  • yarn voyager to run the Voyager (represents the GraphQL types as an interactive graph), available at http://localhost:3002;
  • storybook:web:margarita-components to run the web version of the Storybook for @kiwicom/margarita-components, available at http://localhost:9009;
  • storybook:mobile:margarita-components to run the mobile version of the Storybook for @kiwicom/margarita-components, available at http://localhost:7007 for the web UI controlling the Storybook Expo application;
  • storybook:web:universal-components to run the web version of the Storybook for @kiwicom/universal-components, available at http://localhost:9009;
  • storybook:mobile:universal-components to run the mobile version of the Storybook for @kiwicom/universal-components, available at http://localhost:7007 for the web UI controlling the Storybook Expo application.

Initial Configuration

  1. Copy and rename following sample files:

    • .env-sample → .env
    • apps/graphql/.env-sample → apps/graphql/.env
  2. Set environment variables in files:

    .env:

    • GRAPHQL_URL
      • URL of GraphQL server
      • E. g.: 'http://127.0.0.1:4000'

    apps/graphql/.env:

    • API_KEY
    • BASE_URL
      • URL of REST server
      • E. g.: 'https://kiwicom-test.apigee.net/'
    • NODE_ENV
      • Type of NodeJS environment.
      • E. g.: 'development'

Developing

Considerations

This project follows react-native-web's philosophy of "Write Once, Render Anywhere". The web version is powered by Next.js and the mobile version is powered by Expo.

@TODO

Building

@TODO

Deploying / Publishing

CAVEAT: This is a demo app.

@TODO

Features

What's all the bells and whistles this project can perform?

  • Users can search and book flights; (@TODO)
  • Users can manage their bookings; (@TODO)

Configuration

Here you should write what are all of the configurations a user can enter when using the project.

@TODO

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

NOTE: Note this is only meant as an example app and even though we take pride in the quality of our work, features should not be assumed to be production-ready.

To ensure code quality, make sure to run yarn test-ci and fix the potential errors before pushing your code. See above for a description of what it does.

Links

Here are a few links that could be helpful:

Licensing

The code in this project is licensed under MIT license. By contributing to Margarita, you agree that your contributions will be licensed under its MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published