Product

Everything your backend needs

One SDK. One API key. Auth, events, analytics, error tracking, and payments — all in one place.

Authentication

Full user auth with JWT tokens. Register, login, verify tokens, manage users and metadata. Bcrypt password hashing included.

example
const { user, token } = await syntro.login('john', 'pass123');
const { valid } = await syntro.verifyToken(token);

Custom Events

Track any business event with optional metadata. View analytics in real-time from your dashboard.

example
await syntro.event('CUSTOM', 'purchase', 'User purchased item', {
  productId: 'prod_123', amount: 999
});

Error Tracking

Catch and log errors in real-time. See frequency, last occurrence, stack traces, and metadata.

example
await syntro.sendError('api_timeout', 'Payment API timed out', {
  endpoint: '/checkout', timeout: 5000
});

Stripe Payments

Create payment sessions with one function. Webhooks are handled automatically — transactions recorded to your dashboard.

example
const { url } = await syntro.createPayment('Pro Plan', 999, {
  successUrl: 'https://app.com/success'
});
window.location.href = url;

User Metadata

Store arbitrary JSON metadata on any user. Merge-update with one call. Perfect for feature flags, preferences, roles.

example
await syntro.updateMetadata(userId, { plan: 'pro', role: 'admin' });
const meta = await syntro.getMetadata(userId);

Token Verification

Verify JWT tokens server-side. Get the associated user in one call. Perfect for protecting API routes.

example
const { valid, user } = await syntro.verifyToken(headerToken);
if (!valid) return res.status(401).send('Unauthorized');

Ready to integrate?