All Projects → react-cross-platform → react-shop

react-cross-platform / react-shop

Licence: other
Shop example for mobile web

Programming Languages

typescript
32286 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-shop

edgestack
[UNMAINTAINED] A Universal React Stack with deeply integrated localization Support, semi-automatic route-based code splitting, Hot Module Reloading (HMR), Redux, Apollo GraphQL and more...
Stars: ✭ 77 (+285%)
Mutual labels:  apollo-client, css-modules
nextjs-graphql-adminpanel
Admin panel built with NextJS(Typescript), Material UI, Apollo Client & GraphQL. In the backend, Prisma 2 with Nexus and Mysql is used.
Stars: ✭ 119 (+495%)
Mutual labels:  apollo-client
dribbble-clone
FullStack GraphQL Dribbble Clone 🏀
Stars: ✭ 29 (+45%)
Mutual labels:  apollo-client
vue-shop-cli
vue搭建的电商平台脚手架 (vue + vue-router + vuex + sass + svg)
Stars: ✭ 24 (+20%)
Mutual labels:  shop
babel-plugin-flow-relay-query
Babel plugin which converts Flow types into Relay fragments
Stars: ✭ 38 (+90%)
Mutual labels:  apollo-client
UmaSupporter.WebClient
🏃🏽‍♀️ 우마무스메 육성 도우미 '우마서포터'의 프론트엔드 애플리케이션입니다.
Stars: ✭ 14 (-30%)
Mutual labels:  apollo-client
apollo-link-logger
A logger for Apollo Link that resembles redux-logger
Stars: ✭ 161 (+705%)
Mutual labels:  apollo-client
apollo-component
A render component for easy querying and mutating of your GraphQL API.
Stars: ✭ 14 (-30%)
Mutual labels:  apollo-client
apollo-typescript-example
Apollo Client 2.0 + TypeScript example
Stars: ✭ 17 (-15%)
Mutual labels:  apollo-client
apollo-local-query
Simpler server rendering with apollo-client 1.x, using a local GraphQL networkInterface
Stars: ✭ 66 (+230%)
Mutual labels:  apollo-client
Pointshop2
Next-Gen Garrysmod shop system https://discord.gg/N9DmwwX
Stars: ✭ 37 (+85%)
Mutual labels:  shop
apollo-errors
Machine-readable custom errors for Apollostack's GraphQL server
Stars: ✭ 408 (+1940%)
Mutual labels:  apollo-client
recompose-apollo
Recompose HOCs for React Apollo
Stars: ✭ 36 (+80%)
Mutual labels:  apollo-client
LaraShop
Simple PHP shop CMS based on Laravel 5.1
Stars: ✭ 73 (+265%)
Mutual labels:  shop
ember-boilerplate
👓 The stable base upon which we build our Ember.js projects at Mirego.
Stars: ✭ 33 (+65%)
Mutual labels:  apollo-client
tds-community
TELUS Design System Community Components
Stars: ✭ 22 (+10%)
Mutual labels:  css-modules
mobile-realm
mobile-realm
Stars: ✭ 21 (+5%)
Mutual labels:  antd-mobile
les-chat
Real-time messenger with private, public & group chat. Made using PERN + GraphQL stack.
Stars: ✭ 48 (+140%)
Mutual labels:  apollo-client
smart-village-app-app
An open source React Native app for smart villages merging regional offers and services in one place - in your pocket.
Stars: ✭ 26 (+30%)
Mutual labels:  apollo-client
css-modules-angular2
Css modules working with Angular2
Stars: ✭ 22 (+10%)
Mutual labels:  css-modules

Mobile WEB e-shop. Demo

Motivation

  • try modern tech stack
  • share code between platforms as much as possible
  • use great tooling (IDE , Debuggers, DevTools, linters, code formatters)
  • front-end - JS on any platform (React), common back-end. GraphQL - to bind both

Long term idea

Create shop example for ANY platform with shared front-end and single common back-end

Smells like future front-end!

IMAGE ALT TEXT HERE

Tech stack

Front-end

Back-end

How to install

  1. Install Yarn
  2. Clone git project and cd to it with command git clone https://github.com/ArtemSerga/react-shop.git && cd react-shop
  3. Copy .env.default file to .env with command cp .env.default .env. This will be your local settings
  4. Install packages by running yarn install
  5. Start project with yarn start
  6. Open in Chrome http://localhost:3000/, inspect window (from menu View -> Developer -> Developer Tools) and enable mobile device simulator in DevTools

Architecture

One React component - one self-contained directory

/MyComponent
  /MyComponent.tsx
  /myQuery.gql  # GraphQL query. Named like "GraphQl root query field". Can be multiple per directory
  /styles.css  # local-scoped styles with CSS-Modules
  /my-icon.svg  # some media. Can be multiple per directory
  /readme.md  # component-related docs

Tools

GraphiQL

An in-browser IDE for exploring GraphQL API. Try this query (when opened press Prettify and play button)

Graphql Voyager

Interactive GraphQL schema (e-shop demo)

React DevTools

  1. In Chrome install React DevTools extension
  2. After that, you will have "React" tab in Debug Toolbar

Redux DevTools

  1. In Chrome install Redux DevTools extension
  2. After that, you will have "Redux" tab in Debug Toolbar

Apollo DevTools

  1. In Chrome install Apollo DevTools extension
  2. After that, you will have "Apollo" tab in Debug Toolbar

Visual Studio Code IDE (optional)

Why

  • subjectively handles this stack better (even than WebStorm)
  • you can fully and quickly configure it with steps below

If you DON'T use it - automatically install all extensions and configure it

  1. Install VSCode and open project's directory via menu File -> Open...
  2. Install extension Settings Sync
    • in menu select View -> Extensions to open extensions sidebar
    • type Settings Sync and install it
  3. Download extensions and keybindings
    • in menu select View -> Command Palette and run command "Sync : Download Settings". After this step all happens automatically and your VSCode will be ready for work
  • NOTE: If you don't need keybindings like IntelliJ IDEA uninstall this extension

Already use it

  • to prevent rewriting your own settings - you can try it with VSCode Insiders
  • or just look at list of recommended extensions
  • or do nothing, mandatory extensions are mentioned below

TypeScript

  • before webpack building, TS => JS compilation happens automatically, so you don't need to run it manually
  • VSCode
    • to watch and conveniently solve TS errors via PROBLEMS section (in menu View -> Problems) select in menu View -> Command Palette... and type command "Tasks: Run Build Task"

Linters and code formatters

Tslint to lint TS

  • to run manually for all project via terminal yarn run tslint
  • VSCode
    • install TsLint extension
    • for opened files it automatically show errors in PROBLEMS section (in menu View -> Problems)
    • to see all project problems select in menu Go -> Go to File... and type task tslint

Prettier code formatter

  • TSLint for linting, Prettier for code formatting
  • in this project all TypeScript, JS, CSS, GraphQL and JSON files are formatted using Prettier
  • VSCode

Stylelint to lint CSS

  • Stylelint for linting, Prettier for code formatting
  • to run manually for all project select in menu Go -> Go to File... and type "task stylelint"
  • VSCode
    • install stylelint extension
    • for opened files it automatically shows errors in PROBLEMS section (select in menu View -> Problems)
    • for code formatting use Prettier described above

JSON formatter

  • Also use Prettier described above

MarkDown linter and tools

  • every React component has own directory, so it's a good place to describe it with readme.md
  • VSCode

UI with Ant Design and Ant Design Mobile

  • based on React, written in TypeScript
  • dozens of features
  • subjectively one of the most mature UI library
  • cross-platform support:
  • intensively developed by Alibaba

Related projects

  • react-native-shop - same e-shop example, tech stack and back-end, but for Android and iOS using React Native
  • react-cross-platform - online e-shop demo for Mobile WEB, Android, iOS platforms
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].