Architecture Overview
Key Components
- TenantDashboard Model - Maps tenants to Papermap dashboards
- HMAC Signature Service - Securely authenticates API requests
- Dashboard Handler - Creates dashboards and generates embed tokens
- Dashboard Router - API endpoints for dashboard operations
Quick Start
Follow these guides in order to implement the backend:Set Up Authentication
Implement HMAC signature authentication to securely communicate with the
Papermap API.
HMAC Authentication
Learn how to implement HMAC-SHA256 signature authentication
Create Dashboards
Set up the ability to create and manage dashboards for your tenants.
Creating Dashboards
Learn how to create dashboards via the Papermap API
Generate Embed Tokens
Generate secure tokens to embed dashboards in your frontend.
Iframe Embed Tokens
Learn how to generate secure embed tokens
Build API Endpoints
Create REST API endpoints for your frontend to interact with.
API Endpoints
Example REST API endpoints for dashboard operations
Secure Your Implementation
Follow security best practices for production deployment.
Security Best Practices
Learn about security considerations and best practices
Database Model
First, create a model to link your tenants to their Papermap dashboards:It is not required to save it this way, but you need to have a way to map your tenant to their dashboards.
Prerequisites
Before implementing, ensure you have:- Papermap API credentials (API Key ID and Secret Key)
- Your workspace ID
- API endpoint URL (obtain from your Papermap dashboard settings)
Environment Configuration
Store your credentials securely in environment variables:.env
Obtaining Your Configuration: - API Credentials: Available in your
Papermap dashboard under Settings → API Keys - API Endpoint: Available
in Settings → API Configuration - Always use the values provided in your
dashboard for your specific workspace
Implementation Guides
HMAC Authentication
Implement secure HMAC signature authentication
Creating Dashboards
Create and manage dashboards for tenants
Iframe Tokens
Generate secure embed tokens
API Endpoints
Build REST API endpoints
Tenant Usage
Track per-tenant credit consumption
Security
Security best practices
Best Practices
Performance and scalability tips
Common Pattern Reference
The HMAC signature pattern for tenant dashboards follows this flow:Next Steps
Frontend Setup
Learn how to embed dashboards in your frontend application

