πŸ–₯️ Velora CLI

Velora provides a command line interface (CLI) to quickly scaffold projects and modules. The CLI helps you bootstrap a new application or generate new resources without writing boilerplate code manually.

πŸ“¦ Installation

go install github.com/aryan-salemababdi/Velora@latest

After installing, verify with:

velora --help
⚠️ Ensure your Go bin path is in $PATH:
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc
source ~/.zshrc

(Add it permanently in ~/.zshrc or ~/.bashrc)

πŸš€ Create a New App

Use the new command to scaffold a new Velora application:

velora new myapp

This creates a new directory myapp with:

  • main.go – application entrypoint
  • app/ – default module with service, controller, and DTO
  • __tests__/ – basic tests for service and controller

🧩 Generate a Module

Use the g module command to scaffold a new module:

velora g module user

This generates:

  • user.service.go
  • user.controller.go
  • user.module.go
  • dto/user.dto.go
  • __tests__/user.*_test.go

πŸ”‘ Example

Example service generated by velora g module user:

package user

type Service struct{}

func NewService() *Service { return &Service{} }

func (s *Service) FindAll() []string {
    return []string{"example"}
}

πŸ”§ Troubleshooting

  • If velora command is not found β†’ check your $PATH.
  • If go install fails β†’ ensure Go version >= 1.21 is installed.
  • If modules don’t register β†’ verify you added them in main.go.

πŸ“– Summary

  • velora new [name] β†’ creates a new Velora app
  • velora g module [name] β†’ generates a module scaffold
  • Each module includes service, controller, module, DTO, and tests

Next: learn how to configure middlewares and modules in your Velora app.