Skip to content

Commit 463432a

Browse files
Initialize pnpm workspace and add TypeScript configuration for SDK development
1 parent bbe847b commit 463432a

File tree

6 files changed

+2854
-0
lines changed

6 files changed

+2854
-0
lines changed

platform/packages/.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
access=public
2+
registry=https://registry.npmjs.org/
3+

platform/packages/README.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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+

platform/packages/package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@dynamia-tools/workspace",
3+
"version": "26.3.0",
4+
"private": true,
5+
"description": "pnpm monorepo for Dynamia Platform Node.js / TypeScript packages",
6+
"scripts": {
7+
"build": "pnpm -r run build",
8+
"test": "pnpm -r run test",
9+
"lint": "pnpm -r run lint",
10+
"clean": "pnpm -r run clean",
11+
"typecheck": "pnpm -r run typecheck",
12+
"publish:all": "pnpm -r publish --access public --no-git-checks"
13+
},
14+
"devDependencies": {
15+
"@types/node": "^22.0.0",
16+
"typescript": "^5.7.0",
17+
"vite": "^6.2.0",
18+
"vite-plugin-dts": "^4.5.0",
19+
"vitest": "^3.0.0",
20+
"@vitest/coverage-v8": "^3.0.0",
21+
"eslint": "^9.0.0",
22+
"prettier": "^3.5.0"
23+
},
24+
"engines": {
25+
"node": ">=20",
26+
"pnpm": ">=9"
27+
},
28+
"license": "Apache-2.0"
29+
}
30+

0 commit comments

Comments
 (0)