Boost is an open-source nuxt.js based framework designed to unify development of advanced web-systems.
All contributions must be done on a fork of the highest x.x branch available. Any changes made to master will be rejected.
If you are an internal contributor then there is no need to fork. Make the changes directly on the highest x.x branch.
Prerequisites: You will need a new nuxt.js project already setup.
Node.js 12 is required
Run the following script to install:
npm install --save github.com:epicdev-za/boostChange your nuxt.config.js file to match the following:
importnuxt_configfrom"boost/nuxt.config";exportdefaultnuxt_config;Create the following files in your projects root directory.
Create a server.config.js file using the following format:
constarray_marriage=require("array-marriage");constgravity_config=require("boost/server.config");letconfig={db: {database: '',host: '',user: '',password: ''},jwt: {secret: ''},sanctum: {project_key: ''},endpoints: {}//Refer to Documentation to setup endpoints};module.exports=array_marriage(gravity_config,config);Create a boost.config.js file using the following format:
constarray_marriage=require("array-marriage");constboost_config=require("boost/boost.config");constconfig={projectName: "",nuxt: {head: {title: ""}},modules: {},//Refer to Documentation to setup modulesmodule_groups: {}//Refer to Documentation to setup module_groups};exportdefaultarray_marriage(boost_config.default,config);Create a boost.routes.js file using the following format:
importpathfrom'path'constarray_marriage=require("array-marriage");constboost_routes=require("boost/boost.routes");constresolve=function(vue){returnpath.join(__dirname,vue);};constroutes={//Refer to Documentation to setup routes'/': {name: 'Home',component: resolve('./pages/index');}};exportdefaultarray_marriage(boost_routes.default,routes);Lastly delete the layouts & middleware directory as these are handled by boost.
- Create your Vue page components inside preferrably the pages directory.
- Add the following to the boost.routes.js file inside the routes const.
'/your/url/structure': {name: 'Page Name',component: resolve('./path/to/page/component'),permissions: ['any.permissions.needed']//This is optional}- Create your landing page url with its necessary permissions.
- Add the following to the boost.config.js file inside the modules key.
'module_uri': {title: "Module Title",description: "Short description on what module is for",icon: "mdi-icon",to_prefix: "/admin",tag: "beta/in dev/etc",//Optionaltag_color: "#000000",//Can use vuetify color library by importing itcreate_btn: false//If you want a quick-link to the create page}Modules can also be grouped by configuring the module_groups as follows:
'Your Module Group Name':{title: "Your Module Group Name",modules: ['module_uri_1','module_uri_2','module_uri_3']}To create a back-end endpoint available on the /api prefix. Configure the server.config.js file as follows:
...
endpoints: {'dir1': {children: {'dir2': {children: {'endpoint1': {//Url will equate to /api/dir1/dir2/endpoint1method: "get",handler: require("./api/endpoints/your_file/etc")}}}}},'endpoint2': {//Url will equate to /api/endpoint2method: "post",handler: require("./api/endpoints/your_file/etc")},'endpoint3': {//An endpoint can have multiple HTTP methods by configuring it like somethods: [{method: "get",handler: require("./api/endpoints/multimethod/get")},{method: "post",handler: require("./api/endpoints/multimethod/post")}]}}...This library is intended for internal use at Epicdev. It has been made open-source to avoid "proprietary" conflicts with clients wanting their projects source code. We offer no support to anyone who is not an Epicdev Developer.