Docs
Quickstart
Go from zero to a live activity feed in under ten minutes. You'll create a project, send your first event from your backend, mint a feed token, and render the feed with the drop-in component.
1. Create a project & get API keys
Sign in to the Softechlog dashboard (Google, GitHub, Microsoft, or an emailed code). The onboarding wizard creates your first project and waits for your first event so you can verify the integration live. Your keys are on the API Keys page:
- A secret key (
stl_sk_…) for your backend — it ingests events, reads events, actors, sessions and stats, exports data, and mints feed tokens. Keep it in environment variables. - A public key (
stl_pk_…) for the browser auto-capture script — it can only submit auto-captured events via the batch endpoint. It cannot read anything, so embedding it in a page never exposes other users' activity.
A third credential, the feed token (stl_ft_…), is minted by your server with the secret key and is what the feed component uses to read exactly one user's activity — see step 5.
2. Install an SDK
Pick your backend. Both SDKs' track() never throws — a logging failure will never crash your app.
npm install @softechlog/node # Node 18+ # or pip install softechlog
// lib/softechlog.ts — initialize once, import everywhere
import { Softechlog } from '@softechlog/node';
export const log = new Softechlog({
secretKey: process.env.SOFTECHLOG_SECRET_KEY!, // stl_sk_… — server-side only
});Framework-specific recipes: Next.js, Express, FastAPI, Django.
3. Track your first event
Events follow one shape: an actor did an action to a target, with optional metadata. Use resource.verb naming like member.invited or file.deleted.
import { log } from '@/lib/softechlog';
// Fire-and-forget (non-blocking — recommended)
log.track({
actor: { id: req.user.id, name: req.user.name, email: req.user.email },
action: 'member.invited',
target: { type: 'workspace', id: workspace.id, name: workspace.name },
metadata: { role: 'admin' },
});import os
from softechlog import Softechlog
log = Softechlog(secret_key=os.environ["SOFTECHLOG_SECRET_KEY"])
log.track(
actor={"id": str(user.id), "name": user.name, "email": user.email},
action="member.invited",
target_type="workspace",
target_id=str(workspace.id),
metadata={"role": "admin"},
)4. Add browser auto-capture (optional)
Drop one script tag to automatically capture page views (including SPA route changes), button clicks, link clicks, and form submissions — no further code changes needed. Auto-captured events share a session id, so they show up grouped under Sessions in the dashboard. See the Auto-Capture guide for options and privacy controls.
<script src="https://softechlog.com/stl_capture.js"></script>
<script>
Softechlog.init("stl_pk_xxxxxxxxxxxx"); // public key — ingest-only
// Once the user is known:
Softechlog.identify({ id: user.id, name: user.name, email: user.email });
</script>5. Render an activity feed
The <softechlog-feed> Web Component works in any framework — React, Angular, Vue, or plain HTML — and handles fetching, pagination, and loading/empty/error states. Because public keys can't read, the component needs a feed token: a short-lived, read-only credential pinned to one user. Mint it on your server with the secret key:
// GET /api/activity-token — runs on your server
import { log } from '@/lib/softechlog';
export async function GET(req) {
const { token, expires_at } = await log.feedToken({
actorId: req.user.id, // the signed-in user
ttlSeconds: 3600, // 60 – 86400, default 3600
});
return Response.json({ token, expires_at });
}Then hand the token to the page and drop in the component:
<script src="https://softechlog.com/feed.js"></script>
<softechlog-feed id="feed"></softechlog-feed>
<script>
fetch('/api/activity-token')
.then((r) => r.json())
.then(({ token }) => document.getElementById('feed').setAttribute('feed-token', token));
</script>Python users: await log.afeed_token(actor_id=str(user.id)). Attributes, theming and framework examples are in the Feed Component guide.
6. Export your history (optional)
Your events are never locked in. Any time — on every plan — pull your history as CSV or JSON with the secret key, using the same filters as the list endpoint (actor, action, target, time window):
# CSV (or format=json) — same filters as GET /v1/events, up to 10,000 rows curl -H "Authorization: Bearer $SOFTECHLOG_SECRET_KEY" \ "https://api.softechlog.com/v1/events/export?format=csv&from=2026-08-01T00:00:00Z" \ -o events.csv
Details and all query parameters are in the API Reference.