Coder Social home page Coder Social logo

ishaarany / adonis-nuxt-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbratcher/adonis-nuxt-starter

0.0 0.0 0.0 2.12 MB

A monorepo starter for Adonis and Nuxt with Vuetify and resourceful CRUD example

License: MIT License

JavaScript 66.33% Vue 32.18% CSS 1.49%

adonis-nuxt-starter's Introduction

Project logo

Adonis Nuxt Starter

Status GitHub Issues GitHub Pull Requests License


This project features an integrated Adonis/Nuxt full-stack application created as a starter template for Progressive Web Applications(PWAs).

๐Ÿ“ Table of Contents

๐Ÿง About

Featuring a full user module, example CRUD resources, and web optimization, this starter project pre-installs and configures a lot of common needs for you out of the box. It was built with the intent to give the developer a powerful base starting point with a lot of things every app needs set up for you.

๐Ÿ Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Clone the repo locally

git clone [email protected]:jbratcher/Adonis-Nuxt-Starter.git myProject

Install the dependencies

cd myProject && npm install

Run the server

adonis serve --dev

Run the client

npm run dev

Prerequisites

You will need to have Node and npm installed.

Installing

Once the above steps are complete, you should create a .env file.

cp .env.example .env

The .env file is where you will tell Adonis your database and mail settings.

Database

By default, this project uses PostgreSQL for the data layer but this can be easily changed in the .env file.

DB_CONNECTION=pg
DB_HOST=127.0.0.1
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=
DB_DATABASE=adonis_nuxt_starter

If you use another database type, you will need to install the appropriate driver.

Mailer

The default mail settings use smtp through gmail.

In .env:

MAIL_CONNECTION=smtp
SMTP_PORT=465
SMTP_HOST=smtp.gmail.com
MAIL_USERNAME=youraddress@gmail.com
MAIL_PASSWORD=Y0urPa$$w0rd!

The Gmail SMTP provider was chosen to provide a free and simple mailer for starter projects. This provider is limited to sending 500 emails per day. You may also need to change your Gmail account settings in regards to allowing your local development environment interact with this service.

Client URL

An environment variable is used to set the URL of the client (front-end) for easy deployment. This variable must be set locally for some features to work.

.env

CLIENT_APP_URL = http://localhost:3000

Migrations

After your database is set up, you should run migrations. This will allow you to manage users and use CRUD operations for the example resources.

In the terminal:

adonis migration:run

The project does come with some faked resource data in a seeder. If you would like to auto populate this data, make sure to run migrations with the seed flag.

adonis migration:run --seed

Start Creating

At this point you should be able to start customizing the application to your requirements.

Current Features:

  • User Module

    • Register, login, logout, and manage user profiles
    • New registration email with link to verify account
    • Forgot password/password reset
    • Authentication and Authorization synced between client and server
  • Example CRUD

    • Adonis migration, model and controller
    • Adonis CRUD routes
    • PostgreSQL database with example resource table
    • Nuxt CRUD operations with Vuex methods

Build Setup (Nuxt Client)

# build for production and launch server
npm run build
npm run start

# generate static project
npm run generate

Server Deployment (Heroku)

# from app root
cd server
npm run deploy

For detailed explanation on how things work, check out Nuxt.js docs.

adonis-nuxt-starter's People

Contributors

jbratcher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.