Voyager is a Node and SQL based web application framework that provides everything you need to produce robust, scalable, database-driven web apps, including:
- Built-in user authentication (opt-in)
- Simplistic database migrations (Knex)
- Easy-to-use ORM (Sequelize)
- Clean, full-featured layout templating (Handlebars)
- Robust front-end build system (Webpack)
- Modern ES6 syntax
Built on top of Express, and modeled after Rails and Laravel, Voyager provides a complete solution to getting up and running with a user-based app as quickly as possible.
Download the Voyager command line interface (CLI) with NPM:
npm install -g voyager-cli
Create a new Voyager project, with or without auth:
voyager new newApp
voyager new newApp --auth
Notice: You must run the built-in Knex migrations and add a .env file with valid credentials for the auth version to work. Further auth related instructions can be found under Auth Setup below.
Change directory to
newAppand start the Voyager server:
cd newApp voyager start
Open up a new terminal tab and run webpack (requires webpack installed globally):
Your app should open up automatically at
http://localhost:3001and you should see the Voyager start up page.
To get started with Voyager's built-in authentication, you must follow a few steps required to connect your app to a database and utilize key functionalities such as email confirmations and password resets.
Create a file called
.envin the root of your newly generated Voyager project
Copy the contents of
.env.exampleand paste inside of the newly created
DB_HOST= DB_USER= DB_PASSWORD= DB_NAME= MAILGUN_KEY= MAILGUN_DOMAIN=
Create a MySQL database for your app, grab a Mailgun API key, and insert the corresponding values into the
.envfile. A finished version will look something like this for a local server:
DB_HOST=localhost DB_USER=root DB_PASSWORD=root DB_NAME=newApp MAILGUN_KEY=key-kfvud83k3kf3vbn22k223222 MAILGUN_DOMAIN=mailgun.yourdomain.com
Install knex if you haven't already:
npm install knex -g
Run knex migrations:
Restart the Voyager server:
Open a new tab in terminal and start webpack:
You should now have a fully functioning app with auth features such as user registration, user login, email confirmation, and password reset functionality. For more information and instruction regarding Voyager auth, check the Chris Courses YouTube channel for Voyager tutorials and more.
Knex Migration API
Rollback Last Migrations:
Voyager is an open-source framework licensed under the MIT License.