|
| 1 | +# Dynamia Platform – Packages |
| 2 | + |
| 3 | +This directory is a **pnpm monorepo** containing all official Node.js / TypeScript packages for [Dynamia Platform](https://www.dynamia.tools) — the full-stack Java 25 enterprise framework. |
| 4 | + |
| 5 | +These packages allow frontend developers to interact with Dynamia Platform backends, build rich UIs, and integrate with the platform from the JavaScript/TypeScript ecosystem. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## 📦 Packages |
| 10 | + |
| 11 | +| Package | Description | |
| 12 | +|---------|-------------| |
| 13 | +| `@dynamia-tools/sdk` | JavaScript/TypeScript client SDK for Dynamia Platform REST APIs | |
| 14 | +| `@dynamia-tools/vue` | Vue 3 integration — composables, components, and plugins for Dynamia Platform | |
| 15 | +| `@dynamia-tools/ui` | Headless UI components and utilities aligned with Dynamia Platform's view descriptors | |
| 16 | +| `@dynamia-tools/forms` | Dynamic form generation driven by Dynamia Platform view descriptors | |
| 17 | +| `@dynamia-tools/auth` | Authentication and session management helpers | |
| 18 | + |
| 19 | +> **Note:** Packages are added progressively. Check each sub-folder for its own `README.md` and `CHANGELOG.md`. |
| 20 | +
|
| 21 | +--- |
| 22 | + |
| 23 | +## 🗂️ Repository Structure |
| 24 | + |
| 25 | +``` |
| 26 | +packages/ |
| 27 | +├── sdk/ # @dynamia-tools/sdk – Core API client |
| 28 | +├── vue/ # @dynamia-tools/vue – Vue 3 integration |
| 29 | +├── ui/ # @dynamia-tools/ui – UI components |
| 30 | +├── forms/ # @dynamia-tools/forms – Dynamic forms |
| 31 | +├── auth/ # @dynamia-tools/auth – Auth helpers |
| 32 | +└── README.md # This file |
| 33 | +``` |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## 🚀 Getting Started |
| 38 | + |
| 39 | +### Prerequisites |
| 40 | + |
| 41 | +- [Node.js](https://nodejs.org) >= 20 |
| 42 | +- [pnpm](https://pnpm.io) >= 9 |
| 43 | + |
| 44 | +### Install dependencies |
| 45 | + |
| 46 | +```bash |
| 47 | +pnpm install |
| 48 | +``` |
| 49 | + |
| 50 | +### Build all packages |
| 51 | + |
| 52 | +```bash |
| 53 | +pnpm build |
| 54 | +``` |
| 55 | + |
| 56 | +### Run tests |
| 57 | + |
| 58 | +```bash |
| 59 | +pnpm test |
| 60 | +``` |
| 61 | + |
| 62 | +### Run a specific package script |
| 63 | + |
| 64 | +```bash |
| 65 | +pnpm --filter @dynamia-tools/sdk build |
| 66 | +pnpm --filter @dynamia-tools/vue dev |
| 67 | +``` |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## ⚙️ Workspace Configuration |
| 72 | + |
| 73 | +The monorepo is managed with **pnpm workspaces**. The workspace root `pnpm-workspace.yaml` declares all packages: |
| 74 | + |
| 75 | +```yaml |
| 76 | +packages: |
| 77 | + - 'packages/*' |
| 78 | +``` |
| 79 | +
|
| 80 | +Shared dev dependencies (TypeScript, Vite, Vitest, ESLint, etc.) are hoisted to the root `package.json` to avoid duplication. |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## 🔗 Using the SDK |
| 85 | + |
| 86 | +```typescript |
| 87 | +import { DynamiaClient } from '@dynamia-tools/sdk'; |
| 88 | +
|
| 89 | +const client = new DynamiaClient({ |
| 90 | + baseUrl: 'https://your-dynamia-app.com/api', |
| 91 | + token: 'your-access-token', |
| 92 | +}); |
| 93 | +
|
| 94 | +// Fetch entities |
| 95 | +const books = await client.crud('Book').findAll(); |
| 96 | +
|
| 97 | +// Create entity |
| 98 | +await client.crud('Book').create({ title: 'Clean Code', author: 'Robert C. Martin' }); |
| 99 | +``` |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +--- |
| 104 | + |
| 105 | +## 🤝 Contributing |
| 106 | + |
| 107 | +1. Fork the repository and create a feature branch. |
| 108 | +2. Make your changes inside the relevant package. |
| 109 | +3. Add or update tests in the same package. |
| 110 | +4. Run `pnpm test` from the root to verify all packages pass. |
| 111 | +5. Open a Pull Request targeting `main`. |
| 112 | + |
| 113 | +Please read the root [CONTRIBUTING.md](../../../../CONTRIBUTING.md) for more details. |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | +## 📄 License |
| 118 | + |
| 119 | +[Apache License 2.0](../../../../LICENSE) — © Dynamia Soluciones IT SAS |
| 120 | + |
0 commit comments