@fumi-ops/cora 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +154 -0
- package/dist/cora.js +2 -0
- package/dist/cora.mjs +3343 -0
- package/package.json +72 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Varun A P
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Cora
|
|
2
|
+
|
|
3
|
+
[](https://github.com/fumi-ops/cora/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@fumi-ops/cora)
|
|
5
|
+
[](https://github.com/fumi-ops/cora/blob/main/LICENSE)
|
|
6
|
+
[](https://github.com/fumi-ops/cora)
|
|
7
|
+
|
|
8
|
+
AI Agent-Ready Local-First Dashboards.
|
|
9
|
+
|
|
10
|
+
Cora is a file-driven dashboard runtime: `dashboard.json` is rendered live, while `cora.config.yaml` defines source bindings and refresh behavior.
|
|
11
|
+
|
|
12
|
+
The development workflow uses Bun, while the published CLI runs as Node-compatible JavaScript.
|
|
13
|
+
|
|
14
|
+
## Quick start
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# install all workspace dependencies (CLI + UI + internal packages)
|
|
18
|
+
bun install
|
|
19
|
+
bun run src/cli.ts init --template saas
|
|
20
|
+
bun run src/cli.ts serve
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Open `http://127.0.0.1:4242`.
|
|
24
|
+
|
|
25
|
+
Global install target:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g @fumi-ops/cora
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Workspace files
|
|
32
|
+
|
|
33
|
+
- `dashboard.json`: rendered dashboard values (agent-writable)
|
|
34
|
+
- `cora.config.yaml`: source and widget binding config
|
|
35
|
+
- `cora.cache.json`: auto-managed source cache state
|
|
36
|
+
- `.env`: optional project credentials
|
|
37
|
+
- `CORA_AGENT_INSTRUCTIONS.md`: generated agent contract
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
cora init [--template <name>] [--list-templates] [--force]
|
|
43
|
+
cora serve [--port <n>] [--no-open] [--no-fetch] [--file <path>] [--config <path>]
|
|
44
|
+
cora fetch [--source <id>] [--file <path>] [--config <path>]
|
|
45
|
+
cora validate [--file <path>] [--config <path>]
|
|
46
|
+
cora export [--file <path>] [--out <path>]
|
|
47
|
+
cora sources list [--config <path>]
|
|
48
|
+
cora config set <key> [--value <secret>]
|
|
49
|
+
cora config get <key>
|
|
50
|
+
cora config unset <key>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Template names:
|
|
54
|
+
|
|
55
|
+
- `starter`
|
|
56
|
+
- `saas`
|
|
57
|
+
- `ecommerce`
|
|
58
|
+
- `freelancer`
|
|
59
|
+
- `developer`
|
|
60
|
+
|
|
61
|
+
## Connector support
|
|
62
|
+
|
|
63
|
+
Built-in connectors:
|
|
64
|
+
|
|
65
|
+
- `postgres`
|
|
66
|
+
- `mysql`
|
|
67
|
+
- `sqlite`
|
|
68
|
+
- `duckdb`
|
|
69
|
+
- `http`
|
|
70
|
+
- `stripe`
|
|
71
|
+
- `plausible`
|
|
72
|
+
- `github`
|
|
73
|
+
|
|
74
|
+
Named query examples:
|
|
75
|
+
|
|
76
|
+
- Stripe: `mrr`, `arr`, `new_customers_today`, `revenue_mtd`, `churn_rate`, `active_subscriptions`
|
|
77
|
+
- Plausible: `visitors_today`, `visitors_mtd`, `top_pages`, `bounce_rate`
|
|
78
|
+
- GitHub: `stars`, `open_issues`, `open_prs`, `commits_today`
|
|
79
|
+
|
|
80
|
+
Credential values are resolved in this order:
|
|
81
|
+
|
|
82
|
+
1. Shell environment variable
|
|
83
|
+
2. Project `.env`
|
|
84
|
+
3. Encrypted store `~/.cora/store.enc`
|
|
85
|
+
|
|
86
|
+
## Community connectors
|
|
87
|
+
|
|
88
|
+
Cora auto-discovers connector packages from local `node_modules` with the prefix `cora-connector-*` (including scoped packages like `@acme/cora-connector-foo`).
|
|
89
|
+
|
|
90
|
+
If a source uses `type: foo`, install a package that exports connector `foo` and Cora will load it at runtime.
|
|
91
|
+
|
|
92
|
+
## Agent write endpoint
|
|
93
|
+
|
|
94
|
+
Agents can patch a single widget without direct file access:
|
|
95
|
+
|
|
96
|
+
```http
|
|
97
|
+
POST http://127.0.0.1:4242/api/widget
|
|
98
|
+
Content-Type: application/json
|
|
99
|
+
|
|
100
|
+
{ "id": "mrr", "value": 4800, "trend": "+14%" }
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Requirements
|
|
104
|
+
|
|
105
|
+
- Node.js `>=22.13.0`
|
|
106
|
+
|
|
107
|
+
## UI stack
|
|
108
|
+
|
|
109
|
+
- React 19
|
|
110
|
+
- Basecoat CSS
|
|
111
|
+
- Chart.js
|
|
112
|
+
- Tailwind CSS
|
|
113
|
+
- SSE from the local dashboard server
|
|
114
|
+
|
|
115
|
+
Develop or build the UI bundle from the root workspace:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
bun run dev:ui
|
|
119
|
+
bun run build:ui
|
|
120
|
+
bun run check:embedded-ui
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Validation commands:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
bun run typecheck
|
|
127
|
+
bun run lint
|
|
128
|
+
bun run test
|
|
129
|
+
bun run ci
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Security model
|
|
133
|
+
|
|
134
|
+
- Connector calls run in the local CLI process only.
|
|
135
|
+
- Browser never receives credential values.
|
|
136
|
+
- Server binds to `127.0.0.1`.
|
|
137
|
+
- Credentials stored with AES-256-GCM in `~/.cora/store.enc`.
|
|
138
|
+
- Secret material is local-only (`~/.cora/master.key`) with restricted file permissions.
|
|
139
|
+
|
|
140
|
+
## Contributing
|
|
141
|
+
|
|
142
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for local development setup, test commands, and pull request expectations.
|
|
143
|
+
|
|
144
|
+
## Security disclosures
|
|
145
|
+
|
|
146
|
+
See [SECURITY.md](SECURITY.md) to report vulnerabilities privately.
|
|
147
|
+
|
|
148
|
+
## Code of conduct
|
|
149
|
+
|
|
150
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
|
|
151
|
+
|
|
152
|
+
## License
|
|
153
|
+
|
|
154
|
+
[MIT](LICENSE)
|
package/dist/cora.js
ADDED