@snapy/cli
v1.0.7
Published
Interactive CLI to scaffold Snapy enterprise apps
Downloads
1,195
Maintainers
Readme
@snapy/cli
The official CLI framework for scaffolding and extending Snapy enterprise applications. This tool provides a highly scalable monorepo setup powered by Next.js, Express, PostgreSQL, Redis, RabbitMQ, and more.
Features
- Scaffold Monorepos: Instantly generate a production-ready monorepo with integrated frontends (
app-web,admin-web,venue-owner-web) and backends (http-backend,ws-backend). - Modular Blocks: Seamlessly add pre-built functional modules (e.g.,
auth,bookings,venues,crm) that auto-resolve their dependencies via the CLI. - Core Infrastructure Tracking: Automatically tracks and installs required infrastructure services (e.g., databases, caches) for the blocks you install.
- Dynamic Theming: Add and switch UI themes dynamically across your entire monorepo using
@workspace/branding.
Installation
You can run the CLI directly using npx:
npx @snapy/cli create-app my-appOr install it globally:
npm install -g @snapy/cliCore Commands
create-app [dir]
Scaffolds a new Snapy monorepo project.
snapy create-app ./my-snapy-projectadd <module>
Adds a specific business block to your project. The CLI will automatically check for any missing dependencies or core providers (like database or auth-service) and install them.
snapy add auth
snapy add bookings
snapy add venuesbrand add <name>
Installs a new UI theme. The UI package @workspace/branding will be updated to point to the new theme's tokens and components dynamically.
snapy brand add my-custom-themebrand list
Lists all available UI themes installed in your workspace.
snapy brand listArchitecture
The Snapy CLI relies on a declarative graph of manifests (module.json and provider.json). By reading these manifests, the CLI ensures your monorepo remains structurally sound as you add new features and blocks.
- Blocks (
blocks/): Business logic domains (e.g.,bookings,finance). - Core (
core/): Low-level infrastructure and generic microservices (e.g.,auth-service,database-prisma). - Base (
base/): The core monorepo foundation packages (@workspace/branding,@workspace/db,@workspace/core-screens).
License
MIT
