Skip to content
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ dist
build
publish
output
# generated prisma client
apps/server/prisma/generated/

# Logs
logs
Expand Down
56 changes: 28 additions & 28 deletions apps/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,52 @@
"preview": "vite preview"
},
"dependencies": {
"@automerge/automerge": "^v2.2.9",
"@automerge/automerge": "^2.2.9",
"@automerge/automerge-repo": "^2.0.0-beta.2",
"@automerge/automerge-repo-react-hooks": "^2.0.0-beta.2",
"@graphprotocol/grc-20": "^0.10.0",
"@graphprotocol/grc-20": "^0.11.5",
"@graphprotocol/hypergraph": "workspace:*",
"@graphprotocol/hypergraph-react": "workspace:*",
"@noble/hashes": "^1.7.0",
"@privy-io/react-auth": "^2.0.3",
"@radix-ui/react-avatar": "^1.1.2",
"@noble/hashes": "^1.8.0",
"@privy-io/react-auth": "^2.13.0",
"@radix-ui/react-avatar": "^1.1.7",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-slot": "^1.1.1",
"@tanstack/react-query": "^5.67.1",
"@tanstack/react-router": "^1.97.1",
"@xstate/store": "^2.6.2",
"@radix-ui/react-slot": "^1.2.0",
"@tanstack/react-query": "^5.75.2",
"@tanstack/react-router": "^1.119.0",
"@xstate/store": "^3.5.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"effect": "^3.14.12",
"framer-motion": "^12.5.0",
"framer-motion": "^12.9.4",
"graphql-request": "^7.1.2",
"isomorphic-ws": "^5.0.0",
"lucide-react": "^0.471.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-select": "^5.10.0",
"siwe": "^2.3.2",
"lucide-react": "^0.507.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-select": "^5.10.1",
"siwe": "^3.0.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"uuid": "^11.0.5",
"viem": "^2.22.9",
"vite": "^6.0.7"
"viem": "^2.28.3",
"vite": "^6.3.4"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@tanstack/router-devtools": "^1.97.1",
"@tanstack/router-plugin": "^1.97.1",
"@types/node": "^22.10.7",
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"@tanstack/router-devtools": "^1.119.1",
"@tanstack/router-plugin": "^1.119.0",
"@types/node": "^22.15.3",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.3",
"@types/uuid": "^10.0.0",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"globals": "^15.14.0",
"postcss": "^8.5.1",
"@vitejs/plugin-react": "^4.4.1",
"autoprefixer": "^10.4.21",
"globals": "^16.0.0",
"postcss": "^8.5.3",
"tailwindcss": "^3.4.17",
"vite-plugin-node-polyfills": "^0.22.0",
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-plugin-top-level-await": "^1.5.0",
"vite-plugin-wasm": "^3.4.1"
}
}
26 changes: 13 additions & 13 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,23 @@
},
"dependencies": {
"@graphprotocol/hypergraph": "workspace:*",
"@noble/ciphers": "^1.2.0",
"@prisma/client": "^6.2.1",
"@noble/ciphers": "^1.3.0",
"@prisma/client": "^6.7.0",
"cors": "^2.8.5",
"effect": "^3.14.12",
"express": "^5.0.1",
"siwe": "^2.3.2",
"viem": "^2.22.9",
"ws": "^8.17.1"
"express": "^5.1.0",
"siwe": "^3.0.0",
"viem": "^2.28.3",
"ws": "^8.18.2"
},
"devDependencies": {
"@types/cors": "^2.8.17",
"@types/express": "^5.0.0",
"@types/node": "^22.10.7",
"@types/pg": "^8.11.6",
"@types/ws": "^8.5.13",
"prisma": "^6.2.1",
"tsup": "^8.3.5",
"typescript": "^5.7.3"
"@types/express": "^5.0.1",
"@types/node": "^22.15.3",
"@types/pg": "^8.11.14",
"@types/ws": "^8.18.1",
"prisma": "^6.7.0",
"tsup": "^8.4.0",
"typescript": "^5.8.3"
}
}
87 changes: 43 additions & 44 deletions apps/server/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
// TODO: Using `pnpm deploy` with prisma is quite annoying. We should consider generating the prisma client into
// a directory within the package here instead of generating it into node modules (default).
provider = "prisma-client-js"
output = "generated/client"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the TODO comment above be removed now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch, I removed it!

}

datasource db {
Expand All @@ -13,14 +12,14 @@ datasource db {
}

model SpaceEvent {
id String @id
event String
state String
counter Int
space Space @relation(fields: [spaceId], references: [id])
spaceId String
createdAt DateTime @default(now())
inboxes SpaceInbox[]
id String @id
event String
state String
counter Int
space Space @relation(fields: [spaceId], references: [id])
spaceId String
createdAt DateTime @default(now())
inboxes SpaceInbox[]

@@unique([spaceId, counter])
}
Expand Down Expand Up @@ -56,67 +55,67 @@ model SpaceKeyBox {
}

model SpaceInbox {
id String @id
space Space @relation(fields: [spaceId], references: [id])
id String @id
space Space @relation(fields: [spaceId], references: [id])
spaceId String
isPublic Boolean
authPolicy String
encryptionPublicKey String
encryptedSecretKey String
spaceEvent SpaceEvent @relation(fields: [spaceEventId], references: [id])
spaceEvent SpaceEvent @relation(fields: [spaceEventId], references: [id])
spaceEventId String
messages SpaceInboxMessage[]
createdAt DateTime @default(now())
createdAt DateTime @default(now())
}

model SpaceInboxMessage {
id String @id @default(uuid(4))
spaceInbox SpaceInbox @relation(fields: [spaceInboxId], references: [id])
spaceInboxId String
ciphertext String
signatureHex String?
id String @id @default(uuid(4))
spaceInbox SpaceInbox @relation(fields: [spaceInboxId], references: [id])
spaceInboxId String
ciphertext String
signatureHex String?
signatureRecovery Int?
authorAccountId String?
createdAt DateTime @default(now())
authorAccountId String?
createdAt DateTime @default(now())
}

model Account {
id String @id
id String @id
spaces Space[]
invitations Invitation[]
keyBoxes SpaceKeyBox[]
identities Identity[]
sessionNonce String?
sessionToken String?
sessionTokenExpires DateTime?
updates Update[]
inboxes AccountInbox[]
sessionNonce String?
sessionToken String?
sessionTokenExpires DateTime?
updates Update[]
inboxes AccountInbox[]

@@index([sessionToken])
}

model AccountInbox {
id String @id
account Account @relation(fields: [accountId], references: [id])
id String @id
account Account @relation(fields: [accountId], references: [id])
accountId String
isPublic Boolean
authPolicy String
encryptionPublicKey String
signatureHex String
signatureRecovery Int
messages AccountInboxMessage[]
createdAt DateTime @default(now())
createdAt DateTime @default(now())
}

model AccountInboxMessage {
id String @id @default(uuid(7))
accountInbox AccountInbox @relation(fields: [accountInboxId], references: [id])
accountInboxId String
ciphertext String
signatureHex String?
id String @id @default(uuid(7))
accountInbox AccountInbox @relation(fields: [accountInboxId], references: [id])
accountInboxId String
ciphertext String
signatureHex String?
signatureRecovery Int?
authorAccountId String?
createdAt DateTime @default(now())
authorAccountId String?
createdAt DateTime @default(now())
}

model Invitation {
Expand All @@ -132,21 +131,21 @@ model Invitation {
}

model Update {
space Space @relation(fields: [spaceId], references: [id])
spaceId String
clock Int
content Bytes
account Account @relation(fields: [accountId], references: [id])
space Space @relation(fields: [spaceId], references: [id])
spaceId String
clock Int
content Bytes
account Account @relation(fields: [accountId], references: [id])
accountId String
signatureHex String
signatureRecovery Int
updateId String
updateId String

@@id([spaceId, clock])
}

model Identity {
account Account @relation(fields: [accountId], references: [id])
account Account @relation(fields: [accountId], references: [id])
accountId String
ciphertext String
nonce String
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/prisma.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { PrismaClient } from '@prisma/client';
import { PrismaClient } from '../prisma/generated/client';

export const prisma = new PrismaClient();
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"check": "tsc --noEmit"
},
"devDependencies": {
"@babel/cli": "^7.26.4",
"@babel/core": "^7.26.0",
"@babel/cli": "^7.27.1",
"@babel/core": "^7.27.1",
"@biomejs/biome": "1.9.4",
"@changesets/cli": "^2.27.11",
"@changesets/cli": "^2.29.2",
"babel-plugin-annotate-pure-calls": "^0.5.0",
"glob": "^11.0.1",
"pkg-pr-new": "^0.0.39",
"typescript": "^5.7.3",
"vitest": "^3.0.1"
"glob": "^11.0.2",
"pkg-pr-new": "^0.0.43",
"typescript": "^5.8.3",
"vitest": "^3.1.2"
}
}
30 changes: 18 additions & 12 deletions packages/hypergraph-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"name": "@graphprotocol/hypergraph-react",
"version": "0.0.1",
"description": "React implementation and additional functionality, components, and hooks for the hypergraph SDK framework",
"keywords": ["Web3", "Local-First", "Knowledge Graph", "Graph Protocol", "react"],
"keywords": [
"Web3",
"Local-First",
"Knowledge Graph",
"Graph Protocol",
"react"
],
"publishConfig": {
"access": "public",
"directory": "publish",
Expand Down Expand Up @@ -30,24 +36,24 @@
"devDependencies": {
"@graphprotocol/hypergraph": "workspace:*",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@types/react": "^19.0.7",
"@vitejs/plugin-react": "^4.3.4",
"@xstate/store": "^2.6.2",
"jsdom": "^26.0.0",
"react": "^19.0.0"
"@testing-library/react": "^16.3.0",
"@types/react": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"@xstate/store": "^3.5.1",
"jsdom": "^26.1.0",
"react": "^19.1.0"
},
"dependencies": {
"@automerge/automerge": "^v2.2.9",
"@automerge/automerge": "^2.2.9",
"@automerge/automerge-repo": "^2.0.0-beta.2",
"@automerge/automerge-repo-react-hooks": "^2.0.0-beta.2",
"@graphprotocol/grc-20": "^0.10.0",
"@graphprotocol/grc-20": "^0.11.5",
"@noble/hashes": "^1.8.0",
"@tanstack/react-query": "^5.67.1",
"@tanstack/react-query": "^5.75.2",
"effect": "^3.14.12",
"graphql-request": "^7.1.2",
"siwe": "^2.3.2",
"siwe": "^3.0.0",
"uuid": "^11.0.5",
"viem": "^2.22.9"
"viem": "^2.28.3"
}
}
Loading
Loading