All Projects → jupl → astraea

jupl / astraea

Licence: MIT license
TypeScript + React Boilerplate

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to astraea

react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+806.67%)
Mutual labels:  enzyme, storybook
Gatsby Starter Typescript Deluxe
A Gatsby starter with TypeScript, Storybook, Styled Components, Framer Motion, Jest, and more.
Stars: ✭ 50 (+233.33%)
Mutual labels:  tslint, storybook
react-typescript
React16 + HMR + typescript + webpack + tslint + tests
Stars: ✭ 21 (+40%)
Mutual labels:  enzyme, tslint
personal-blog
✍️ 个人技术博客
Stars: ✭ 79 (+426.67%)
Mutual labels:  enzyme, storybook
Next.js Typescript Starter Kit
🌳 [email protected], Styled-jsx, TypeScript, Jest, SEO
Stars: ✭ 342 (+2180%)
Mutual labels:  enzyme, storybook
react-module-boilerplate
Sample React presentational components package.
Stars: ✭ 16 (+6.67%)
Mutual labels:  enzyme, storybook
2019 12
🎟 급증하는 트래픽에도 안정적인 예약 서비스, Atomic Pattern을 적용한 재사용 가능한 컴포넌트, 실용적인 Testing을 주제로 하는 이벤트 서비스
Stars: ✭ 169 (+1026.67%)
Mutual labels:  enzyme, storybook
react-ui-kit-boilerplate
A minimal React UI Kit boilerplate with Storybook, hot reloading, Styled Components, Typescript and Jest
Stars: ✭ 88 (+486.67%)
Mutual labels:  tslint, storybook
ui-kit
D2iQ UI Kit
Stars: ✭ 29 (+93.33%)
Mutual labels:  storybook
storybook-addon-next
A no config Storybook addon that makes Next.js features just work in Storybook
Stars: ✭ 184 (+1126.67%)
Mutual labels:  storybook
WtfReactNativeTesting
Testing React Native Apps ✔️ ✅
Stars: ✭ 62 (+313.33%)
Mutual labels:  enzyme
storybook-addon-xd-designs
For adobe XD. Demo at https://morgs32.github.io/storybook-addon-xd-designs
Stars: ✭ 41 (+173.33%)
Mutual labels:  storybook
react-file-input
⚛️  A file Input, with drag'n'drop and image editor for React
Stars: ✭ 71 (+373.33%)
Mutual labels:  enzyme
react-app-boilerplate-2018
Bootstrap for a React App with Redux, React Router, Styled Components, Jest and Hot Reloading,
Stars: ✭ 20 (+33.33%)
Mutual labels:  enzyme
cms-fe-angular8
A Content Management System with Angular8, UI use Ant-Design(ng-zorro-antd)
Stars: ✭ 65 (+333.33%)
Mutual labels:  tslint
chicio.github.io
👻 Fabrizio Duroni (me 😄) personal website. Created using GatsbyJS, Styled Components, Storybook, Typescript, tsParticles, GitHub pages, Github Actions, Upptime.
Stars: ✭ 20 (+33.33%)
Mutual labels:  storybook
ReactionDecoder
Reaction Decoder Tool (RDT) - Atom Atom Mapping Tool
Stars: ✭ 59 (+293.33%)
Mutual labels:  enzyme
twitter-web-react
twitter-web-react.now.sh
Stars: ✭ 104 (+593.33%)
Mutual labels:  storybook
storybook-addon-mock
This addon allows you to mock fetch or XMLHttpRequest in the storybook.
Stars: ✭ 67 (+346.67%)
Mutual labels:  storybook
ts-standard
Typescript style guide, linter, and formatter using StandardJS
Stars: ✭ 338 (+2153.33%)
Mutual labels:  tslint

Astraea TypeScript + React Boilerplate

https://img.shields.io/travis/jupl/astraea/master.svg?label=travis&style=flat-square https://img.shields.io/david/jupl/astraea/master.svg?style=flat-square https://img.shields.io/david/dev/jupl/astraea/master.svg?style=flat-square

Note

Recently Redux support has been removed from this boilerplate. It can still be incorporated, but by default this boilerplate is focused more on React. There are many other options like MobX, context, and more.

Table of Contents

About

This is a boilerplate project for developing a mid to large scale client-side application(s) using TypeScript and React. For an example project, visit the example branch.

Back to top

Prerequisites

Back to top

Getting Started

  1. Clone/download this repository.
  2. Install dependencies using npm:
    • npm install
  3. Start running tasks as described below in the tasks section.

Back to top

Project structure

Overview

astraea/
├─ .coverage/                  # Code coverage reports
├─ .storybook/                 # Storybook configuration
├─ dist/                       # Result from build tasks
│  ├─ assets/                  # Result assets
│  └─ story/                   # Result storybook build
├─ jest/                       # Code that runs before tests are run
├─ src/                        # Source code
│  ├─ app/                     # Application domain
│  │  └─ components/root/      # Top level application view
│  ├─ assets/                  # Static files and entry points to include in builds
│  │  └─ app.tsx               # An application entry point
│  └─ common/                  # Shared code used throughout project
│     ├─ components/container/ # Application wrapper component
│     └─ declarations/         # TypeScript declarations
├─ package.json                # Configuration, tasks, and dependencies
├─ package-lock.json           # Dependency pinning
├─ tsconfig.json               # TypeScript configuration
├─ tslint.json                 # TypeScript linting rules
└─ webpack.config.ts           # Webpack build configuration

Entry Points

When TypeScript code is built, any files directly inside the src/assets/ directory are used to create the output files. The boilerplate currently generates app.js, as there is a single entry point inside src/assets/. (src/assets/index.js) If there are more than one entry points more files generated as well as an additional file common.js, which contains shared code across all entry points. common.js must be loaded before you load an entry point. You can see what gets generated by running the build:dev / build:prod task. (see the tasks section)

Domains

domain/
├─ components/
│  ├─ component1/ # See Component sections below
│  ├─ component2/
│  └─ componentX/
└─ ...            # Other domain items (Redux, MobX, context, etc.)

Rather than group items by things like components/reducers/actions/etc., items are grouped by domain which can be a saner option as the project grows. Examples of domains can be things like resources (ex. blog/, users/) or other things. (ex. ui/) Domains may include things like components, actions, reducer, etc. but they don’t have to include all of them. In fact, you can think of app/ and common/ as domains. Other files may be present as well.

Components

component/
├─ index.ts
└─ template.tsx

React components are grouped in a directory.

  • template.tsx defines the React component without any knowledge of outside logic (ex: Redux) specifics or other things like React DnD. (sometimes referred as dumb component)
  • index.ts is the entry point of the component when used by others.
    • If template does not require data/action bindings then it can just pass through the template. (see src/app/components/root/index.ts)
    • If template requires data/action bindings then it is done here. (sometimes refereed as smart component)

Other Files

*.test.ts, *.test.tsx

Tests for components/domains/logic/etc. If code needs to be run before tests are executed see setup-tests.ts Some guides on tests include:

*.stories.tsx, *.story.tsx

Defines a story to display in React Storybook. Typically this file is in a component. (ex. index.stories.tsx) This guide provides information on how to write stories.

__snapshots__

Generated files/directories when using Jest’s snapshot feature. These files should be left to Jest and not touched manually.

Back to top

Tasks

Tasks can be executed in the following manner:

npm run [command]  # npm

Examples:

npm run server

start

Alias for build:prod.

server

Alias for server:hot.

server:hot

Start a local development server with hot reloading. To override the port change the environment variable PORT. The following is provided:

server:story

Start a local server for React Storybook on port 9001. For more information visit the documentation for React Storybook.

build:dev / build:prod

Build application and include assets into a packaged build in the dist/assets/ directory. The build for build:dev is not minifed and includes source maps, making it ideal for development. The build for build:prod is minified (with dead code elimination) and does not include source maps, making it ideal for production.

build:story

Generate a static build of React Storybook in the dist/story/ disrectory.

test / test:watch / coverage / coverage:watch

Execute tests once or continuously on file changes. In addition, code coverage can be determined. For more information visit the documentation for Jest.

lint / lint:fix

Check codebase against linting rules. Optionally, some errors can be fixed automatically.

Back to top

Project Resources

Back to top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].