1.0.2 • Published 8 years ago

holyjs v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

HolyJS

This project based on Hackathon Starter

Project starter for Node.js web applications.

Features

  • .env environment variables
  • Local Authentication using Email and Password
  • Authentication via Twitter, Facebook, Google, Github, instagram
  • Flash Notifications like success, error and info
  • MVC project structure
  • Ready, Account Management
    • Gravatar
    • Profile Details
    • Change Password
    • Forgot Password (Reset)
    • Linking multiple social accounts to one account
    • Delete Account
  • CSRF Protection
  • Yeoman Generator generator-holyjs

Prerequisites

  • MongoDB
  • NodeJS

Project structure

NameDescription
config/passport.jsPassport Strategies and Serialize/Deserialize User
controllers/home.jsController for home page
controllers/user.jsController for user account management
models/User.jsUser model
middlewares/Middlewares folder
strategies/Passport's Strategies Folder
strategies/local.jsPassport's Local Strategy
public/Static files (fonts, css, js, images)
views/Template files
views/layout.jadeMain layout template
views/partials/flash.jadeFlash notifications success info error
test/app.jsApplication test cases
test/models.jsModel test cases
.travis.ymlTravis CI integration
.env.exampleExample file for API keys, tokens, passwords and database info
.envMust be created manually from example
app.jsThe main application file
package.jsonNPM dependencies and project info

Packages

PackageDescription
asyncLibrary for asynchronous control flow.
bcrypt-nodejsHashing and salting passwords.
connect-mongoMongoDB session store for Express.
dotenv.env file environment variables.
expressNode.js Web Framework.
body-parserExpress 4 middleware for parse request bodies.
express-sessionExpress 4 middleware for session store.
morganHTTP request logger.
compressiondeflate and gzip compressions.
errorhandlerExpress 4 middleware for error handling.
serve-faviconExpress 4 middleware for serving favicon. (also caching)
express-flashExpress 4 flash messages.
express-validatorExpress 4 middleware for string validation and sanitization.
jadeTemplate engine.
luscaCSRF middleware.
mongooseMongoDB ORM.
nodemailerNode.js library for sending emails.
passportAuthentication library.
passport-facebookSign-in with Facebook.
passport-githubSign-in with GitHub.
passport-google-oauthSign-in with Google.
passport-twitterSign-in with Twitter.
passport-instagramSign-in with Instagram.
passport-localSign-in with username and password.
passport-oauthOAuth 1.0a and OAuth 2.0 strategies.
requestHTTP request library.
lodashJavascript utilities library.
socket.ioReal-Time Communication Engine.

Development Packages

PackageDescription
mochaTest framework.
supertestHTTP assertion library.
chaiBDD/TDD assertion library.

Install with Yeoman Generator

First install yeoman and generator-holyjs

npm install -g yo
npm install -g generator-holyjs

Then generate your new project:

yo holyjs

Ideas - Todo

  • Adding socket.io
  • Custom middleware support with middlewares/ folder.
  • Adding test scripts for user login and register.
  • Add bower support
  • Add sass and public js assets support with minify.
  • Environment dotenv config files. (.env.production .env.testing, .env)
  • An example crud routes and controller.
  • Separated passport strategies with strategies/ folder.
  • CLI helper for secret key generate, listing routes, listing controllers etc.
  • Yeoman generator for HolyJS project