Documentation Index
Fetch the complete documentation index at: https://docs.databite.dev/llms.txt
Use this file to discover all available pages before exploring further.
Installation
npm install @databite/server @databite/connect
1) Start your server
Create and run a Databite server. Add integrations using built-in or custom connectors.
import { DatabiteServer } from "@databite/server";
import { slack } from "@databite/connectors";
async function main() {
const server = new DatabiteServer({
port: 3001,
engineConfig: {
connectors: [slack],
},
});
await server.addIntegration(
slack.createIntegration("Slack Integration", {
clientId: process.env.SLACK_CLIENT_ID!,
clientSecret: process.env.SLACK_CLIENT_SECRET!,
redirectUri: process.env.SLACK_REDIRECT_URI!,
scopes: ["chat:write", "channels:read"],
})
);
console.log("Server running at http://localhost:3001");
}
main().catch(console.error);
2) Connect from your frontend
Use the Connect Modal to authenticate and create a connection via your server.
import React, { useState } from "react";
import { ConnectModal } from "@databite/connect";
export default function Page() {
const [open, setOpen] = useState(false);
return (
<>
<button onClick={() => setOpen(true)}>Connect to Slack</button>
<ConnectModal
open={open}
onOpenChange={setOpen}
integrationId="slack-integration-id"
baseUrl={process.env.NEXT_PUBLIC_API_URL || "http://localhost:3001"}
syncInterval={10}
onAuthSuccess={async (connection) => {
console.log(connection.id)
}}
onAuthError={(e) => console.error(e)}
/>
</>
);
}
Next Steps
Server API
Learn the available endpoints your app will call
Example Web App
See a complete implementation example