@mounaji_npm/cli
v0.4.2
Published
CLI to scaffold a new Mounaji SaaS app — full Next.js template with selectable modules
Maintainers
Readme
@mounaji_npm/cli
CLI scaffolder for Mounaji SaaS applications. Generates a complete Next.js or Vite+React project with AppShell, your chosen modules, optional i18n, optional Docker infrastructure, and an mn-config.js branding file — all in one command.
Usage
No install needed — run directly with npx:
npx @mounaji_npm/cli create my-saas-appOr install globally:
npm install -g @mounaji_npm/cli
mounaji create my-saas-appmounaji create
Interactive project scaffolder.
mounaji create <project-name>
# Examples
mounaji create my-app
mounaji create . # scaffold into current directory
npx @mounaji_npm/cli create my-appInteractive prompts
The CLI asks the following questions in order:
1. Project name → folder name (default: argument passed)
2. Framework → Next.js App Router | Vite + React
3. Modules to include → multiselect from the full module list (or 'a' for all)
4. Include admin controls / DevToolbar? → y/n
5. Auth provider → Firebase | None
6. Include i18n? → y/n
↳ Select languages → en (base), es, pt, zh, de (multiselect or 'a')
↳ Default locale → which locale to start on
↳ Show switcher? → y/n
7. Add Docker setup? → y/nAvailable modules
| ID | Label | Installs |
|---|---|---|
| home | Home | (included in AppShell) |
| dashboard | Dashboard | @mounaji_npm/dashboard |
| chat | Chat | @mounaji_npm/chat |
| assistants | Assistants | @mounaji_npm/assistant |
| knowledge-base | Knowledge Base | @mounaji_npm/knowledge-base |
| tasks | Tasks | — |
| connections | Connections | — |
| settings | Settings | (included) |
| inventory | Inventory | — |
| contacts | Contacts | — |
| workflows | Workflows | — |
| platforms | Platforms | — |
| pricing | Pricing | — |
Generated Output
Next.js App Router
my-app/
├── app/
│ ├── layout.js ← AppShell wired with selected modules
│ ├── page.js ← Home page
│ ├── dashboard/page.js ← (if selected)
│ ├── chat/page.js ← (if selected)
│ ├── assistants/page.js ← (if selected)
│ └── .../page.js ← one file per selected module
├── locales/ ← (if i18n selected)
│ ├── en.js
│ └── es.js ← (one per selected language)
├── mn-config.js ← branding + token overrides + custom module slots
├── .env.local ← env variable template
├── docker-compose.yml ← (if Docker selected)
├── Dockerfile ← (if Docker selected)
└── package.json ← all required @mounaji_npm/* deps pre-wiredVite + React
my-app/
├── src/
│ ├── App.jsx ← BrowserRouter + AppShell + Routes
│ ├── main.jsx
│ └── pages/
│ └── [Module]Page.jsx ← one per selected module
├── index.html
├── locales/ ← (if i18n selected)
├── mn-config.js
├── .env
└── package.jsonAfter Scaffolding
cd my-app
npm install
npm run dev- Next.js starts on
http://localhost:3000 - Vite starts on
http://localhost:5173
mounaji add docker
Add Docker production infrastructure to an existing project:
cd my-existing-app
mounaji add docker
# or
npx @mounaji_npm/dockerThis runs the same Docker generator as the create command's Docker prompt. See @mounaji_npm/docker for what gets generated.
mn-config.js
The generated mn-config.js is the branding and configuration file for your app. Edit it to customize your app without touching the generated layout files:
// mn-config.js
export default {
appName: 'My SaaS App',
// Replace with your logo (React component, <img>, or null for text)
logo: null,
// Token overrides — change colors, fonts, radii
tokens: {
colorPrimary: '#7C3AED',
colorAccent: '#06B6D4',
fontFamily: '"Geist", system-ui, sans-serif',
radiusMd: '10px',
},
// Extra custom module manifests added to AppShell
modules: [
// {
// id: 'my-page',
// label: 'My Page',
// icon: '🚀',
// path: '/my-page',
// section: 'Workspace',
// order: 20,
// },
],
};Environment Variables
The generated .env.local (Next.js) or .env (Vite) includes placeholders for common services:
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Firebase (if auth selected)
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
# Backend API
NEXT_PUBLIC_API_URL=http://localhost:5000
# Mounaji widget (if chat selected)
NEXT_PUBLIC_MOUNAJI_API_KEY=