feat: scaffold API, client, or monorepo projects with Nuxt/Vue client support

- draft new now offers API, Client, or Full Stack (monorepo) project shapes
- draft new client scaffolds a Nuxt or Vue app via the official nuxi/create-vue
  tooling, with a Draft-maintained auth/API overlay layered on top
- draft new monorepo combines a scaffolded API and client under one root
  with go.work, pnpm-workspace.yaml, and docker-compose wiring
- assets/embedded restructured into api/monorepo-root/client-nuxt/client-vue
  zones, synced via a generalized, job-based sync tool
This commit is contained in:
FernandoJVideira committed 2026-08-25 21:33:00 +01:00
1 parent fe48b7caee
commit 29f94539e0
7 files changed
+724 -99

No files matched your search

+31 -4
View File
@@ -1,15 +1,18 @@
package cmd
import (
"fmt"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
)
const oldModuleName = "github.com/FernandoJVideira/api_tmpl"
const srcDir = "embedded/api_tmpl"
const oldModuleName = "app_tmpl"
type MainTemplateData struct {
ModuleName string
UseGRPC bool
ModuleName string
ServiceName string
UseGRPC bool
}
func init() {
@@ -22,3 +25,27 @@ var newCmd = &cobra.Command{
Long: `Create a new Draft project with the necessary structure and files.`,
Run: genProject,
}
func genProject(cmd *cobra.Command, args []string) {
projType := promptui.Select{
Label: "Select Project Type",
Items: []string{"API", "Client", "Full Stack"},
}
_, result, err := projType.Run()
if err != nil {
fmt.Printf("Prompt failed %v\n", err)
return
}
switch result {
case "API":
genAPI(cmd, args)
case "Client":
genClient(cmd, args)
case "Full Stack":
genMonorepo(cmd, args)
default:
fmt.Println("Invalid selection")
}
}