Boilerplate for building reactive isomorphic applications. Built around TypeScript, React, Apollo, MongoDB.
TRAM
├── assets # Place your static assets here
├── coverage # NYC coverage output
├── dist # Built app, ready to serve
├── resources # External resources, like Photoshop files
├─┬ src # Source files
│ ├─┬ api # Database-related files
│ │ ├── auth # Authentication files
│ │ ├── counter # Counter component
│ │ ├── todo # Todo component
│ │ ├── user # User component
│ │ ├── apollo.ts # Exports configureApollo
│ │ ├── components.ts # Imports all the components
│ │ ├── index.ts # Exports configureApollo, Components, Mongoose, Mongease and Schema
│ │ ├── mongease.ts # Mongease instance
│ │ ├── mongoose.ts # Mongoose instance
│ │ └── schema.ts # Executable GraphQL schema
│ ├─┬ client # Client-related files
│ │ ├── index.ts # Client entry point
│ │ ├── render.tsx # Client's render function
│ │ └── vendor.ts # Client's vendor entry point
│ ├── modules # Where to place modules
│ ├─┬ server # Server-related files
│ │ ├── hot.ts # Hot Module Replacement server entry point
│ │ ├── index.ts # Server entry point
│ │ ├── render.tsx # Server's render function
│ │ └── vendor.ts # Server's vendor entry point
│ ├── store # Redux-related files
│ └─┬ ui # UI-related files
│ ├── components # React components
│ ├── routes # App routes
│ ├── template # Extra front-end code/styles to load
│ └── styles.ts # Exports all the loaded styles
├── types # Custom declarations
├── typings # Typings declarations
├─┬ webpack # Webpack configurations
│ ├── base # Base configurations
│ ├── client # Client configurations
│ ├── server # Server configurations
│ └── test.js # Tests configuration
├── .babelrc # Babel configuration (may be enabled in Awesome Typescript Loader)
├── .gitignore # Tells git which files to ignore
├── .todo # List of things to do
├── forever.json # Forever configuration
├── LICENSE # Contains the license
├── package.json # NPM package.json
├── README.md # This file
├── tsconfig.json # TypeScript compiler configuration
└── typings.json # Typings configuration
To get a list of all the available scripts, as well as a brief description for each, run:
npm run help
$ git clone https://github.com/fabiospampinato/TRAM.git
$ cd TRAM
$ npm install
$ typings install
Development mode:
npm run start:db # Only needed if connecting to a local MongoDB
npm run build:vendor # Only needed before the first start, or if vendor dependencies change
npm run start
Production mode:
npm run start:db:prod # Only needed if connecting to a local MongoDB
npm run build:all:prod # Only needed before the first start
npm run start:server:prod
MIT © Fabio Spampinato