create-zango-app
v1.0.18
Published
Create Zango CRM React applications with no build configuration
Maintainers
Readme
create-zango-app
Create Zango CRM React applications with no build configuration.
Quick Start
npx create-zango-app my-app
cd my-app
npm run devCreating an App
You'll need to have Node 14.0.0 or later version on your local development machine.
To create a new app, you may choose one of the following methods:
npx
npx create-zango-app my-appnpm
npm init zango-app my-appYarn
yarn create zango-app my-apppnpm
pnpm create zango-app my-appIt will create a directory called my-app inside the current folder.
Inside that directory, it will generate the initial project structure and install the transitive dependencies.
Options
create-zango-app <project-directory> [options]Options:
--verbose- Print additional logs--info- Print environment debug info--use-npm- Use npm instead of yarn or pnpm--use-pnpm- Use pnpm instead of npm or yarn--typescript- Use TypeScript template--skip-install- Skip installing dependencies
Project Structure
Once the installation is done, you can open your project folder:
my-app/
├── node_modules/
├── public/
│ └── index.html
├── src/
│ ├── custom/
│ │ └── pages/
│ │ ├── Dashboard.js # Sample custom page
│ │ └── index.js # Export your custom pages here
│ ├── index.js # App entry point
│ └── index.css # Custom styles
├── .env.example # Environment variables template
├── .gitignore
├── db.json # Mock API data
├── mock-server.js # Mock API server
├── package.json
├── tailwind.config.js
└── vite.config.jsThe entire framework is provided by the @zango-core/crm-framework package. You only need to:
- Create custom pages in
src/custom/pages/ - Export them in
src/custom/pages/index.js - Configure routes in your API or mock data
Available Scripts
In the project directory, you can run:
npm run dev
Runs the app in development mode. Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
npm run dev-mock
Runs both the development server and mock API server concurrently.
- App: http://localhost:3000
- Mock API: http://localhost:3001
npm run build
Builds the app for production to the dist folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
npm run preview
Preview the production build locally.
Features
- Plugin-based Architecture: Dynamic page rendering based on API configuration
- CRUD Operations: Auto-generated tables with full CRUD support
- Profile360: Comprehensive entity profile pages
- Custom Pages: Support for user-defined components
- Theme System: CSS variables-based theming with Tailwind CSS v4
- Smart Navigation: Automatic routing between React Router and server routes
- Mock API Server: Built-in json-server for development
Configuration
API Endpoints
Configure API endpoints in zango.config.js:
api: {
endpoints: {
development: 'http://localhost:8000',
staging: 'https://staging-api.example.com',
production: 'https://api.example.com',
mock: 'http://localhost:3001',
}
}Theme Customization
Modify the theme in zango.config.js:
theme: {
colors: {
primary: '#1890ff',
secondary: '#52c41a',
// ... other colors
}
}Learn More
License
MIT
