/lad

:boy: Lad scaffolds a Koa webapp and API framework for Node.js *TO BE RELEASED*

Primary LanguageJavaScriptMIT LicenseMIT

lad

chat build status code coverage code style styled with prettier made with lass license

Lad scaffolds a Koa webapp and API framework for Node
A lad that fell in love with a lass • Built by @niftylettuce and contributors

Table of Contents

Philosophy

Lad is designed according to three core beliefs.

  1. Adhere to MVC, Unix, KISS, YAGNI and Twelve Factor principles
  2. Design for a scrappy, bootstrapped, and ramen-profitable hacker
  3. Stay simple, modern, lightweight, stellar, highly-configurable, and developer-friendly

Features

Lad boasts dozens of features and is extremely configurable.

The following is a brief list of features; as you use Lad you will discover more.

Microservices

  • Webapp server (via app.js)
  • API server (via api.js)
  • Job server (via agenda.js)
  • Proxy server (via proxy.js)

Frontend

  • Pug
  • Bootstrap 4
  • Font Awesome
  • SpinKit
  • SweetAlert2
  • Dense
  • Waypoints
  • LiveReload
  • Frisbee

Backend

  • Redis, sessions, and flash messaging
  • Koa-based webapp and API servers
  • RESTful API with BasicAuth and versioning
  • Agenda-based job scheduler with cron and human-readable syntax
  • Passport-based authentication and group-based permissioning
  • Stripe-inspired error handling with Boom
  • Mongoose and MongoDB with common database plugins
  • Email template engine with Nodemailer and local rendering
  • Proxy eliminates need for Nginx reverse-proxy or Apache virtual hosts
  • Multilingual through i18n and i10n
  • Automatic phrase translation with Google Translate
  • Sitemap generator for simple SEO

Performance

  • Compression and zero-bloat approach
  • Stream-based file uploading
  • Graceful reloading, shutdown, and reconnection handling
  • Manifest asset revisioning
  • Amazon S3 and CloudFront ready

Security

  • Database security plugins and helpers
  • Automated tests and code coverage
  • CSRF, XSS, and rate limited protection
  • Dotenv support for environment-based configurations
  • App, user, and request-based logging
  • SSL-ready

Get Started

We strictly support Mac and Ubuntu-based operating systems (Windows might work).

Requirements

Please ensure your operating system has the following software installed:

  • Git - see GitHub's tutorial for installation

  • Node.js (v8.x+) - use nvm to install it on any OS

    • After installing nvm you will need to run nvm install node
    • We also recommend you install yarn, which is an alternative to npm
  • MongoDB (v3.x+):

    • Mac (via brew): brew install mongodb

    • Ubuntu:

      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
      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
      sudo apt-get update
      sudo apt-get -y install mongodb-org
  • Redis (v4.x+):

    • Mac (via brew): brew install redis-server

    • Ubuntu:

      sudo add-apt-repository -y ppa:chris-lea/redis-server
      sudo apt-get update
      sudo apt-get -y install redis-server

Install

npm:

npm install -g lad

yarn:

yarn global add lad

Usage

lad new-project
cd new-project

Tutorials

Community

Related

Contributors

Name Website
Nick Baugh http://niftylettuce.com

Trademark Notice

Lad, Lass, and their respective logos are trademarks of Niftylettuce LLC. These trademarks may not be reproduced, distributed, transmitted, or otherwise used, except with the prior written permission of Niftylettuce LLC. If you are seeking permission to use these trademarks, then please contact us.

License

MIT © Nick Baugh

#