Snapshot

Selections

  • Deployment: Standalone
  • Database: PostgreSQL
  • Queues: In-memory queues
  • Webhooks: No webhooks
  • Providers: Google (Gmail), Microsoft (Outlook)
  • Advanced: OpenTelemetry

Pre-rendered from the setup wizard so search engines can crawl every combination without JavaScript.

Riposte Setup Guide: Standalone • PostgreSQL • In-memory queues • No webhooks • Google (Gmail) + Microsoft (Outlook)

Pre-generated Riposte setup wizard guide for standalone deployment with PostgreSQL storage. in-memory queues. no webhooks. provider coverage: google (gmail) + microsoft (outlook). advanced: opentelemetry. Includes installation, configuration, integration code, and operational callouts..

📋 Setup Overview

Pre-generated Riposte setup instructions for a standalone deployment backed by postgresql with in-memory queues and no webhooks.

What you'll build

Operate Riposte as a dedicated HTTPS service that your other applications call over the network—ideal when you want clear isolation or horizontal scaling.

PostgreSQL gives you durable, production-grade storage, ready for high-volume inbox synchronization and queueing.

Offer OAuth sign-in for both Gmail and Outlook users so every customer cohort can authorize their inbox securely.

Key ingredients

  • Deployment Standalone
  • Database PostgreSQL
  • Queues In-memory queues
  • Webhooks No webhooks
  • Providers Google (Gmail) and Microsoft (Outlook)
  • Advanced OpenTelemetry tracing and metrics

This recipe keeps the built-in in-memory queue, which is perfect for prototypes, QA environments, and quick internal tooling where simplicity wins.

Webhooks are skipped here, letting you focus on synchronous API integrations before introducing event-driven flows.

Advanced features enabled: OpenTelemetry tracing and metrics. Wire those signals into your observability stack before going live.

Standalone CLI

🚀 Installation & Bootstrap

Run the CLI to scaffold riposte/sync.config.json plus riposte/.env, then launch the managed runtime with npx riposte-run.

src/server.ts
npm install @riposte.co/server

# Install the Riposte CLI
curl -sSL https://install.riposte.co/cli | bash

# Bootstrap a new Riposte workspace
# Initialize Riposte in a new directory
npx riposte-init my-riposte-project
cd my-riposte-project

# Edit riposte/sync.config.json (same shape as the runtime config below)
# Populate riposte/.env with your secrets, then launch the managed runtime
npx riposte-run

// Riposte managed runtime handles HTTP server & admin portal
// Deploy anywhere Node.js runs (Fly.io, Render, Railway, etc.)
Environment first: Keep secrets in .env (or your secrets manager) and reference them from the runtime config you pass to createRiposteServer.
Admin portal: Once the server is running, open http://localhost:8080. Passing adminPortal: true boots the portal with default admin/admin credentials—change them in the UI or via environment variables.

⚙️ Configuration

Drop these variables into .env (or your secrets manager) before booting the server.

Environment coverage

  • 🔑 API key for SDK & REST authentication
  • 🗄️ PostgreSQL database connection
  • 📧 Google OAuth client credentials
  • 🏢 Microsoft Entra application credentials
  • 📊 OpenTelemetry exporter endpoint & service name
.env
RIPOSTE_API_KEY=come-up-with-your-own-secure-api-key
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/riposte
GOOGLE_CLIENT_ID=your-google-oauth-client-id
GOOGLE_CLIENT_SECRET=your-google-oauth-client-secret
GOOGLE_REDIRECT_URI=http://localhost:8080/providers/gmail/callback
MICROSOFT_CLIENT_ID=your-microsoft-entra-client-id
MICROSOFT_CLIENT_SECRET=your-microsoft-entra-client-secret
MICROSOFT_REDIRECT_URI=http://localhost:8080/providers/microsoft/callback
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=riposte-integration
riposte/sync.config.json
{
  "database": {
    "url": "env:DATABASE_URL"
  },
  "providers": {
    "google": {
      "clientId": "env:GOOGLE_CLIENT_ID",
      "clientSecret": "env:GOOGLE_CLIENT_SECRET",
      "redirectUri": "env:GOOGLE_REDIRECT_URI"
    },
    "microsoft": {
      "clientId": "env:MICROSOFT_CLIENT_ID",
      "clientSecret": "env:MICROSOFT_CLIENT_SECRET",
      "redirectUri": "env:MICROSOFT_REDIRECT_URI"
    }
  },
  "logging": {
    "openTelemetry": {
      "enabled": true,
      "url": "env:OTEL_EXPORTER_OTLP_ENDPOINT",
      "serviceName": "env:OTEL_SERVICE_NAME"
    }
  }
}
Apply changes: Restart Riposte after editing .env so the new credentials load into the runtime.
CLI alignment: riposte/sync.config.json mirrors these fields. Keep it in sync with .env before rerunning npx riposte-run.

📮 Providers

Console steps and environment variables for each provider you enabled.

🔍 Google Setup

Capture OAuth client credentials and drop them into your environment:

  1. Open Google Cloud Console and create OAuth client credentials.
  2. Configure the consent screen for external users if you haven't already.
  3. Use the scope planner to copy the Gmail + People API scopes you need.
  4. Set GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REDIRECT_URI in .env, then restart Riposte.

Integration choices

  • Connection mode: OAuth consent screen
  • Accounts expected: 5

🏢 Microsoft Setup

Provision an Entra application so Riposte can access the right mailbox scopes:

  1. Create an app registration inside Microsoft Entra.
  2. Add delegated permissions for Microsoft Graph (Mail.Read, Mail.Send, etc.).
  3. Generate a client secret and copy the value before leaving the blade.
  4. Drop MICROSOFT_CLIENT_ID, MICROSOFT_CLIENT_SECRET, and MICROSOFT_REDIRECT_URI into .env.
Tenant approval: Admin consent may be required depending on your scopes.

Integration choices

  • Connection mode: Delegated OAuth consent
  • Accounts expected: 5
💡 Tip: Need instructions? Open the Google Workspace guide or Microsoft 365 guide for console setup and scope recommendations.

🔗 Integration Code

Call the Riposte REST endpoints or SDK from your backend using the API key issued in the admin portal.

routes/oauth.ts
import { createRiposteSdk } from '@riposte.co/sdk'

const sdk = createRiposteSdk({
  apiKey: process.env.RIPOSTE_API_KEY!,
  baseUrl: 'http://localhost:8080',
})

const { data } = await sdk.messages.list()
console.log('Messages:', data)
Terminal
curl --request GET   --url http://localhost:8080/api/messages   --header "Authorization: Bearer $RIPOSTE_API_KEY"
Authentication: Set RIPOSTE_API_KEY in your environment and include it as a bearer token on every request.
Base URL: Standalone deployments listen on http://localhost:8080 by default.
Manual session: For custom OAuth flows, use const { authUrl } = await riposteSdk.authentication.createSession({ redirectUri: 'https://app.example.com/oauth/callback' })

⚡ Advanced Configuration

Optional features for production-ready deployments:

🔧 Enabled Features:

📊 OpenTelemetry

📊 OpenTelemetry Integration

Enable distributed tracing and metrics collection. The config snippets above already add logging.openTelemetry; just supply the exporter details:

.env
# Add to your environment
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
OTEL_SERVICE_NAME=riposte-integration
📡 Tracing: Export spans and metrics to your collector without wrapping every handler manually.

Optional: Type your frontend with @riposte.co/api-types

Install in your frontend project with npm install @riposte.co/api-types to add lightweight type safety. This is optional, but it keeps your UI code aligned with the API responses shown in this guide.

import type { ApiResponse, Message } from '@riposte.co/api-types'

type ThreadResponse = ApiResponse['/accounts/{accountId}/threads/{threadId}']['get']

const ThreadList = ({ threads }: { threads: ThreadResponse }) => {
  return (
    <div>
      {threads.map((thread) => (
        <div key={thread.id}>{thread.subject}</div>
      ))}
    </div>
  )
}

const MessageItem = ({ message }: { message: Message }) => {
  return (
    <div>
      <div>{message.subject}</div>
      <div>{message.body}</div>
    </div>
  )
}