create-shiftapi
v0.0.14
Published
Scaffold a new ShiftAPI fullstack app
Downloads
844
Readme
create-shiftapi
Scaffold a new ShiftAPI fullstack app — Go server + typed TypeScript frontend.
Usage
npm create shiftapi@latestOr with pnpm / yarn:
pnpm create shiftapi@latest
yarn create shiftapi@latestYou can also pass the project name directly:
npm create shiftapi@latest my-appWhat You Get
my-app/
cmd/my-app/main.go # Go entry point with graceful shutdown
internal/server/server.go # API routes and handlers
go.mod
.env # PORT config
.gitignore
package.json # Monorepo root with workspaces
apps/web/
package.json # React or Svelte frontend
vite.config.ts # ShiftAPI vite plugin configured
tsconfig.json
index.html
src/
main.tsx (or .ts) # App entry
App.tsx (or .svelte) # Demo component with typed API callsPrompts
| Prompt | Default |
|---|---|
| Project name | my-app |
| Framework | React / Svelte |
| Directory | ./<project-name> |
| Go module path | github.com/<gh-user>/<project-name> if logged into gh, otherwise <project-name> |
| Server port | 8080 |
After Scaffolding
cd my-app
go mod tidy
npm install
npm run devThis starts the Go server and Vite dev server together. The frontend gets fully typed API clients generated from your Go handlers — edit a struct in Go, get instant type errors in TypeScript.
API docs are served at http://localhost:8080/docs.
