Skip to content
This repository has been archived by the owner on Jul 17, 2019. It is now read-only.
/ vortigern Public archive
forked from barbar/vortigern

A universal boilerplate for building web applications w/ TypeScript, React, Redux, Server Side Rendering and more.

License

Notifications You must be signed in to change notification settings

ericwooley/vortigern

 
 

Repository files navigation

Vortigern

Build Status Dependency Status devDependency Status Code Climate GitHub issues GitHub license


Vortigern is our opinionated boilerplate for crafting universal web applications by using modern technologies like TypeScript, React and Redux.

TypeScript React Redux

Libraries

Vortigern uses the following libraries and tools:

Core

Utilities

Build System

Dev & Prod Server

Developer Experience

Testing

Directory Structure

.
├── blueprints                  # redux-cli file generation templates
├── build                       # Built, ready to serve app.
├── config                      # Root folder for configurations.
│   ├── test                    # Test configurations.
│   ├── types                   # Global type definitions, written by us.
│   ├── webpack                 # Webpack configurations.
│   └── main.ts                 # Generic App configurations.
├── node_modules                # Node Packages.
├── src                         # Source code.
│   ├── app                     # App folder.
│   │ ├── components            # React dumb, pure components.
│   │ ├── containers            # React/Redux Containers.
│   │ ├── helpers               # Helper Functions & Components.
│   │ ├── mocks                 # Mock Data for testing
│   │ ├── models                # Classes and interfaces to model your data.
│   │ ├── redux                 # Redux related code aka data layer of the app.
│   │ │   ├── modules           # Redux modules.   
│   │ │   ├── reducers.ts       # Main reducers file to combine them.  
│   │ │   └── store.ts          # Redux store, contains global app state.    
│   │ ├── routes                # Routes.
│   │ └── views                 # Components that are loaded to by a route. 
│   ├── client.tsx              # Entry point for client side rendering.
│   └── server.tsx              # Entry point for server side rendering.
├── typings                     # Type definitions installed with typings.              
├── .dockerignore               # Tells docker which files to ignore.
├── .gitignore                  # Tells git which files to ignore.
├── .stylelintrc                # Configures stylelint.
├── Dockerfile                  # Dockerfile.
├── favicon.ico                 # Favicon.
├── package.json                # Package configuration.
├── README.md                   # This file
├── tsconfig.json               # TypeScript transpiler configuration.
├── tslint.json                 # Configures tslint.
└── typings.json                # Typings package configuration.

Installation

You can clone from this repository or install the latest version as a zip file or a tarball.

$ git clone https://github.com/barbar/vortigern
$ cd vortigern
$ npm install

Generating files from the blueprints

You can generate components, containers, redux modules (reducer), and views automatically using the https://github.com/SpencerCDixon/redux-cli.

Example:

$ npm install -g redux-cli@1.8.0 # released (and tested on) version as of this writing
$ redux g reducer example

Will generate a reducer file named example, and the necessary tests boilerplate.

Reducers

Reducers have been setup to automatically dispatch the action with the type. This removes the need for any const strings. See the current reducers for an example, or use the reducer blueprint.

I18n (Internationalization)

This starter kit is setup to handle language changes automatically.

To make the best use of i18n, keep all your strings in src/app/resources/strings/i18n/(language)/(language.json)

Code generation will occur while you are developing and generate types for you. You can access all strings from the rootstore.i18n.strings, which should be setup by the blueprints automatically.

Adding language auto detection is on the roadmap.

Usage

All commands defaults to development environment. You can set NODE_ENV to production or use the shortcuts below.

# Running

$ npm start # This starts the app in development mode

# Starting it with the production build
$ NODE_ENV=production npm start # or
$ npm run start:prod

# Building 

$ npm build # This builds the app in development mode

# Commands below builds the production build
$ NODE_ENV=production npm build # or
$ npm run build:prod

# Testing
$ npm test

For Windows users, we recommend using the shortcuts instead of setting environment variables because they work a little different on Windows.

Notes

# If you want install additional libraries, you can also install their typings from DefinitelyTyped
$ typings install dt~<package> --global --save
# or if it's located on npm
$ typings install <package> --save

Credits

Vortigern is released under the MIT license.

The image in this README belongs to hhvferry.com.


We help startups start and stay started by helping them plan, strategize, fund and execute their vision.

You can contact us at hey@barbar.com.tr

Be sure to check out available jobs at Barbar.

About

A universal boilerplate for building web applications w/ TypeScript, React, Redux, Server Side Rendering and more.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 69.1%
  • JavaScript 30.4%
  • CSS 0.5%