|
1 | 1 | # Mixcore JavaScript SDK |
2 | 2 |
|
3 | | -This monorepo contains modular, framework-agnostic packages for Mixcore projects. |
| 3 | + |
| 4 | + |
| 5 | +Modular, framework-agnostic SDK for Mixcore projects. Built with TypeScript and distributed as ESM/CJS modules. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **Modular architecture**: Import only what you need |
| 10 | +- **TypeScript-first**: Full type safety and autocompletion |
| 11 | +- **Framework-agnostic**: Works with any JavaScript framework |
| 12 | +- **Production-ready**: Well-tested and documented |
4 | 13 |
|
5 | 14 | ## Packages |
6 | 15 |
|
7 | | -- **@mixcore/shared**: Utilities, helpers, constants |
8 | | -- **@mixcore/base**: Base classes, abstract models, interfaces |
9 | | -- **@mixcore/apis**: API clients, endpoint wrappers, schema types |
| 16 | +| Package | Description | |
| 17 | +|--------|-------------| |
| 18 | +| [@mixcore/shared](packages/shared) | Shared utilities, helpers and constants | |
| 19 | +| [@mixcore/base](packages/base) | Base classes, abstract models and interfaces | |
| 20 | +| [@mixcore/api](packages/api) | API clients and endpoint wrappers | |
| 21 | +| [@mixcore/config](packages/config) | Configuration management | |
| 22 | +| [@mixcore/database](packages/database) | Database domain services | |
| 23 | +| [@mixcore/file](packages/file) | File handling utilities | |
| 24 | +| [@mixcore/user](packages/user) | User/auth services | |
| 25 | +| [@mixcore/template](packages/template) | Template rendering services | |
10 | 26 |
|
11 | 27 | ## Getting Started |
12 | 28 |
|
13 | | -Each package contains its own README with usage examples. See `/packages/*/README.md` for details. |
| 29 | +### Installation |
| 30 | + |
| 31 | +```bash |
| 32 | +npm install @mixcore/api @mixcore/database # or whichever packages you need |
| 33 | +``` |
| 34 | + |
| 35 | +### Usage Example |
| 36 | + |
| 37 | +```typescript |
| 38 | +import { ApiService } from '@mixcore/api'; |
| 39 | +import { ModuleDataService } from '@mixcore/database'; |
| 40 | + |
| 41 | +const api = new ApiService({ apiBaseUrl: 'https://api.mixcore.net' }); |
| 42 | +const dataService = new ModuleDataService({ api }); |
| 43 | + |
| 44 | +// Use services... |
| 45 | +``` |
14 | 46 |
|
15 | 47 | ## Development |
16 | 48 |
|
17 | | -- All code is TypeScript-first. |
18 | | -- Build outputs: ESM, CJS, and type declarations. |
19 | | -- Tests: Run `npm test` or `yarn test` from the root. |
| 49 | +### Prerequisites |
| 50 | + |
| 51 | +- Node.js 18+ |
| 52 | +- pnpm |
| 53 | + |
| 54 | +### Setup |
| 55 | + |
| 56 | +```bash |
| 57 | +git clone https://github.com/mixcore/javascript-sdk.git |
| 58 | +cd javascript-sdk |
| 59 | +pnpm install |
| 60 | +``` |
| 61 | + |
| 62 | +### Building |
| 63 | + |
| 64 | +```bash |
| 65 | +pnpm build |
| 66 | +``` |
| 67 | + |
| 68 | +### Testing |
| 69 | + |
| 70 | +```bash |
| 71 | +pnpm test |
| 72 | +``` |
| 73 | + |
| 74 | +## Contributing |
| 75 | + |
| 76 | +Contributions welcome! Please see our [Contribution Guidelines](CONTRIBUTING.md). |
20 | 77 |
|
21 | 78 | ## License |
22 | 79 |
|
23 | | -Mixcore Community License (MCL) or compatible OSS license. See LICENSE file for details. |
| 80 | +Mixcore Community License (MCL). See [LICENSE](LICENSE) for details. |
0 commit comments