Giter Site home page Giter Site logo

bilingual's Introduction

BILINGUAL

This project was bootstrapped with Create React App.

Project Tech Stack

  1. React.js
  2. Material UI
  3. Styled components
  4. Redux Toolkit
  5. React-router version 6
  6. Ajax

Available Scripts

In the project directory, you can run:

npm install

It installs all required dependencies included in package.json file

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

Project rules and Style guides

Folder structure

src/api

This folder is for ajax or axios request configs.

src/assets

This folder contains subfolders: styles, icons and images.

src/components

This folder contains reusable stateless and stateful components. It has following sub folders:

|---src/components/UI

 This folder containes common presentational components(eg. Button, Input, etc.)

|---src/components

 Inside `src/components` we may have also other domain specific components like `src/components/Post/PostCard.jsx`

src/containers

Each page includes many small components. This folder is similar to src/components, but it contains our large components which is literally our app pages.

src/utils/constants

This folder to define some objects or arrays and import them anywhere we want to use. These constants could be list items or some text or some words. This is a good practice to keep them separate from components.

src/utils/helpers

We can define helper functions in this folder. There are some functions that we might need across application which generate some certain data or do something special. It’s better to keep them separate from components in order to make them reusable and make code cleaner.

src/layout

It contains the layout components*. Layout is the common top wrapper component usually will contain Navbar , Sidebar and Children components

src/index

All type definitions, actions, reducers and the redux index belong to this folder.

src/routes

We’ll need this folder for react-router configs and route related components.

src/config

It contains the config files using the env and others

Style Guide

Linters

We are using Eslint and prettier linter tools to find bugs and errors before they happen. We'll spend less time testing new features and team's code will be more consistent. We are following AirBnB JavaScript style guide

How to work with Git?

How to name a branch?

feature/branch-name

If you are working on a new feature, you should checkout from development branch and name the branch as feature/branch-name.
After finishing your task, merge your current branch into the development branch by creating pull request

bugfix/branch-name

If you are fixing a bug on a development environment, you should checkout from development and name the branch as bugfix/branch-name.
After finishing your bugfix, merge your current branch into the development branch

hotfix/branch-name

If you are fixing a urgent bug on a production, you should chekout from master branch and name the branch as hotfix/branch-name
After finishing your hotfix, merge your current branch into the staging branche by creating pull request.
Then test your changes on the staging environment, if it's OK, then you must merge changes with development and master branches.

npm run build fails to minify

This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify

bilingual's People

Contributors

dasi012 avatar

Stargazers

 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.