Giter Site home page Giter Site logo

d-turner / fullstack-app-with-react-redux Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 43.23 MB

Fullstack app with MariaDB, Node.js, Express, Passport.js, React, Redux, Immutable

Shell 0.11% CSS 6.69% HTML 0.13% JavaScript 51.28% Python 0.60% Roff 40.81% TSQL 0.39%

fullstack-app-with-react-redux's Introduction

Introduction

Welcome to Kanjingo-React-Redux, a flexible web-based CAT tool for post editing machine translations.

Quickstart

The frontend is built entirely with JavaScript, using the React view engine and community tools.

Installation

  1. Install Node and NPM if you don't already have them:
$ sudo apt install npm
  1. Run npm install from the client directory (kanjingo-react-redux/client/)
  2. Start the development server with npm run dev from the client directory (kanjingo-react-redux/client/)

Development

The development server uses webpack and babel to compile es6 code into browser compatible code.

Webpack will fire up a server which watches all of the files in the project, and automagically reloads whenever you change one of the components.

Webpack is also configured to minify and compile all source files into a single distribution file.

Webpack uses 'cheap-module-source-map' to map the code in the single distribution file back to the original source files.

Production

  1. Install Node and NPM if you don't already have them:
$ sudo apt install npm
  1. Run npm install from the client directory (kanjingo-react-redux/client/)
  2. start the production server with npm run prod from the server directory
  3. Run npm install from the server directory (kanjingo-react-redux/server/)
  4. Confirm that MariaDB is running and start the server with npm run prod

MariaDB

MariaDB is the chosen database for this application, make sure it is running before starting the server

Style

  • It is highly recommended to use a JavaScript linter
  • This project uses eslint for styling
  • The configuration is based on AirBnB's eslint plugin
  • Use two spaces to indent javascript
  • Setting eslint is different for every editor, for Visual Studio Code just install the eslint extension

Sass

This project uses SASS and picnicss for styling the components. All Sass variables can be found in 'client/src/constants/variables.scss' and should be used instead of hard values wherever possible.

Testing

Jest is used as the testing framework as recommended by React.
For testing it is recommended to use deep-freeze on objects that are passed to reducers.
This ensures that objects don't get mutated and the reducers are pure functions.

Building and Deploying

Running the application for production

On the server in production it is a good idea to use pm2 a process manager for node. This will auto restart the application if it crashes or fails.

sudo npm install pm2 -g
npm run start

Language Codes

TODO

  • Concordance + Dictionary lookup
  • Control Spelling + Grammar Setting (Currently uses the browsers language setting)

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.