
Security News
The Nightmare Before Deployment
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.
@djangocfg/ext-knowbase
Advanced tools
Knowledge base and RAG-powered chat extension for DjangoCFG.
Part of DjangoCFG — modern Django framework for production-ready SaaS applications.
pnpm add @djangocfg/ext-knowbase
import { KnowbaseProvider } from '@djangocfg/ext-knowbase/hooks';
export default function RootLayout({ children }) {
return (
<KnowbaseProvider>
{children}
</KnowbaseProvider>
);
}
import {
useKnowbaseDocumentsContext,
} from '@djangocfg/ext-knowbase/hooks';
function DocumentsPage() {
const {
documents,
uploadDocument,
deleteDocument,
isLoadingDocuments,
} = useKnowbaseDocumentsContext();
const handleUpload = async (file: File) => {
await uploadDocument({
file,
title: file.name,
description: 'Uploaded document',
});
};
return (
<div>
<input
type="file"
onChange={(e) => e.target.files && handleUpload(e.target.files[0])}
/>
{documents.map(doc => (
<div key={doc.id}>
<h3>{doc.title}</h3>
<p>Status: {doc.status}</p>
<button onClick={() => deleteDocument(doc.id)}>Delete</button>
</div>
))}
</div>
);
}
import { useKnowbaseChatContext } from '@djangocfg/ext-knowbase/hooks';
function ChatInterface() {
const { sendQuery, chatHistory, isLoading } = useKnowbaseChatContext();
const handleSend = async (message: string) => {
await sendQuery({
query: message,
session_id: sessionId,
});
};
return (
<div>
{chatHistory.map((msg, idx) => (
<div key={idx}>
<strong>{msg.role}:</strong> {msg.content}
</div>
))}
<input
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleSend(e.currentTarget.value);
}
}}
disabled={isLoading}
/>
</div>
);
}
import { useKnowbaseDocumentsContext } from '@djangocfg/ext-knowbase/hooks';
function ArchiveUpload() {
const { uploadArchive, getArchiveById } = useKnowbaseDocumentsContext();
const handleArchiveUpload = async (file: File) => {
const result = await uploadArchive({
file,
auto_process: true,
});
// Check processing status
const archive = await getArchiveById(result.id);
console.log('Processing status:', archive.processing_status);
};
return (
<input
type="file"
accept=".zip"
onChange={(e) => e.target.files && handleArchiveUpload(e.target.files[0])}
/>
);
}
documents - List of all documentsuploadDocument(data) - Upload single documentdeleteDocument(id) - Delete documentupdateDocument(id, data) - Update document metadatagetDocumentById(id) - Get document detailsuploadArchive(data) - Upload ZIP archiveprocessArchive(id) - Trigger archive processingsendQuery(data) - Send chat query to RAG systemchatHistory - Current chat session historyclearHistory() - Clear chat historyisLoading - Loading statesessions - List of chat sessionscreateSession(data) - Create new sessiondeleteSession(id) - Delete sessiongetCurrentSession() - Get active sessionMIT
FAQs
Knowledge base and chat extension for DjangoCFG
We found that @djangocfg/ext-knowbase demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Season’s greetings from Socket, and here’s to a calm end of year: clean dependencies, boring pipelines, no surprises.

Research
/Security News
Impostor NuGet package Tracer.Fody.NLog typosquats Tracer.Fody and its author, using homoglyph tricks, and exfiltrates Stratis wallet JSON/passwords to a Russian IP address.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.