GithubHelp home page GithubHelp logo

example-react's Introduction

Server API Logo

Mern Stack.

Description

  • Learning concept ReactJS framework development by Facebook.

  • Learning ecosystem for ReactJS, example : react-router-dom, redux, Chakra UI.

  • Implement project example with CRA.

  • Build project and implement with SPA or SSR.

  • Deploy source to hosting.

Feature

  • Authentication :

    • Sign in.
    • Sign up.
    • Auto remember login.
    • Forgot password.
    • Send email forgot password.
    • Verity OTP via email.
    • Update user information, change password.
  • Loading all in.

  • CRUD todo example.

  • UI profile and more...etc.

  • Build static SSR.

  • Search friend <coming soon>

  • Request add friend <coming soon>

  • Chat realtime (chat one to one, group chat, ...) <coming soon>

  • Invite group chat <coming soon>

  • Tutorial detail deployment fullstack app <coming soon>.

Setup

We are using template Create React App.

Note :

  • Node version have Node >= 10 on your local development machine. You have download Node JS or update with command : npm update.
  • Using IDE Visual Studio Code or WebStorm All you need left is to know a little bit of Javascript .

Docs & Started

Running the app

We are split two folder: client and server

Run only client

# development

$ npm run start | yarn start

# build mode

$ npm run build | yarn build

Run only server

# development

$ npm run start:dev | yarn start:dev

# production mode

$ npm run start:prod | yarn start:prod

Run SSR

Run script in root folder

cd {root project}.

- open .env file, set IS_SSR=true
 *IS_SSR enable public folder build from client*

# bash script

$ ./ssr.sh

Deployment

Deployment FE:

Vercel allows for automatic deployment on every branch push and merges onto the production branch.
  • Login Vercel
  • Click button new project => import repository from github.
  • When choose repository, you will see form config, then change root-directory ( ./client )
  • Set ENV in step Environment Variables ( copy and paste all env inside env file ), attention with REACT_APP_BASE_URL, it should be set server link build production.
  • Wait vercel build and done.

Deployment BE

  • Login Heroku
  • On dashboard, create new app {name_repo}.
  • Have two ways:
    • Heroku CLI:

      • install heroku cli
        npm install -g heroku
        
      • check version heroku
        heroku --version
        
      • login heroku
        heroku login
        
      • create a new Git repository
        cd my-project/
        git init
        heroku git:remote -a {name_repo}
        
      • deploy your application
        git add .
        git commit -am "make it better"
        git push heroku master
        
      • if existing Git repository
        heroku git:remote -a testing-be-server
        
    • Github connection:

      • Coming soon!

Stay in touch

example-react's People

Contributors

bluesword2024 avatar

Stargazers

Paul Koop avatar  avatar

Watchers

 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.