• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
c15r

c15r

ProtoShare

Public
Like
2
ProtoShare
Home
Code
4
backend
3
frontend
3
shared
1
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
1
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://c15r--058e8cc03b4211f0a6d69e149126039e.web.val.run
README.md

iOS Share Sheet Backend

A secure backend system for iOS share sheet shortcuts with WebAuthn authentication and content management.

Features

  • WebAuthn Authentication: Secure passwordless authentication
  • iOS Share Sheet Integration: Accept text, images, and web URLs from iOS shortcuts
  • User Content Management: Timestamped content storage per user
  • Bearer Token API: Secure API access for shortcuts
  • Admin Interface: User and content management
  • Setup Workflow: Guided shortcut configuration

Project Structure

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€ migrations.ts    # Database schema
β”‚   β”‚   └── queries.ts       # Database operations
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”œβ”€β”€ auth.ts         # WebAuthn authentication
β”‚   β”‚   β”œβ”€β”€ content.ts      # Content management
β”‚   β”‚   β”œβ”€β”€ admin.ts        # Admin operations
β”‚   β”‚   └── static.ts       # Static file serving
β”‚   └── index.ts            # Main entry point
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ App.tsx         # Main application
β”‚   β”‚   β”œβ”€β”€ Auth.tsx        # Authentication UI
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx   # User dashboard
β”‚   β”‚   β”œβ”€β”€ Admin.tsx       # Admin interface
β”‚   β”‚   └── Setup.tsx       # Shortcut setup guide
β”‚   β”œβ”€β”€ index.html          # Main HTML template
β”‚   └── index.tsx           # Frontend entry point
β”œβ”€β”€ shared/
β”‚   └── types.ts            # Shared TypeScript types
└── README.md

API Endpoints

Authentication

  • POST /api/auth/register-start - Start WebAuthn registration
  • POST /api/auth/register-finish - Complete WebAuthn registration
  • POST /api/auth/login-start - Start WebAuthn login
  • POST /api/auth/login-finish - Complete WebAuthn login
  • POST /api/auth/token - Generate bearer token for shortcuts

Content Management

  • POST /api/content - Add content via shortcut (requires bearer token)
  • GET /api/content - Get user's content (requires authentication)
  • DELETE /api/content/:id - Delete content item

Admin (requires admin role)

  • GET /api/admin/users - List all users
  • GET /api/admin/content - List all content
  • POST /api/admin/users/:id/admin - Grant admin privileges

iOS Shortcut Setup

  1. Create Account: Visit the web interface and register with WebAuthn
  2. Generate Token: Create a bearer token for your shortcuts
  3. Install Shortcut: Use the provided shortcut template
  4. Configure Token: Add your bearer token to the shortcut
  5. Test: Share content from any iOS app

Environment Variables

  • ADMIN_EMAIL - Email address for the initial admin user

Getting Started

  1. Deploy this val to Val Town
  2. Visit the web interface to create your account
  3. Follow the shortcut setup guide
  4. Start sharing content from iOS!
HTTP
  • index.ts
    c15r--058e8cc03b4211f0a6d69e149126039e.web.val.run
Code
backendfrontendsharedREADME.md
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.