|
| 1 | +<h1 align="center"> |
| 2 | + <a href="https://ladjs.github.io/lad/"><img src="media/lad.png" alt="lad" /></a> |
| 3 | +</h1> |
| 4 | +<div align="center"> |
| 5 | + <a href="http://slack.crocodilejs.com"><img src="http://slack.crocodilejs.com/badge.svg" alt="chat" /></a> |
| 6 | + <a href="https://semaphoreci.com/niftylettuce/lad"> <img src="https://semaphoreci.com/api/v1/niftylettuce/lad/branches/master/shields_badge.svg" alt="build status"></a> |
| 7 | + <a href="https://codecov.io/github/ladjs/lad"><img src="https://img.shields.io/codecov/c/github/ladjs/lad/master.svg" alt="code coverage" /></a> |
| 8 | + <a href="https://github.com/sindresorhus/xo"><img src="https://img.shields.io/badge/code_style-XO-5ed9c7.svg" alt="code style" /></a> |
| 9 | + <a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/styled_with-prettier-ff69b4.svg" alt="styled with prettier" /></a> |
| 10 | + <a href="https://github.com/lassjs/lass"><img src="https://img.shields.io/badge/made_with-lass-95CC28.svg" alt="made with lass" /></a> |
| 11 | + <a href="LICENSE"><img src="https://img.shields.io/github/license/ladjs/lad.svg" alt="license" /></a> |
| 12 | +</div> |
| 13 | +<br /> |
| 14 | +<div align="center"> |
| 15 | + Lad scaffolds a <a href="">Koa</a> webapp and API framework for <a href="https://nodejs.org">Node</a> |
| 16 | +</div> |
| 17 | +<div align="center"> |
| 18 | + <sub> |
| 19 | + A lad that fell in love with a <a href="https://github.com/lassjs/lass"><strong>lass</strong></a> |
| 20 | + • Built by <a href="https://github.com/niftylettuce">@niftylettuce</a> |
| 21 | + and <a href="#contributors">contributors</a> |
| 22 | + </sub> |
| 23 | +</div> |
| 24 | + |
| 25 | + |
| 26 | +## Table of Contents |
| 27 | + |
| 28 | +* [Philosophy](#philosophy) |
| 29 | +* [Features](#features) |
| 30 | + * [Microservices](#microservices) |
| 31 | + * [Frontend](#frontend) |
| 32 | + * [Backend](#backend) |
| 33 | + * [Performance](#performance) |
| 34 | + * [Security](#security) |
| 35 | +* [Get Started](#get-started) |
| 36 | + * [Requirements](#requirements) |
| 37 | + * [Install](#install) |
| 38 | + * [Usage](#usage) |
| 39 | + * [Tutorials](#tutorials) |
| 40 | + * [Community](#community) |
| 41 | +* [Related](#related) |
| 42 | +* [Contributors](#contributors) |
| 43 | +* [Trademark Notice](#trademark-notice) |
| 44 | +* [License](#license) |
| 45 | + |
| 46 | + |
| 47 | +## Philosophy |
| 48 | + |
| 49 | +> Lad is designed according to three core beliefs. |
| 50 | +
|
| 51 | +1. Adhere to [MVC][], [Unix][], [KISS][], [YAGNI][] and [Twelve Factor][twelve-factor] principles |
| 52 | +2. Design for a scrappy, bootstrapped, and [ramen-profitable][] hacker |
| 53 | +3. Stay simple, modern, lightweight, stellar, highly-configurable, and developer-friendly |
| 54 | + |
| 55 | + |
| 56 | +## Features |
| 57 | + |
| 58 | +> Lad boasts dozens of features and is extremely configurable. |
| 59 | +
|
| 60 | +The following is a brief list of features; as you use Lad you will discover more. |
| 61 | + |
| 62 | +### Microservices |
| 63 | + |
| 64 | +* Webapp server (via `app.js`) |
| 65 | +* API server (via `api.js`) |
| 66 | +* Job server (via `agenda.js`) |
| 67 | +* Proxy server (via `proxy.js`) |
| 68 | + |
| 69 | +### Frontend |
| 70 | + |
| 71 | +* Pug |
| 72 | +* Bootstrap 4 |
| 73 | +* Font Awesome |
| 74 | +* SpinKit |
| 75 | +* SweetAlert2 |
| 76 | +* Dense |
| 77 | +* Waypoints |
| 78 | +* LiveReload |
| 79 | +* Frisbee |
| 80 | + |
| 81 | +### Backend |
| 82 | + |
| 83 | +* Redis, sessions, and flash messaging |
| 84 | +* Koa-based webapp and API servers |
| 85 | +* RESTful API with BasicAuth and versioning |
| 86 | +* Agenda-based job scheduler with cron and human-readable syntax |
| 87 | +* Passport-based authentication and group-based permissioning |
| 88 | +* Stripe-inspired error handling with Boom |
| 89 | +* Mongoose and MongoDB with common database plugins |
| 90 | +* Email template engine with Nodemailer and local rendering |
| 91 | +* Proxy eliminates need for Nginx reverse-proxy or Apache virtual hosts |
| 92 | +* Multilingual through i18n and i10n |
| 93 | +* Automatic phrase translation with Google Translate |
| 94 | +* Sitemap generator for simple SEO |
| 95 | + |
| 96 | +### Performance |
| 97 | + |
| 98 | +* Compression and zero-bloat approach |
| 99 | +* Stream-based file uploading |
| 100 | +* Graceful reloading, shutdown, and reconnection handling |
| 101 | +* Manifest asset revisioning |
| 102 | +* Amazon S3 and CloudFront ready |
| 103 | + |
| 104 | +### Security |
| 105 | + |
| 106 | +* Database security plugins and helpers |
| 107 | +* Automated tests and code coverage |
| 108 | +* CSRF, XSS, and rate limited protection |
| 109 | +* Dotenv support for environment-based configurations |
| 110 | +* App, user, and request-based logging |
| 111 | +* SSL-ready |
| 112 | + |
| 113 | + |
| 114 | +## Get Started |
| 115 | + |
| 116 | +> We strictly support Mac and Ubuntu-based operating systems (Windows _might_ work). |
| 117 | +
|
| 118 | +### Requirements |
| 119 | + |
| 120 | +Please ensure your operating system has the following software installed: |
| 121 | + |
| 122 | +* [git][] - see [GitHub's tutorial][github-git] for installation |
| 123 | + |
| 124 | +* [Node.js][node] (v8.x+) - use [nvm][] to install it on any OS |
| 125 | + |
| 126 | + * After installing `nvm` you will need to run `nvm install node` |
| 127 | + * We also recommend you install [yarn][], which is an alternative to [npm][] |
| 128 | + |
| 129 | +* [MongoDB][] (v3.x+): |
| 130 | + |
| 131 | + * Mac (via [brew][]): `brew install mongodb` |
| 132 | + * Ubuntu: |
| 133 | + |
| 134 | + ```sh |
| 135 | + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 |
| 136 | + echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list |
| 137 | + sudo apt-get update |
| 138 | + sudo apt-get -y install mongodb-org |
| 139 | + ``` |
| 140 | + |
| 141 | +* [Redis][] (v4.x+): |
| 142 | + |
| 143 | + * Mac (via [brew][]): `brew install redis-server` |
| 144 | + * Ubuntu: |
| 145 | + |
| 146 | + ```sh |
| 147 | + sudo add-apt-repository -y ppa:chris-lea/redis-server |
| 148 | + sudo apt-get update |
| 149 | + sudo apt-get -y install redis-server |
| 150 | + ``` |
| 151 | + |
| 152 | +### Install |
| 153 | + |
| 154 | +[npm][]: |
| 155 | + |
| 156 | +```sh |
| 157 | +npm install -g lad |
| 158 | +``` |
| 159 | + |
| 160 | +[yarn][]: |
| 161 | + |
| 162 | +```sh |
| 163 | +yarn global add lad |
| 164 | +``` |
| 165 | + |
| 166 | +### Usage |
| 167 | + |
| 168 | +```sh |
| 169 | +lad new-project |
| 170 | +cd new-project |
| 171 | +``` |
| 172 | + |
| 173 | +### Tutorials |
| 174 | + |
| 175 | +* [Writing Your App](https://github.com/koajs/koa#getting-started) |
| 176 | +* [Continous Integration and Deployment](http://niftylettuce.com/posts/automated-node-app-ci-graceful-zerodowntime-github-pm2/) |
| 177 | + |
| 178 | +### Community |
| 179 | + |
| 180 | +* [Follow us on Twitter][twitter] |
| 181 | +* [Join our Slack channel][slack] |
| 182 | +* [Subscribe to our Twitch channel][twitch] |
| 183 | +* [Visit Koa's Community section](https://github.com/koajs/koa#community). |
| 184 | +
|
| 185 | +
|
| 186 | +## Related |
| 187 | +
|
| 188 | +* [lass][] - Scaffold a modern boilerplate for [Node.js][node] |
| 189 | +
|
| 190 | +
|
| 191 | +## Contributors |
| 192 | +
|
| 193 | +| Name | Website | |
| 194 | +| -------------- | ------------------------- | |
| 195 | +| **Nick Baugh** | <http://niftylettuce.com> | |
| 196 | +
|
| 197 | +
|
| 198 | +## Trademark Notice |
| 199 | +
|
| 200 | +Lad, Lass, and their respective logos are trademarks of Niftylettuce LLC. |
| 201 | +These trademarks may not be reproduced, distributed, transmitted, or otherwise used, except with the prior written permission of Niftylettuce LLC. |
| 202 | +If you are seeking permission to use these trademarks, then please [contact us](mailto:[email protected]). |
| 203 | +
|
| 204 | +
|
| 205 | +## License |
| 206 | +
|
| 207 | +[MIT](LICENSE) © [Nick Baugh](http://niftylettuce.com) |
| 208 | +
|
| 209 | +
|
| 210 | +## |
| 211 | +
|
| 212 | +<a href="#"><img src="media/lad-footer.png" alt="#" /></a> |
| 213 | +
|
| 214 | +[npm]: https://www.npmjs.com/ |
| 215 | +
|
| 216 | +[yarn]: https://yarnpkg.com/ |
| 217 | +
|
| 218 | +[lass]: https://github.com/lassjs/lass |
| 219 | +
|
| 220 | +[node]: https://nodejs.org |
| 221 | +
|
| 222 | +[kiss]: https://en.wikipedia.org/wiki/KISS_principle |
| 223 | +
|
| 224 | +[mvc]: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller |
| 225 | +
|
| 226 | +[yagni]: https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it |
| 227 | +
|
| 228 | +[twelve-factor]: https://12factor.net/ |
| 229 | +
|
| 230 | +[ramen-profitable]: http://www.paulgraham.com/ramenprofitable.html |
| 231 | +
|
| 232 | +[unix]: https://en.wikipedia.org/wiki/Unix_philosophy |
| 233 | +
|
| 234 | +[nvm]: https://github.com/creationix/nvm |
| 235 | +
|
| 236 | +[mongodb]: https://www.mongodb.com/ |
| 237 | +
|
| 238 | +[redis]: https://redis.io/ |
| 239 | +
|
| 240 | +[github-git]: https://help.github.com/articles/set-up-git/ |
| 241 | +
|
| 242 | +[git]: https://git-scm.com/ |
| 243 | +
|
| 244 | +[slack]: http://slack.crocodilejs.com/ |
| 245 | +
|
| 246 | +[brew]: https://brew.sh/ |
| 247 | +
|
| 248 | +[twitter]: https://twitter.com/niftylettuce |
| 249 | +
|
| 250 | +[twitch]: https://www.twitch.tv/niftylettuce |
0 commit comments