# create-cundi-app

Create a new Cundi web application with React + Refine + Ant Design.

[![npm version](https://img.shields.io/npm/v/create-cundi-app.svg)](https://www.npmjs.com/package/create-cundi-app)

## Quick Start

```bash
# Using npm
npm create cundi-app@latest my-app

# Using npx
npx create-cundi-app my-app

# Using yarn
yarn create cundi-app my-app

# Using pnpm
pnpm create cundi-app my-app
```

## What's Included

The generated project includes:

| Category | Technology |
|----------|------------|
| Framework | React 19 + TypeScript |
| Build Tool | Vite |
| UI Library | Ant Design |
| Metasystem | [Refine](https://refine.dev/) |
| Core SDK | [@cundi/refine-xaf](https://www.npmjs.com/package/@cundi/refine-xaf) |

### Features

- 🔐 **Dual Authentication**: Local login + Keycloak SSO
- 👤 **User Management**: Pre-built user CRUD pages
- 🛡️ **RBAC**: Role-based Access Control
- 🌍 **i18n**: English and Traditional Chinese
- 🌙 **Dark Mode**: Theme toggle support
- 🤖 **AI Assistant**: Persistent right-side chat panel (Optional)
- 📊 **Dashboard**: Starter template

## After Creating

```bash
cd my-app
npm install
cp .env.example .env  # Configure your API URL
npm run dev
```

### Environment Variables

Edit `.env` to configure:

```env
VITE_API_URL=http://localhost:5000/api

# Keycloak (Optional)
VITE_KEYCLOAK_URL=http://localhost:8080
VITE_KEYCLOAK_REALM=your-realm
VITE_KEYCLOAK_CLIENT_ID=your-client-id
VITE_REDIRECT_URI=http://localhost:5173/auth/callback
```

## Documentation

- [Cundi Development Guide](https://github.com/antonylu0826/Cundi/blob/main/Development_Guide.md)
- [@cundi/refine-xaf SDK](https://www.npmjs.com/package/@cundi/refine-xaf)
- [Refine Documentation](https://refine.dev/docs/)

## Related

- [cundiapi](https://www.nuget.org/packages/Cundi.Api.Template) - Backend template for .NET

## License

MIT
