Code Monkey home page Code Monkey logo

vue-crud's Introduction

Vue CRUD

price license version PRs

Vue.js based REST-ful CRUD system.

  • Vue CRUD allows to create both a mechanism for managing a single table, as well as a CMS or extended CRM with a login system and modules
  • Application built with Vue CRUD is SPA (Single Page Application) so it works much faster than apps based on Wordpress, Joomla, etc.
  • Vue CRUD uses the vue along with its ecosystem (Vuex, Vuetify, etc). Enjoy the benefits of the most popular JS framework in the world.
  • The application architecture is adapted to work with REST API

Vue CRUD demo

Functions

Vue CRUD provides a set of utilities, from which you can compose your own application. Features included in the system can communicate with each other thanks to the use of the Vuex library. Vue CRUD includes the following elements:

  • CRUD | DEMO / SANDBOX:
    • operations on records:
      • Store,
      • Update,
      • Suspend/Restore,
      • Delete,
      • Multiple update,
      • Multiple Suspend/Restore,
      • Multiple Delete
    • filtering:
      • Show active/inactive records,
      • Search phrase in whole table,
      • Search phrase in selected column (exact, like and list mode)
    • versions:
      • client side (small tables < 2000 records)
      • cerver side (> 2000 records)
    • other functions and features:
      • datatable mechanism allows selection of the number of records per page, page transition and sorting,
      • management of a child table from the parent table module,
      • export to excel (xlsx),
      • table refreshing,
  • Authentication system | DEMO / SANDBOX:
    • login form (built-in communication with API, validation),
    • optional locale selection,
    • redirecting to the app,
  • App layout components | DEMO / SANDBOX:
    • Toolbar (with optional elements):
      • title,
      • logo,
      • user profile,
      • locale selection,
      • logout,
      • slots for developer
    • Sidebar:
      • List of routes,
      • Slot for title or user avatar,
      • Slot for developer,
      • Customizable sidebar behaviour
    • Alerts system,
    • Footer,
    • ... and others

The record creation / editing form supports the following types of fields:

  • Input,
  • Number,
  • Decimal
  • Textarea,
  • Rich Text Box,
  • Select (list from related table),
  • Datepicker,
  • Timepicker,
  • Checkbox,
  • Files

Demo versions

DEMO / SANDBOX

CRM DEMO

Credentials with limited privileges (readonly):
Login: [email protected]
Pass: ajSGenC0
To get full user account, contact me on my company site.

Quick start

Do you want to test the application quickly, and you do not have an API ready? No problem, you can use the ready-made example in the examples folder. The API for this example is available on the internet, so you can connect to it by entering its address in the configuration file.

Steps

  1. Clone Vue CRUD:
git clone [email protected]:szczepanmasny/vue-crud.git
  1. Type following commands:
yarn
:: or
npm install
  1. Choose one of the following templates:
  • empty,
  • simple-crud,
  • crm

...and type e.g.:

yarn load-template simple-crud
:: or
npm run load-template simple-crud
  1. If you have your own API prepared, modify src/config/api.js file.

  2. Serve your app:

yarn serve
:: or
npm run serve
  1. Your app is already running (probably at http://localhost:8080).

Usage

The simplest possible code that supports CRUD operations for one table will look something like this:

<template>
  <div>
    <crud :prefix="prefix" :path="path" :pageTitle="pageTitle" :fieldsInfo="fieldsInfo" :detailsTitle="$t('detailsTitle')">
    </crud>
    <alert-box></alert-box>
  </div>
</template>

<script>
  import Crud from '@/utils/crud/components/Crud.vue'
  import AlertBox from "@/utils/app/components/AlertBox.vue";
  export default {
    data() {
      return {
        prefix: 'demo',
        path: 'tasks',
        pageTitle: 'demo.tasks',
      }
    },
    computed: {
      fieldsInfo() {
        return [{
            text: this.$t('fields.id'),
            name: 'id',
            details: false,
          },
          {
            type: 'input',
            column: 'name',
            text: this.$t('fields.name'),
            name: 'name',
            multiedit: false
          },
          {
            type: 'input',
            column: 'description',
            text: this.$t('fields.description'),
            name: 'description',
            required: false
          },
        ]
      },
    },
    components: {
      Crud,
      AlertBox,
    },
    i18n: {
      messages: {
        en: {
          detailsTitle: 'Task',
          fields: {
            id: 'Id',
            name: 'Name',
            description: 'Description'
          }
        }
      }
    },
  }
</script>

API

The application requires a connection with the appropriate API. API can be created in any technology - the condition is its compliance with the Vue CRUD communication specification. If you need to create your API and do not know how to get started, and you don't mind PHP and Laravel, download or clone the Laravel CRUD API project.

Documentation

To check out docs, visit :

vue-crud.github.io.

Contributing

If you have an idea about improving Vue CRUD, do not hesitate.

Developers interested in contributing should read the Code of Conduct.

License

MIT

Copyright (c) 2018-present, Szczepan Masny

vue-crud's People

Contributors

jpinnix avatar szczepanmasny avatar

Watchers

 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.