create-gh-app
v1.0.4
Published
CLI tool to bootstrap a new GH App with custom folder names
Downloads
505
Readme
GH App Boilerplate & CLI
This repository contains a professional-grade boilerplate for building web applications with a NestJS backend and Next.js frontend, along with a CLI tool to bootstrap new projects.
🚀 Key Features
- One-Step Registration: Simplified auth flow (Register -> Dashboard).
- Unified Profile: A single, clean profile model for all users.
- Core Modules: Auth, Chat, Payment, Profile, Notification, and Upload.
- CLI Tool: Bootstrap new projects with custom folder names via
npx create-gh-app.
📦 Publishing to NPM
To use this like npx create-next-app, you need to publish it to the NPM registry.
- Login to NPM:
npm login - Publish the Package:
From the
boilerplate/directory, run:
Note: Make sure thenpm publishnameinpackage.jsonis unique (e.g.,create-gh-appor your chosen name).
🛠️ Usage with npx
Once published, you can start a new project from anywhere:
npx create-gh-appThe CLI will prompt you for:
- Project Name (e.g.,
my-cool-app) - Backend Folder Name (default:
gh-be) - Frontend Folder Name (default:
gh-fe)
It will then:
- Create the project directory.
- Copy the templates into your custom-named folders.
- Update
package.jsonwith the new project name. - Initialize a git repository.
🏗️ Local Development & Testing
If you want to test the CLI locally without publishing:
- Link the package:
cd boilerplate npm link - Run the CLI:
create-gh-app
⚙️ Project Setup (After Bootstrapping)
Each project folder (backend/frontend) comes with its own .env.example.
Backend:
cd <backend-folder>npm installcp .env.example .envnpx prisma db pushnpm run start:dev
Frontend:
cd <frontend-folder>npm installcp .env.example .envnpm run dev
📄 License
MIT
