/pevn_nuxt

The PEVNN stack - This project has been moved to GitLab

Primary LanguageJavaScriptMIT LicenseMIT

This project has been moved to GitLab

https://gitlab.com/mYnDstrEAm/pevn_nuxt

The PEVNN stack

Nuxt.js

PostgreSQL

Express.js

Vue.js

Node.js

Free and open-source JavaScript software stack for modern websites and webapps.

This project aims to be as minimalistic as possible while featuring all functionalities, such as authentication, typically necessary in most web-projects so that it can be used to quickly build new things using this stack.
It shows how to use the latest versions of PostgreSQL, Express.js, Vue.js, Node.js and Nuxt.js in conjunction. The guide and the code will be improved later.
The naming is based upon the more popular MEAN and MEVN stacks but could be changed when this project gets moved to GitLab.
This project is under construction! As of right now it is for testing and development purposes only: you likely can't yet use its authentication as is in production.

Architectural layer/component Software choice
Meta Framework Nuxt.js
Server Nuxt.js + Node.js + Express.js
Authentication middleware Passport
Model PostgreSQL (ORDBMS) + node-postgres (PostgreSQL client for Node.js) + Sequelize (ORM)
ViewModel Vue.js
View Vue.js + Vuetify

Some components of the project could be switched out later and some could be added in addition. It aims to use the most FOSS, community-governed, performant, secure and efficient components in their latest stable versions. The components that are part of the stack's acronym (PEVNN) are long-term choices and unlikely to change while e.g. Sequelize could be switched out for Sails/Waterline.

This project will be moved to GitLab in 2019.

I'm currently busy coding an app with the Quasar Framework and am uploading this now in case somebody wants to get started with this stack over the Christmas holidays. I will improve it later. You can help, too.

Guide

  1. Install dependencies
cd pevn_nuxt
npm install
  1. Setup postgres database
  • Install postgres and pgAdmin
  • Create a new user:
sudo su postgres
psql
CREATE USER pevnn_testuser WITH PASSWORD 'pevnn_testuser_password';
ALTER USER pevnn_testuser WITH SUPERUSER;
{
    "development": {
        "username": "pevnn_testuser",
        "password": "pevnn_testuser_password",
        "database": "todos_dev",
        "host": "127.0.0.1",
        "port": 5432,
        "dialect": "postgres"
    },
    "test": {
        "username": "root",
        "password": null,
        "database": "database_test",
        "host": "127.0.0.1",
        "dialect": "postgres"
    },
    "production": {
        "username": "root",
        "password": null,
        "database": "database_production",
        "host": "127.0.0.1",
        "dialect": "postgres"
    }
}
  • cd pevn_nuxt and run:
./node_modules/.bin/sequelize db:create
./node_modules/.bin/sequelize db:migrate
  1. Serve with hot reload at http://localhost:3000 by running npm run dev

Build for production and launch server

npm run build
npm start

Generate static project

npm run generate

Resources

Contribute

Please improve upon the guide and the code:

  1. Fork the project
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Issue a pull request

You can also create issues, but note that this repo is under construction and of version 0.0.1, so it's better to (either wait for at least version 0.1.0 or) create pull-requests. I did use some code and guides on the Web, mostly guides for outdated versions of individual components such as this and this, to create this.

License

MIT license