Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# deepevents.ai
deepevents.ai main codebase

## Modules

- [`enterprise-tooling`](./enterprise-tooling) - runnable prototype for institutional dashboards, enterprise integrations, webhooks, compliance analytics, and export pipelines.
57 changes: 57 additions & 0 deletions enterprise-tooling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Enterprise Tooling

This module is a self-contained implementation for SCIBASE.AI issue #19. It models enterprise admin dashboards, institutional APIs/webhooks, and export pipelines for research organizations.

## What It Covers

- Organization-wide admin dashboard with project, storage, compute, submission, review, and reproducibility metrics.
- Contributor analytics with activity and collaboration signals.
- Compliance tracking for funder mandates, open-access status, reproducibility scores, and internal tags.
- Secure REST API catalog for institutional repositories, LMS, ELN, inventory, HRIS, and ORCID-style integrations.
- Webhook payloads for project publication and review events.
- Export pipelines for Zenodo, PubMed, arXiv, bioRxiv, journal, and funder-style handoffs.
- Formatting plugin metadata that preserves DOI, ORCID, citations, and version history.

## Run Locally

```bash
cd enterprise-tooling
npm test
npm start
```

Then open `http://localhost:4132`.

## API Surface

- `GET /api/dashboard`
- `GET /api/enterprise/analytics`
- `GET /api/enterprise/catalog`
- `GET /api/enterprise/webhook-preview`
- `GET /api/enterprise/export-preview?target=Zenodo&format=JATS`

## Requirement Mapping

- Admin dashboards: implemented by `buildAdminDashboard`.
- Contributor analytics, usage stats, productivity metrics, compliance tracking, and tags: returned in the dashboard payload.
- API and webhooks: implemented by `buildRestApiCatalog` and `createWebhookEvent`.
- Institutional integrations: represented by DSpace, Canvas, Benchling, and ORCID sync metadata.
- Export pipelines: implemented by `buildExportPipeline`.
- Formatting plugins and preserved metadata: represented by pipeline plugin lists and preserved DOI/ORCID/citation/version fields.

## Verification

```bash
npm test
node src/server.js
```

Optional smoke checks:

```bash
curl -s http://localhost:4132/api/dashboard
curl -s http://localhost:4132/api/enterprise/webhook-preview
curl -s "http://localhost:4132/api/enterprise/export-preview?target=Zenodo&format=JATS"
```

Demo artifacts are committed under `docs/demo/`, including `dashboard.png` and `enterprise-tooling-demo.mp4`.
6 changes: 6 additions & 0 deletions enterprise-tooling/docs/demo-script.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Demo Script

1. Run `npm test` to verify dashboard metrics, API catalog, webhooks, and export pipelines.
2. Run `npm start` and open `http://localhost:4132`.
3. Confirm the dashboard shows enterprise metrics, integrations, compliance rows, and export metadata.
4. Smoke-test `/api/enterprise/webhook-preview` and `/api/enterprise/export-preview?target=Zenodo&format=JATS`.
Binary file added enterprise-tooling/docs/demo/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
14 changes: 14 additions & 0 deletions enterprise-tooling/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@scibase/enterprise-tooling",
"version": "0.1.0",
"private": true,
"description": "Self-contained enterprise tooling prototype for SCIBASE.AI issue #19.",
"type": "module",
"scripts": {
"start": "node src/server.js",
"test": "node --test test/*.test.js"
},
"engines": {
"node": ">=20"
}
}
28 changes: 28 additions & 0 deletions enterprise-tooling/public/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const payload = await fetch("/api/dashboard").then((response) => response.json());

document.querySelector("#orgName").textContent = payload.dashboard.organization;
document.querySelector("#overview").innerHTML = [
row("Projects", payload.dashboard.overview.projects),
row("Storage", `${payload.dashboard.overview.storageGb} GB`),
row("Compute", `${payload.dashboard.overview.computeHours} hours`),
row("Average reproducibility", payload.dashboard.overview.averageReproducibility)
].join("");

document.querySelector("#api").innerHTML = payload.api.integrations
.map((integration) => `<div class="row"><strong>${integration.name}</strong><span>${integration.type} · ${integration.enabled ? "enabled" : "disabled"}</span></div>`)
.join("");

document.querySelector("#compliance").innerHTML = payload.dashboard.compliance
.map((item) => `<div class="row"><strong>${item.projectId}</strong><span>${item.mandate} · ${item.status} · score ${item.reproducibilityScore}</span></div>`)
.join("");

document.querySelector("#export").innerHTML = [
row("Target", payload.exportPipeline.target),
row("Format", payload.exportPipeline.format),
row("Compliance", payload.exportPipeline.complianceStatus),
row("Preserves", payload.exportPipeline.preservedMetadata.join(", "))
].join("");

function row(label, value) {
return `<div class="row"><span>${label}</span><strong>${String(value)}</strong></div>`;
}
40 changes: 40 additions & 0 deletions enterprise-tooling/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>SCIBASE Enterprise Tooling</title>
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<main class="shell">
<header>
<p>SCIBASE.AI / issue #19</p>
<h1>Enterprise Tooling</h1>
</header>
<section class="grid">
<article class="panel hero">
<p class="label">Admin Dashboard</p>
<h2 id="orgName">Loading...</h2>
<div id="overview"></div>
</article>
<article class="panel">
<p class="label">API & Webhooks</p>
<h2>Institutional integrations</h2>
<div id="api"></div>
</article>
<article class="panel">
<p class="label">Compliance</p>
<h2>Funder and open-access status</h2>
<div id="compliance"></div>
</article>
<article class="panel">
<p class="label">Export Pipeline</p>
<h2>Publication handoff</h2>
<div id="export"></div>
</article>
</section>
</main>
<script type="module" src="/app.js"></script>
</body>
</html>
110 changes: 110 additions & 0 deletions enterprise-tooling/public/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
:root {
--ink: #141816;
--muted: #63706b;
--line: #d8dfda;
--paper: #f5f4ed;
--panel: #ffffff;
--green: #17664c;
--blue: #285f8e;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
background: var(--paper);
color: var(--ink);
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
max-width: 1280px;
margin: 0 auto;
padding: 32px;
}

header {
display: flex;
align-items: end;
justify-content: space-between;
gap: 24px;
margin-bottom: 24px;
}

p,
h1,
h2 {
margin: 0;
}

header p,
.label {
color: var(--muted);
font-size: 12px;
font-weight: 900;
letter-spacing: 0.08em;
text-transform: uppercase;
}

h1 {
max-width: 760px;
font-size: clamp(38px, 6vw, 76px);
line-height: 0.95;
}

h2 {
margin-top: 8px;
font-size: 24px;
}

.grid {
display: grid;
grid-template-columns: 1.05fr 0.95fr;
gap: 16px;
}

.panel {
min-height: 260px;
border: 1px solid var(--line);
background: var(--panel);
padding: 24px;
}

.hero {
grid-row: span 2;
}

.row {
border-top: 1px solid var(--line);
padding-top: 12px;
margin-top: 14px;
}

.row span {
display: block;
color: var(--muted);
}

.row strong {
display: block;
color: var(--green);
overflow-wrap: anywhere;
}

.hero .row strong {
color: var(--blue);
}

@media (max-width: 820px) {
.shell {
padding: 18px;
}

header,
.grid {
display: grid;
grid-template-columns: 1fr;
}
}
Loading