Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
Merged
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 .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.git
.user
cli/
docs/
dpkit/
site/
**/node_modules
**/build
**/compile
Expand Down
11 changes: 0 additions & 11 deletions app/helpers/rpc.ts

This file was deleted.

7 changes: 0 additions & 7 deletions app/logger.ts

This file was deleted.

8 changes: 0 additions & 8 deletions app/routes/package/validate/services.ts

This file was deleted.

34 changes: 0 additions & 34 deletions app/rpc.ts

This file was deleted.

3 changes: 3 additions & 0 deletions browser/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @dpkit/browser

dpkit is a fast data management framework built on top of the Data Package standard and Polars DataFrames. It supports various formats like CSV, JSON, and Parquet and integrates with data platforms such as CKAN, Zenodo, and GitHub. For more information, please visit the [documentation portal](https://dpkit.dev).
File renamed without changes.
27 changes: 27 additions & 0 deletions browser/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@dpkit/browser",
"type": "module",
"version": "0.0.0-dev",
"private": true,
"exports": "./build/index.js",
"sideEffects": false,
"license": "MIT",
"author": "Evgeny Karev",
"repository": "https://github.com/datisthq/dpkit",
"description": "Fast TypeScript data management framework built on top of the Data Package standard and Polars DataFrames",
"keywords": [
"data",
"polars",
"dataframe",
"datapackage",
"tableschema",
"typescript",
"validation",
"quality",
"fair",
"browser"
],
"scripts": {
"build": "tsc"
}
}
3 changes: 3 additions & 0 deletions browser/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../tsconfig.json"
}
2 changes: 1 addition & 1 deletion app/Dockerfile → cloud/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN pnpm install:ci
RUN pnpm build

EXPOSE 8080
CMD ["node", "app/rpc.ts"]
CMD ["node", "cloud/api/server.ts"]
2 changes: 1 addition & 1 deletion app/README.md → cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @dpkit/app
# @dpkit/cloud

dpkit is a fast data management framework built on top of the Data Package standard and Polars DataFrames. It supports various formats like CSV, JSON, and Parquet and integrates with data platforms such as CKAN, Zenodo, and GitHub. For more information, please visit the [documentation portal](https://dpkit.dev).
9 changes: 9 additions & 0 deletions cloud/api/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "client-only"
import { createClient } from "@dpkit/service/client"
import * as settings from "#settings.ts"

export const api = createClient({
protocol: import.meta.env.PROD ? "https" : "http",
host: import.meta.env.PROD ? settings.URL : "localhost",
port: import.meta.env.PROD ? 80 : 4000,
})
3 changes: 3 additions & 0 deletions cloud/api/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { createServer } from "@dpkit/service/server"

createServer({ start: true })
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions app/locales/en.json → cloud/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"about-privacy-first-description": "dpkit Cloud is a competely open source project being under constant peer-review. The code is transparent and auditable, ensuring your data is never collected on our servers and remains accessible only to you during processing. dpkit Cloud does not collect your data or store your data after processing.",
"about-self-hosting-title": "Self-hosting",
"about-self-hosting-description": "dpkit Cloud is completely open source and can be self-hosted. Visit our GitHub repository to get started. For assistance with self-hosting or custom deployments, please get in touch with us.",
"about-github-repository": "GitHub repository",
"about-get-in-touch": "get in touch with us",
"about-description-intro": "dpkit Cloud provides free online privacy-first tools for converting and validating data. Unlike others, dpkit Cloud is free and completely",
"about-self-hosting-intro": "dpkit Cloud is completely open source and can be self-hosted. Visit our",
"about-self-hosting-docs": "the self-hosting documentation",
"about-self-hosting-intro": "dpkit Cloud is completely open source and can be self-hosted. Visit ",
"about-self-hosting-middle": "to get started. For assistance with self-hosting or custom deployments, please"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions cloud/logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { TsLogTransport } from "@loglayer/transport-tslog"
import { LogLayer } from "loglayer"
import { Logger } from "tslog"

export const logger = new LogLayer({
transport: new TsLogTransport({
logger: new Logger({ type: "pretty" }),
}),
})
12 changes: 6 additions & 6 deletions app/main.ts → cloud/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { Container, getContainer } from "@cloudflare/containers"
import { createRequestHandler } from "react-router"

export interface Env {
RPC: DurableObjectNamespace<Rpc>
API: DurableObjectNamespace<API>
}

export class Rpc extends Container {
export class API extends Container {
defaultPort = 8080
sleepAfter = "1h"
}
Expand All @@ -29,12 +29,12 @@ export default {
async fetch(request, env, ctx) {
const path = new URL(request.url).pathname

if (path === "/rpc") {
const containerInstance = getContainer(env.RPC, path)
return containerInstance.fetch(request)
if (path.startsWith("/api")) {
const containerInstance = getContainer(env.API, path)
return await containerInstance.fetch(request)
}

return requestHandler(request, {
return await requestHandler(request, {
cloudflare: { env, ctx },
})
},
Expand Down
37 changes: 20 additions & 17 deletions app/package.json → cloud/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@dpkit/app",
"name": "@dpkit/cloud",
"type": "module",
"version": "0.0.0-dev",
"private": true,
Expand All @@ -14,20 +14,29 @@
"start": "react-router dev --port 4000 --host",
"type": "tsc --noEmit"
},
"dependencies": {
"devDependencies": {
"@cloudflare/containers": "0.0.28",
"@dpkit/lib": "workspace:*",
"@cloudflare/vite-plugin": "1.13.13",
"@dpkit/core": "workspace:*",
"@dpkit/service": "workspace:*",
"@mantine/core": "8.3.5",
"@mantine/form": "8.3.5",
"@mantine/hooks": "8.3.5",
"@orpc/openapi-client": "1.10.0",
"@react-router/dev": "7.9.4",
"@tanstack/react-query": "5.90.3",
"capnweb": "0.1.0",
"@types/react": "19.2.2",
"@types/react-dom": "^19.2.0",
"client-only": "0.0.1",
"es-toolkit": "1.39.10",
"i18next": "25.6.0",
"immer": "10.1.3",
"isbot": "5.1.31",
"loglayer": "6.9.1",
"lucide-react": "0.545.0",
"postcss": "8.5.6",
"postcss-preset-mantine": "1.18.0",
"postcss-simple-vars": "7.0.1",
"react": "19.2.0",
"react-dom": "19.2.0",
"react-flags-select": "2.5.0",
Expand All @@ -37,21 +46,15 @@
"react-share": "5.2.2",
"react-type-animation": "3.2.0",
"remix-utils": "9.0.0",
"ts-extras": "^0.14.0",
"server-only": "0.0.1",
"ts-extras": "0.14.0",
"vaul": "1.1.2",
"xml-js": "1.6.11",
"zustand": "5.0.8"
},
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.13",
"@react-router/dev": "7.9.4",
"@types/react": "19.2.2",
"@types/react-dom": "^19.2.0",
"postcss": "8.5.6",
"postcss-preset-mantine": "1.18.0",
"postcss-simple-vars": "7.0.1",
"vite-plugin-devtools-json": "1.0.0",
"vite-plugin-svgr": "4.5.0",
"wrangler": "4.43.0"
"wrangler": "4.43.0",
"xml-js": "1.6.11",
"zustand": "5.0.8",
"@loglayer/transport-tslog": "3.0.4",
"tslog": "4.10.2"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions app/routes/about/route.tsx → cloud/routes/about/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default function Page(_props: Route.ComponentProps) {
<Title order={2}>{t("about-self-hosting-title")}</Title>
<Text size="lg">
{t("about-self-hosting-intro")}{" "}
<Link to="https://github.com/datisthq/dpkit">
{t("about-github-repository")}
<Link to="http://typescript.dpkit.dev/guides/cloud/">
{t("about-self-hosting-docs")}
</Link>{" "}
{t("about-self-hosting-middle")}{" "}
<Link to="https://www.linkedin.com/in/evgeny-karev/">
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { Descriptor } from "@dpkit/lib"
import type { Descriptor } from "@dpkit/core"
import { Form } from "#components/Form/index.ts"
import { useValidatePackage } from "./queries.ts"

export function ValidatePackageForm() {
const validatePackage = useValidatePackage()

const handleSubmit = (value: string | File | Descriptor) => {
if (value instanceof File) {
throw new Error("File upload not implemented")
const handleSubmit = (source: string | File | Descriptor) => {
if (source instanceof File) {
throw new Error("Not implemented")
}

validatePackage.mutate(value)
validatePackage.mutate({ source })
}

return <Form onSubmit={handleSubmit} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import { useMutation } from "@tanstack/react-query"
import { createRpcSession } from "#helpers/rpc.ts"
import type { validatePackage } from "./services.ts"
import { api } from "#api/client.ts"
import { store } from "./store.ts"

export function useValidatePackage() {
return useMutation({
mutationKey: ["validatePackage"],
mutationFn: async (source: Parameters<typeof validatePackage>[0]) => {
mutationFn: async (input: Parameters<typeof api.package.validate>[0]) => {
return await api.package.validate(input)
},
onMutate: () => {
store.setState({ isDialogOpen: true })
store.setState({ isPending: true })

const rpc = createRpcSession()
const report = await rpc.validatePackage(source)

return report
},
onSettled: () => {
store.setState({ isPending: false })
},
onSuccess: report => {
store.setState({ report })
},
onError: () => {
onError: error => {
console.log(error)
store.setState({ isFault: true })
},
})
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/settings.ts → cloud/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export const TITLE = "dpkit Cloud"
export const DESCRIPTION = "dpkit Cloud"

export const ICON_SIZE = 20
export const ICON_STROKE_WIDTH = 1.5
export const ICON_SIZE_SMALL = 12
export const ICON_STROKE_WIDTH = 1.5
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/vite.config.ts → cloud/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export default defineConfig({
svgr(),
],
resolve: {
alias: [{ find: "@dpkit/app", replacement: import.meta.dirname }],
alias: [{ find: "@dpkit/cloud", replacement: import.meta.dirname }],
},
})
8 changes: 4 additions & 4 deletions app/wrangler.jsonc → cloud/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"containers": [
{
"class_name": "Rpc",
"class_name": "API",
"image": "./Dockerfile",
"image_build_context": "../",
"instance_type": "standard-1",
Expand All @@ -23,14 +23,14 @@
"durable_objects": {
"bindings": [
{
"class_name": "Rpc",
"name": "RPC"
"class_name": "API",
"name": "API"
}
]
},
"migrations": [
{
"new_sqlite_classes": ["Rpc"],
"new_sqlite_classes": ["API"],
"tag": "v1"
}
]
Expand Down
1 change: 0 additions & 1 deletion docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ export default defineConfig({
"dpkit is a fast data management framework built on top of the Data Package standard and Polars DataFrames. It supports various formats like CSV, JSON, and Parquet and integrates with data platforms such as CKAN, Zenodo, and GitHub",
customCss: ["/assets/styles.css"],
components: {
SiteTitle: "./components/Header/SiteTitle.astro",
SocialIcons: "./components/Header/SocialIcons.astro",
},
logo: {
Expand Down
Loading