'use client'; import { Code2, FileText } from 'lucide-react'; import { useState } from 'react'; import Header from '@/components/Header'; export default function IntegratePage() { const [copied, setCopied] = useState(false); const markdownContent = `# aturi.to Integration Guide Add universal sharing to your ATProto application in minutes. ## URL Structure aturi.to uses a simple, predictable URL pattern based on ATProto URIs: ### For profiles: \`\`\` aturi.to/profile/[handle or did] \`\`\` Example: \`aturi.to/profile/alice.bsky.social\` ### For posts: \`\`\` aturi.to/profile/[handle or did]/post/[rkey] \`\`\` Example: \`aturi.to/profile/alice.bsky.social/post/3k7qw...\` ### For records (any collection): \`\`\` aturi.to/profile/[handle or did]/[collection]/[rkey] \`\`\` Example: \`aturi.to/profile/alice.bsky.social/app.bsky.feed.post/3k7qw...\` ### Bare paths without /profile/ also work For backwards compatibility, all of the above also resolve without the \`/profile/\` prefix (e.g. \`aturi.to/alice.bsky.social/app.bsky.feed.post/3k7qw...\`). New links should prefer the canonical \`/profile/\` form. ### Full AT URI format (also supported): \`\`\` aturi.to/at://[did or handle]/[collection]/[rkey] \`\`\` Example: \`aturi.to/at://did:plc:lcieujcfkv4jx7gehsvok3pr/app.bsky.feed.threadgate/3lwtzzgb7y22z\` Note: Modern browsers support the literal \`at://\` in URL paths. ## Code Examples ### JavaScript/TypeScript \`\`\`typescript // Convert AT URI to aturi.to link function toAturiLink(atUri: string): string { // at://alice.bsky.social/app.bsky.feed.post/3k7qw... const uri = atUri.replace('at://', ''); return \`https://aturi.to/profile/\${uri}\`; } // Usage const atUri = "at://alice.bsky.social/app.bsky.feed.post/3k7qw..."; const shareLink = toAturiLink(atUri); // https://aturi.to/profile/alice.bsky.social/app.bsky.feed.post/3k7qw... // Or keep the literal at:// in the URL const fullAtUri = "at://did:plc:xxx/app.bsky.feed.post/3k7qw..."; const atUriLink = \`https://aturi.to/\${fullAtUri}\`; // https://aturi.to/at://did:plc:xxx/app.bsky.feed.post/3k7qw... \`\`\` ### React Component \`\`\`tsx import { Share2 } from 'lucide-react'; interface ShareButtonProps { atUri: string; } function ShareButton({ atUri }: ShareButtonProps) { const shareUrl = \`https://aturi.to/profile/\${atUri.replace('at://', '')}\`; const handleShare = async () => { if (navigator.share) { await navigator.share({ url: shareUrl }); } else { await navigator.clipboard.writeText(shareUrl); } }; return ( ); } \`\`\` ### Python \`\`\`python def to_aturi_link(at_uri: str) -> str: """ Convert AT URI to aturi.to link Args: at_uri: The ATProto URI (e.g., 'at://alice.bsky.social/...') Returns: The shareable aturi.to URL """ uri = at_uri.replace('at://', '') return f'https://aturi.to/profile/{uri}' # Usage at_uri = "at://alice.bsky.social/app.bsky.feed.post/3k7qw..." share_link = to_aturi_link(at_uri) # https://aturi.to/profile/alice.bsky.social/app.bsky.feed.post/3k7qw... \`\`\` ## Use Cases ### Share Buttons Add a "Share via aturi.to" button next to posts, letting users share content across curated ATProto platforms. ### Embedded Links Use aturi.to links in documentation, email newsletters, or anywhere you want flexible, platform-agnostic sharing. ### QR Codes Generate QR codes from aturi.to links for physical media, letting people scan and choose their viewing platform. ### Cross-Platform Notifications Send notifications with aturi.to links that work regardless of which client the recipient prefers. --- aturi.to is a community tool for the ATProto ecosystem. The service is free and requires no API keys or registration. `; const handleCopyMarkdown = async () => { try { await navigator.clipboard.writeText(markdownContent); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch (err) { console.error('Failed to copy:', err); } }; return (
{/* Site Header */}
{/* Hero Section - Asymmetric */}

Integration Guide

Add universal sharing to your ATProto application in minutes

Full guide as markdown

{/* URL Structure - Staggered */}

URL Structure

Simple, predictable patterns based on ATProto URIs. Works with handles or DIDs.

For profiles:

aturi.to/profile/[handle or did]

Example: aturi.to/profile/alice.bsky.social

For records (posts, lists, etc.):

aturi.to/profile/[handle or did]/[collection]/[rkey]

Example: aturi.to/profile/alice.bsky.social/app.bsky.feed.post/3k7qw...

The bare path without /profile/ also works for backwards compatibility.

Also supports full AT URI format (literal at:// in URL):

aturi.to/at://[did or handle]/[collection]/[rkey]

Example: aturi.to/at://did:plc:lcieujcfkv4jx7gehsvok3pr/app.bsky.feed.threadgate/3lwtzzgb7y22z

{/* Code Examples - Organic Layout */}

Code Examples

JavaScript/TypeScript

{`// Convert AT URI to aturi.to link
function toAturiLink(atUri: string): string {
  // at://alice.bsky.social/app.bsky.feed.post/3k7qw...
  const uri = atUri.replace('at://', '');
  return \`https://aturi.to/profile/\${uri}\`;
}

// Usage
const atUri = "at://alice.bsky.social/app.bsky.feed.post/3k7qw...";
const shareLink = toAturiLink(atUri);
// https://aturi.to/profile/alice.bsky.social/app.bsky.feed.post/3k7qw...

// Or keep the literal at:// in the URL
const fullAtUri = "at://did:plc:xxx/app.bsky.feed.post/3k7qw...";
const atUriLink = \`https://aturi.to/\${fullAtUri}\`;
// https://aturi.to/at://did:plc:xxx/app.bsky.feed.post/3k7qw...`}

React Component

{`import { Share2 } from 'lucide-react';

interface ShareButtonProps {
  atUri: string;
}

function ShareButton({ atUri }: ShareButtonProps) {
  const shareUrl = \`https://aturi.to/profile/\${atUri.replace('at://', '')}\`;
  
  const handleShare = async () => {
    if (navigator.share) {
      await navigator.share({ url: shareUrl });
    } else {
      await navigator.clipboard.writeText(shareUrl);
    }
  };
  
  return (
    
  );
}`}

Python

{`def to_aturi_link(at_uri: str) -> str:
    """Convert AT URI to aturi.to link"""
    uri = at_uri.replace('at://', '')
    return f'https://aturi.to/profile/{uri}'

# Usage
at_uri = "at://alice.bsky..."
link = to_aturi_link(at_uri)
# https://aturi.to/profile/alice.bsky...`}
{/* Use Cases - Asymmetric Grid */}

Use Cases

Share Buttons

Add a “Share via aturi.to” button next to posts, letting users share content that anyone can view on their preferred platform.

QR Codes

Generate QR codes from aturi.to links for physical media

Embedded Links

Use in documentation, newsletters, or anywhere you want flexible sharing

Cross-Platform Notifications

Send notifications with aturi.to links that work regardless of which client the recipient prefers.

{/* Submit Your App Card */}

Submit your app as a waypoint

Building an ATProto client or tool? We'd love to consider adding it to our curated list of waypoints so users can choose your platform when sharing content.

Email aturi@atpota.to DM on Bluesky
{/* Support - Full Width Centered */}

Questions or Feedback?

aturi.to is a community tool for the ATProto ecosystem. The service is completely free and requires no API keys or registration.

Feel free to reach out with suggestions or bug reports.

); }