Module

Develop Modules

Introduction

This guide will help you to develop Module in VaahCMS

Prerequisites

  • Node
  • VaahCMS project directory

Step 1: VaahCli Installation

To use VaahCLI generators for generating modules, install VaahCLI Tool using following command

npm i vaah -g

Step 2: Installation of Modules

Note: In this tutorial, we'll be creating Product Module.

Command that is used to generate a module is:-

npx vaah cms:m

After this command, it will ask for some information regarding the Module,answers are also mentioned here.

? Choose the tech stack of the module:  Module - Vue3 & PrimeVue
  • Name of The Module you want to create. For example Product.
    Enter your module name: Product
    
    
  • Title of the Module. For example Product Management.
    Enter meaningful title for your module: Product Management
    
  • Description about the Module. For example Product Management Module for Admin
    Enter your module description: Product Management Module for Admin
    
  • Name of the person creating the module or you can press enter to go with default value provided.
    Enter Author name: vaah
    
  • Email of the author or press enter to go with default value provided.
    Enter Author email:  support@vaah.dev
    
  • Author website and download url or press enter for default value.
    Enter author website:  https://vaah.dev
    Enter download url: 
    
  • Enter true if you want to run migration for this module as soon as the module is activated.
    Do you want to run migration on activation (true/false):  true
    
  • Enter true if you want to activate this module with some sample data. Use SampleDataTableSeeder for seeding Sample data.
    Will your module contains sample data (true/false):  true
    

After providing all the information, Module will be generated under project-root/Vaahcms/Modules.

This video will help you to understand how to develop modules.

<module-root-folder>\config\config.php contains the information that was entered while creating a module and can be changed by making changes to config.php file.

module-config-file

Copyright © 2024