Skip to content

Commit 795f418

Browse files
committed
feat: restructure seed package and implement MindsDB integration
- Removed obsolete reset script and TypeScript configuration from seed package. - Added new configuration file for MindsDB constants and system prompts. - Implemented new seeding logic in the seed package, including jobs, agents, and data sources. - Created a Makefile for easier setup and validation of the self-hosted environment. - Established a Prisma schema for database interactions, including user and session management. - Added environment variable configurations for encryption keys and API keys. - Implemented MindsDB connection and query execution functions. - Created scripts for managing agents, jobs, and data sources in MindsDB. - Added logic for creating and managing knowledge bases and machine learning models. - Introduced a reset script to clean up MindsDB configurations and resources.
1 parent 3eaf83e commit 795f418

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1804
-305
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release Self Host Pack
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Get tag name
20+
id: get_tag
21+
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
22+
23+
- name: Create release directory structure
24+
run: |
25+
# Create temporary release folder
26+
mkdir -p release
27+
28+
# Copy all files from self-host directory
29+
cp -R ./self-host/* release/
30+
31+
# Create prisma directory if it doesn't exist
32+
mkdir -p release/prisma
33+
34+
# Copy packages/database/prisma folder and overwrite if exists
35+
cp -R ./packages/database/prisma/* release/prisma/
36+
37+
- name: Create ZIP archive
38+
run: |
39+
zip -r "kbnet_selfhost_pack_${{ steps.get_tag.outputs.TAG }}.zip" release/
40+
41+
- name: Create GitHub Release
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
files: "kbnet_selfhost_pack_${{ steps.get_tag.outputs.TAG }}.zip"
45+
draft: true
46+
name: "KBNet Self-Host Pack ${{ steps.get_tag.outputs.TAG }}"
47+
body: |
48+
# KBNet Self-Host Pack ${{ steps.get_tag.outputs.TAG }}
49+
50+
This release contains the self-host package for KBNet.
51+
52+
## Installation
53+
1. Download and extract the ZIP file
54+
2. Follow the setup instructions in the documentation
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

apps/platform/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"@assistant-ui/react": "^0.10.24",
1213
"@assistant-ui/react-markdown": "^0.10.5",
1314
"@hookform/resolvers": "^5.1.1",
1415
"@kbnet/db": "*",
@@ -35,7 +36,7 @@
3536
"clsx": "^2.1.1",
3637
"date-fns": "^4.1.0",
3738
"framer-motion": "^12.18.1",
38-
"lucide-react": "^0.515.0",
39+
"lucide-react": "^0.522.0",
3940
"next": "^15.3.4",
4041
"next-themes": "^0.4.6",
4142
"react": "^19.0.0",
241 KB
Binary file not shown.
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
import React from "react";
2+
import Link from "next/link";
3+
import { Card } from "@/components/ui/card";
4+
import { Database, ExternalLink } from "lucide-react";
5+
6+
export default function PrivacyPolicyPage() {
7+
return (
8+
<div className="py-12 px-4">
9+
<div className="max-w-4xl mx-auto space-y-8">
10+
<div className="text-center space-y-4">
11+
<h1 className="text-4xl font-bold tracking-tight">Privacy Policy</h1>
12+
<p className="text-xl text-muted-foreground">
13+
How we handle your data at KBNet
14+
</p>
15+
</div>
16+
17+
<Card className="p-6 paper-effect">
18+
<h2 className="text-2xl font-semibold mb-4">Overview</h2>
19+
<p className="text-muted-foreground mb-4">
20+
KBNet is an AI-powered knowledge exploration platform developed for
21+
the Quira Quest hackathon. This privacy policy outlines how we
22+
collect, use, and protect your information when you use our service.
23+
</p>
24+
<p className="text-muted-foreground">
25+
This project is built as part of the Quira Quest hackathon hosted at{" "}
26+
<Link
27+
target="_blank"
28+
href="https://quira.sh"
29+
className="text-primary hover:underline"
30+
>
31+
Quira
32+
</Link>{" "}
33+
and powered by{" "}
34+
<Link
35+
target="_blank"
36+
href="https://mindsdb.com"
37+
className="text-primary hover:underline"
38+
>
39+
MindsDB
40+
</Link>
41+
.
42+
</p>
43+
</Card>
44+
45+
<Card className="p-6 paper-effect">
46+
<h2 className="text-2xl font-semibold mb-4 flex items-center gap-2">
47+
<Database className="h-6 w-6 text-primary" />
48+
Data Collection
49+
</h2>
50+
<p className="text-muted-foreground mb-4">
51+
We collect minimal personal information necessary to provide you
52+
with our service. This may include:
53+
</p>
54+
<ul className="list-disc list-inside text-muted-foreground space-y-2 mb-4">
55+
<li>Basic profile information, such as name and email address</li>
56+
<li>
57+
Learning preferences and history to personalize your experience
58+
</li>
59+
<li>Usage data to improve our platform</li>
60+
</ul>
61+
<p className="text-muted-foreground">
62+
KBNet leverages MindsDB's powerful AI capabilities to create
63+
intelligent knowledge connections and provide smart learning path
64+
recommendations. All data processing follows industry standard
65+
security practices.
66+
</p>
67+
</Card>
68+
69+
<Card className="p-6 paper-effect">
70+
<h2 className="text-2xl font-semibold mb-4">How We Use Your Data</h2>
71+
<p className="text-muted-foreground mb-4">
72+
Your data helps us provide and improve the KBNet platform:
73+
</p>
74+
<ul className="list-disc list-inside text-muted-foreground space-y-2">
75+
<li>Personalizing your knowledge exploration experience</li>
76+
<li>Creating intelligent connections between learning resources</li>
77+
<li>Improving our AI recommendations and platform functionality</li>
78+
<li>Understanding user needs and preferences</li>
79+
</ul>
80+
</Card>
81+
82+
<Card className="p-6 paper-effect">
83+
<h2 className="text-2xl font-semibold mb-4">Your Rights</h2>
84+
<p className="text-muted-foreground mb-4">You have the right to:</p>
85+
<ul className="list-disc list-inside text-muted-foreground space-y-2">
86+
<li>Access your personal data</li>
87+
<li>Request correction of inaccurate data</li>
88+
<li>Request deletion of your data</li>
89+
<li>Opt out of certain data processing activities</li>
90+
</ul>
91+
</Card>
92+
93+
<Card className="p-6 paper-effect">
94+
<h2 className="text-2xl font-semibold mb-4">Contact</h2>
95+
<p className="text-muted-foreground mb-4">
96+
For any questions about this privacy policy or our data practices,
97+
please contact:
98+
</p>
99+
<p className="text-muted-foreground">
100+
Priyanshu Verma, Project Creator & Maintainer
101+
</p>
102+
<div className="flex gap-4 mt-2">
103+
<Link
104+
href="https://github.com/PriyanshuPz"
105+
target="_blank"
106+
rel="noopener noreferrer"
107+
className="text-primary hover:underline text-sm flex items-center gap-1"
108+
>
109+
GitHub <ExternalLink className="h-3 w-3" />
110+
</Link>
111+
<Link
112+
href="https://peerlist.io/priyanshu_verma"
113+
target="_blank"
114+
rel="noopener noreferrer"
115+
className="text-primary hover:underline text-sm flex items-center gap-1"
116+
>
117+
Peerlist <ExternalLink className="h-3 w-3" />
118+
</Link>
119+
</div>
120+
</Card>
121+
</div>
122+
</div>
123+
);
124+
}
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
import React from "react";
2+
import Link from "next/link";
3+
import { Card } from "@/components/ui/card";
4+
import { ExternalLink, ScrollText } from "lucide-react";
5+
6+
export default function TermsPage() {
7+
return (
8+
<div className="py-12 px-4">
9+
<div className="max-w-4xl mx-auto space-y-8">
10+
<div className="text-center space-y-4">
11+
<h1 className="text-4xl font-bold tracking-tight">
12+
Terms of Service
13+
</h1>
14+
<p className="text-xl text-muted-foreground">
15+
Guidelines for using KBNet
16+
</p>
17+
</div>
18+
19+
<Card className="p-6 paper-effect">
20+
<h2 className="text-2xl font-semibold mb-4">Introduction</h2>
21+
<p className="text-muted-foreground mb-4">
22+
Welcome to KBNet, an AI-powered knowledge exploration platform
23+
developed for the Quira Quest hackathon. By accessing or using our
24+
service, you agree to be bound by these Terms of Service.
25+
</p>
26+
<p className="text-muted-foreground">
27+
KBNet is a project built as part of the Quira Quest hackathon hosted
28+
at{" "}
29+
<Link
30+
target="_blank"
31+
href="https://quira.sh"
32+
className="text-primary hover:underline"
33+
>
34+
Quira
35+
</Link>{" "}
36+
and powered by{" "}
37+
<Link
38+
target="_blank"
39+
href="https://mindsdb.com"
40+
className="text-primary hover:underline"
41+
>
42+
MindsDB
43+
</Link>
44+
's AI technology.
45+
</p>
46+
</Card>
47+
48+
<Card className="p-6 paper-effect">
49+
<h2 className="text-2xl font-semibold mb-4 flex items-center gap-2">
50+
<ScrollText className="h-6 w-6 text-primary" />
51+
Service Description
52+
</h2>
53+
<p className="text-muted-foreground mb-4">
54+
KBNet provides an intelligent knowledge exploration platform that:
55+
</p>
56+
<ul className="list-disc list-inside text-muted-foreground space-y-2 mb-4">
57+
<li>Creates connections between knowledge resources</li>
58+
<li>Provides personalized learning path recommendations</li>
59+
<li>Leverages AI to enhance your educational experience</li>
60+
<li>Facilitates discovery of related learning materials</li>
61+
</ul>
62+
<p className="text-muted-foreground">
63+
While we strive to provide accurate and helpful information, KBNet
64+
is an experimental project and may have limitations.
65+
</p>
66+
</Card>
67+
68+
<Card className="p-6 paper-effect">
69+
<h2 className="text-2xl font-semibold mb-4">User Responsibilities</h2>
70+
<p className="text-muted-foreground mb-4">
71+
As a KBNet user, you agree to:
72+
</p>
73+
<ul className="list-disc list-inside text-muted-foreground space-y-2">
74+
<li>Provide accurate information when creating an account</li>
75+
<li>Maintain the confidentiality of your account credentials</li>
76+
<li>Use the service for legitimate educational purposes</li>
77+
<li>Respect intellectual property rights of content creators</li>
78+
<li>Avoid attempting to misuse or exploit the platform</li>
79+
</ul>
80+
</Card>
81+
82+
<Card className="p-6 paper-effect">
83+
<h2 className="text-2xl font-semibold mb-4">Intellectual Property</h2>
84+
<p className="text-muted-foreground mb-4">
85+
KBNet, including its design, functionality, and content created by
86+
our team, is protected by copyright and other intellectual property
87+
laws. Third-party content accessible through KBNet remains the
88+
property of its respective owners.
89+
</p>
90+
<p className="text-muted-foreground">
91+
You may use KBNet for personal, non-commercial educational purposes
92+
but may not reproduce, distribute, or create derivative works from
93+
our platform without explicit permission.
94+
</p>
95+
</Card>
96+
97+
<Card className="p-6 paper-effect">
98+
<h2 className="text-2xl font-semibold mb-4">
99+
Limitation of Liability
100+
</h2>
101+
<p className="text-muted-foreground mb-4">
102+
KBNet is provided "as is" without warranties of any kind. We are not
103+
responsible for:
104+
</p>
105+
<ul className="list-disc list-inside text-muted-foreground space-y-2">
106+
<li>Accuracy or completeness of any information provided</li>
107+
<li>Interruptions or errors in the service</li>
108+
<li>Actions taken based on recommendations from our platform</li>
109+
<li>User-generated content or third-party linked resources</li>
110+
</ul>
111+
</Card>
112+
113+
<Card className="p-6 paper-effect">
114+
<h2 className="text-2xl font-semibold mb-4">Modifications</h2>
115+
<p className="text-muted-foreground mb-4">
116+
We reserve the right to modify these Terms of Service at any time.
117+
Continued use of KBNet following any changes constitutes acceptance
118+
of those changes.
119+
</p>
120+
<p className="text-muted-foreground">
121+
For significant changes, we will make reasonable efforts to notify
122+
users through our platform or via email.
123+
</p>
124+
</Card>
125+
126+
<Card className="p-6 paper-effect">
127+
<h2 className="text-2xl font-semibold mb-4">Contact</h2>
128+
<p className="text-muted-foreground mb-4">
129+
If you have questions about these Terms of Service, please contact:
130+
</p>
131+
<p className="text-muted-foreground">
132+
Priyanshu Verma, Project Creator & Maintainer
133+
</p>
134+
<div className="flex gap-4 mt-2">
135+
<Link
136+
href="https://github.com/PriyanshuPz"
137+
target="_blank"
138+
rel="noopener noreferrer"
139+
className="text-primary hover:underline text-sm flex items-center gap-1"
140+
>
141+
GitHub <ExternalLink className="h-3 w-3" />
142+
</Link>
143+
<Link
144+
href="https://peerlist.io/priyanshu_verma"
145+
target="_blank"
146+
rel="noopener noreferrer"
147+
className="text-primary hover:underline text-sm flex items-center gap-1"
148+
>
149+
Peerlist <ExternalLink className="h-3 w-3" />
150+
</Link>
151+
</div>
152+
</Card>
153+
</div>
154+
</div>
155+
);
156+
}
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import ExplorationView from "../_components/exploration-view";
22
import { BranchMinimap } from "../_components/branch-map";
3+
import { AssistantProvider } from "@/providers/assistant-runtime";
4+
import { AssistantModal } from "@/components/assistant-ui/assistant-modal";
35

46
export default function ExplorePage() {
57
return (
68
<div className="w-full h-screen flex flex-col overflow-hidden antialiased text-foreground dark:text-foreground-dark">
7-
<div className="flex items-center px-4 h-14 mt-3"></div>
8-
<BranchMinimap />
9-
<ExplorationView />
9+
<AssistantProvider>
10+
<BranchMinimap />
11+
<ExplorationView />
12+
<AssistantModal />
13+
</AssistantProvider>
1014
</div>
1115
);
1216
}

apps/platform/src/app/map/_components/branch-map.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export const BranchMinimap = () => {
191191
<Button
192192
variant="outline"
193193
size="sm"
194-
className="fixed bottom-4 right-4 shadow-md z-50"
194+
className="fixed bottom-4 left-4 shadow-md z-50"
195195
onClick={() => setIsCollapsed(false)}
196196
>
197197
<GitBranch className="h-4 w-4 mr-1" />
@@ -204,10 +204,10 @@ export const BranchMinimap = () => {
204204
const containerClass = cn(
205205
"fixed shadow-lg z-50 bg-card border rounded-lg overflow-hidden transition-all duration-200",
206206
isCollapsed
207-
? "bottom-4 right-4 p-0 w-auto"
207+
? "bottom-4 left-4 p-0 w-auto"
208208
: isMaximized
209209
? "inset-4 w-auto"
210-
: "bottom-4 right-4 w-[320px]"
210+
: "bottom-4 left-4 w-[320px]"
211211
);
212212

213213
return (

0 commit comments

Comments
 (0)