Public
Like
2
ProtoShare
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.
index.ts
https://c15r--058e8cc03b4211f0a6d69e149126039e.web.val.run
A secure backend system for iOS share sheet shortcuts with WebAuthn authentication and content management.
- 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
βββ 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
POST /api/auth/register-start
- Start WebAuthn registrationPOST /api/auth/register-finish
- Complete WebAuthn registrationPOST /api/auth/login-start
- Start WebAuthn loginPOST /api/auth/login-finish
- Complete WebAuthn loginPOST /api/auth/token
- Generate bearer token for shortcuts
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
GET /api/admin/users
- List all usersGET /api/admin/content
- List all contentPOST /api/admin/users/:id/admin
- Grant admin privileges
- Create Account: Visit the web interface and register with WebAuthn
- Generate Token: Create a bearer token for your shortcuts
- Install Shortcut: Use the provided shortcut template
- Configure Token: Add your bearer token to the shortcut
- Test: Share content from any iOS app
ADMIN_EMAIL
- Email address for the initial admin user
- Deploy this val to Val Town
- Visit the web interface to create your account
- Follow the shortcut setup guide
- Start sharing content from iOS!