Git Product home page Git Product logo

typescriptboilerplate's Introduction

React-Typescript boilerplate

This is a base architecture app with React, Typescript, SCSS and Webpack, fully updated with latest dependacies. This base is without react-cli and fully build based on webpack itself for full customizability.

Tech stack

This base application contain:

  • Yarn base (why not?)
  • React 17+
  • Global state with multi reducers via React Context
  • Typescript
  • Webpack 5+
  • Code splitting
  • Mock Services with API simulations
  • SASS styling with encapsulated modules
  • Multiple build configuration for webpack
  • Universal http loader based on any number of API calls.
  • Web manifest for installing the app as PWA
  • Supports .env file for env variables at compile time
  • Support envriable varibles at runtime in express server via configs api
  • Support imports SVGs as components via svgr
  • Multi langauge supprot via i18next standard
  • Unit testing and coverage setup
  • Express server to run the production app
  • TS-linting with official eslint
  • Prettier

Requirements

This application requires:

  • node 8.10.0 or above
  • npm 5.7.1 or above
  • yarn 1.2.* or above
  • To compile SCSS files, you need to install python (2.7,3 or above)

Installation

Type yarn install in your root directory to install the dependacies.

Development

To run the app in development use: yarn start Application will run on http://localhost:3000 by default.

Production Build

For production you need to run: yarn build

Testing via Jest

You can run the tests via: yarn test yarn test:ci (to use the test without watching file changes)

Coverage

You can run the tests via: yarn coverage yarn coverage:ci (to use the coverage without watching file changes)

Run express server:

yarn serverDependencies to install the express server dependacies yarn server then listen to port 8080

Swagger sample template

You can use yarn swagger to generate a set of sample APIs using my custom template inside api/generated folder, you can find my custom typescript/axios based swagger template at root direcory insite template folder.

Nswag sample template

You can use yarn nswag to generate a set of sample APIs using my custom template inside api/generated folder, you can find my custom typescript/axios based swagger template at root direcory insite template folder.

typescriptboilerplate's People

Contributors

mohsenzaim avatar

Forkers

esssport

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.