• This repository has been archived on 24/Mar/2023
  • Stars
    star
    2,400
  • Rank 19,162 (Top 0.4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ‘• ๐Ÿ‘– ๐Ÿ“ฆ A sample web and mobile application built with Node, Express, React, React Native, Redux and GraphQL. Very basic replica of stitchfix.com / krate.in (allows users to get monthly subscription of trendy clothes and accessories).

Crate

Crate ๐Ÿ‘•๐Ÿ‘–๐Ÿ“ฆ

Get monthly subscription of trendy clothes and accessories.

  • API built with Node, GraphQL, Express, Sequelize (MySQL) and JWT Auth
  • WebApp built with React and Redux along with Server Side Rendering (SSR) / SEO friendly
  • Mobile (Android and iOS) Native App build with React Native
  • Written in ES6+ using Babel + Webpack
  • Designed using Adobe Experience Design. Preview it here.

Features

  • Modular and easily scalable code structure
  • Emphasis on developer experience
  • UI components in separate folder which can be swapped for your favorite UI framework easily
  • Responsive UI for React Native to support Mobile and Tablet
  • GraphQL schema with associations
  • Database migration and data seeding
  • User authentication using JSON Web Tokens with GraphQL API
  • File upload feature with GraphQL
  • React storybook demonstrating UI components for web
  • Server side rendering
  • Multi-package setup and dev scripts for an automated dev experiance

Useful for

  • Developers with basic knowledge on React exploring advance React projects
  • Developers learning React Native
  • Exploring GraphQL
  • Scalable project structure and code
  • Starter application for Mobile and Web along with SSR
  • Multi-package scripts
  • Sample project with combination of all above

Screenshots and GIFs

Click on image to view fullscreen and zoom

Desktop

IMAGE

Crate Desktop

Mobile

IMAGE ยท GIF

Crate Mobile

Tablet

IMAGE ยท GIF

Crate Tablet

Core Structure

code
  โ”œโ”€โ”€ package.json
  โ”‚
  โ”œโ”€โ”€ api (api.example.com)
  โ”‚   โ”œโ”€โ”€ public
  โ”‚   โ”œโ”€โ”€ src
  โ”‚   โ”‚   โ”œโ”€โ”€ config
  โ”‚   โ”‚   โ”œโ”€โ”€ migrations
  โ”‚   โ”‚   โ”œโ”€โ”€ modules
  โ”‚   โ”‚   โ”œโ”€โ”€ seeders
  โ”‚   โ”‚   โ”œโ”€โ”€ setup
  โ”‚   โ”‚   โ””โ”€โ”€ index.js
  โ”‚   โ”‚
  โ”‚   โ””โ”€โ”€ package.json
  โ”‚
  โ”œโ”€โ”€ mobile (Android, iOS)
  โ”‚   โ”œโ”€โ”€ assets
  โ”‚   โ”œโ”€โ”€ src
  โ”‚   โ”‚   โ”œโ”€โ”€ modules
  โ”‚   โ”‚   โ”œโ”€โ”€ setup
  โ”‚   โ”‚   โ”œโ”€โ”€ ui
  โ”‚   โ”‚   โ””โ”€โ”€ index.js
  โ”‚   โ”‚
  โ”‚   โ””โ”€โ”€ package.json
  โ”‚
  โ”œโ”€โ”€ web (example.com)
  โ”‚   โ”œโ”€โ”€ public
  โ”‚   โ”œโ”€โ”€ src
  โ”‚   โ”‚   โ”œโ”€โ”€ modules
  โ”‚   โ”‚   โ”œโ”€โ”€ setup
  โ”‚   โ”‚   โ”œโ”€โ”€ ui
  โ”‚   โ”‚   โ””โ”€โ”€ index.js
  โ”‚   โ”œโ”€โ”€ storybook
  โ”‚   โ”‚
  โ”‚   โ””โ”€โ”€ package.json
  โ”‚
  โ”œโ”€โ”€ .gitignore
  โ””โ”€โ”€ README.md

Setup and Running

  • Prerequisites
    • Node
    • MySQL (or Postgres / Sqlite / MSSQL)
  • Clone repo git clone [email protected]:atulmy/crate.git crate
  • Switch to code directory cd code
  • Configurations
    • Modify /api/src/config/database.json for database credentials
    • Modify /api/.env for PORT (optional)
    • Modify /web/.env for PORT / API URL (optional)
    • Modify /mobile/src/setup/config.json for API URL (tip: use ifconfig to get your local IP address)
  • Setup
    • API: Install packages and database setup (migrations and seed) cd api and npm run setup
    • Webapp: Install packages cd web and npm install
    • Mobile:
      1. Install packages cd mobile and npm install
      2. Install iOS dependencies cd mobile/ios pod install
  • Development
    • Run API cd api and npm start, browse GraphiQL at http://localhost:8000/
    • Run Webapp cd web and npm start, browse webapp at http://localhost:3000/
    • Run Mobile cd mobile and npx react-native run-ios for iOS and npx react-native run-android for Android
  • Production
    • Run API cd api and npm run start:prod, creates an optimized build in build directory and runs the server
    • Run Webapp cd web and npm run start:prod, creates an optimized build in build directory and runs the server

Multi-package automation

  • New developers are advised to run through the above 'setup and running' process before reading further.
  • Optional multi-package automation for faster setup and easier dev environment initiation.
  • No need to cd to sub-folders unless working with mobile or running a production build.
  • Once Node, MySQL, repo clone and configuration are setup correctly

Resources and Inspirations

  • โœ๏ธ Opinionated project architecture for Full-Stack JavaScript Applications - GitHub
  • ๐ŸŒˆ Simple Fullstack GraphQL Application - GitHub
  • ๐ŸŒ Universal react application with server side rendering - GitHub
  • Container Components - Medium Post
  • Zero to GraphQL in 30 Minutes - YouTube
  • Building a GraphQL Server YouTube Playlist
  • Universal JavaScript Web Applications with React by Luciano Mammino - YouTube
  • Building Youtube UI in React Native in 30 Mins - YouTube
  • Building Stellar Mobile UX With React Native - YouTube
  • Free MySQL hosting https://remotemysql.com

Why open source a project and not a boilerplate or framework?

  • While building a new project with Node, you can basically start scratch, adding libraries and tools as you go on building it further.
  • Comparing with any other languague, you usually start with a framework, for example, Laravel (PHP), Django (Python) or Ruby on Rails (Ruby) which includes a ton of features and codebase which you never end up using.
  • I've personally found, learning by going through a good project codebase step by step while building your own project helps in ease of understanding and remembering

Author

Contributors

  • Ebou Jobe - GitHub
  • Nenad Radovanovic - GitHub ยท Twitter
  • Nicholas Drew - GitHub
  • Mateus Abdala - GitHub
  • Hossein Nedaee - GitHub
  • Mohammad Afzal - GitHub
  • [YOUR NAME HERE] - Feel free to contribute to the codebase by resolving any open issues, refactoring, adding new features, writing test cases or any other way to make the project better and helpful to the community. Feel free to fork and send pull requests.

Donate

If you liked this project, you can donate to support it โค๏ธ

Donate via PayPal Become a Patreon

Hire me

Looking for a developer to build your next idea or need a developer to work remotely? Get in touch: [email protected]

License

Copyright (c) 2018 Atul Yadav http://github.com/atulmy

The MIT License (http://www.opensource.org/licenses/mit-license.php)

More Repositories

1

fullstack-graphql

๐ŸŒˆ Simple Fullstack GraphQL Application. API built with Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with React + Redux to access the API. Written in ES6 using Babel + Webpack.
JavaScript
1,026
star
2

fullstack-javascript-architecture

โœ๏ธ Opinionated project architecture for Full-Stack JavaScript Applications.
JavaScript
652
star
3

oauth

๐Ÿ”— OAuth 2.0 implementation for various providers in one place.
JavaScript
426
star
4

gql-query-builder

๐Ÿ”ง Simple GraphQL Query Builder
TypeScript
354
star
5

node-express-react-redux-zwitter

๐Ÿฃ A basic clone of Twitter (Boilerplate App) - Separate API (express+mongo) and Frontend (react+redux) folders using Node, Express, MongoDB, React (create-react-app), React Router v4 and Redux.
JavaScript
92
star
6

universal-react

๐ŸŒ A simple universal react application with server side rendering built with latest versions of React (v16+), React Router (v5+), Redux (v4+), Express (v5+), Webpack (v4+), Babel Preset ES6 ๐Ÿ‘จโ€๐Ÿ’ป
JavaScript
79
star
7

hire-smart

โœ… HIRE SMART (community edition) - Streamline hiring process, scheduling interviews and tracking candidates.
JavaScript
70
star
8

react-recoil

A sample implementation of React Recoil.
JavaScript
44
star
9

react-native-curated

๐Ÿ’โ€โ™‚๏ธ Hand picked collection of packages, tutorials and more for React Native.
43
star
10

wispy

๐ŸŒฑ An experimental lightweight (remote procedure call) API pattern.
JavaScript
36
star
11

meteor-react-simple-chat

๐Ÿ’ฌ Basic chat application using Meteor 1.4 and React.
JavaScript
25
star
12

meteor-baseui

๐Ÿ“ฑ๐Ÿ–ฅ Basic UI: Mobile + Web
HTML
13
star
13

node-react-zwitter

๐Ÿง NodeJS, Express, MySQL and React Boilerplate App - Zwitter (Basic clone of Twitter)
JavaScript
13
star
14

cv

๐Ÿ“„ Curriculum Vitae
12
star
15

meteor-bootstrap

๐Ÿฃ Meteor Bootstrap / Boilerplate Project with essential folder structures and packages.
JavaScript
10
star
16

meteor-mafia

๐ŸŽฎ Mafia: The Party Game!
JavaScript
9
star
17

meteor-rock-paper-scissors

๐Ÿ‘Šโœ‹โœŒ๏ธ Rock Paper Scissors - Play online with your friends or with computer
JavaScript
7
star
18

meteor-tictactoe

๐ŸŽฎ Tic Tac Toe - Play multiplayer online with your friends
JavaScript
6
star
19

node-express-handlebars-zwitter

๐Ÿง NodeJS, Express, Mongoose and Handlebars Boilerplate App - Zwitter (Basic clone of Twitter)
JavaScript
5
star
20

jquery-connectors

๐Ÿ”— Draws a path between two HTML elements.
JavaScript
5
star
21

fullstack-validator

๐Ÿ›ก A simple validation library for server and client side JavaScript applications.
TypeScript
5
star
22

meteor-1.4-zwitter

๐Ÿง Meteor 1.4 Boilerplate App - Zwitter (Basic clone of Twitter)
JavaScript
4
star
23

tool-aspectratio

๐Ÿ“ฑ ๐Ÿ–ฅ ๐Ÿ’ป Calculate aspect ratio online for images, display screens, montors and mobile easily.
PHP
4
star
24

php-angular-easyapp

An easy, flexible, very light weight, extendable, small to medium scale application template. Recommended for beginners exploring web technologies. Best suited for SPAs and RIAs.
PHP
4
star
25

node-basics

Basics of NodeJS
JavaScript
4
star
26

meteor-react-zwitter

๐Ÿง Meteor + ReactJS Boilerplate App - Zwitter (Basic clone of Twitter)
JavaScript
3
star
27

baseui

๐Ÿ“ฑ๐Ÿ–ฅ Basic UI: Mobile + Web
HTML
3
star
28

node-express-angular-job-finder

๐Ÿ” A sample app built on Mongo, Express and Angular and Node
CSS
2
star
29

workstation

1
star