Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ephraimduncan/minimal.so/llms.txt
Use this file to discover all available pages before exploring further.
Fetch public profile data for any user by their username. This endpoint returns the user’s profile information, public groups, and public bookmarks.
Endpoint
Source: server/procedures/public.ts:6
Input
The username of the profile to retrieve
Response
ISO 8601 timestamp of account creation
Array of public bookmark groups
ISO 8601 timestamp of creation
Array of public bookmarks across all public groups
Bookmark URL (null for color/text bookmarks)
Bookmark type: “link”, “color”, or “text”
Color value for color-type bookmarks
ISO 8601 timestamp of creation
Errors
Returned when:
- Username does not exist
- User’s profile is not public (
isProfilePublic: false)
- User has no public content
Visibility rules
A bookmark appears in the response only if:
- The parent group is public (
isPublic: true)
- AND either:
- Bookmark is explicitly public (
isPublic: true), OR
- Bookmark inherits visibility (
isPublic: null)
Bookmarks with explicit isPublic: false are never included, even if the group is public.
Usage examples
React Query (client component)
'use client';
import { client } from '@/lib/orpc';
function PublicProfile({ username }: { username: string }) {
const { data, isLoading, error } = client.public.getProfile.useQuery({
username,
});
if (isLoading) return <div>Loading profile...</div>;
if (error) return <div>Profile not found</div>;
return (
<div>
<h1>{data.user.name}</h1>
<p>{data.user.bio}</p>
<h2>Groups ({data.groups.length})</h2>
{data.groups.map(group => (
<div key={group.id}>
<h3>{group.name}</h3>
<p>Color: {group.color}</p>
</div>
))}
<h2>Bookmarks ({data.bookmarks.length})</h2>
{data.bookmarks.map(bookmark => (
<a key={bookmark.id} href={bookmark.url || '#'}>
{bookmark.title}
</a>
))}
</div>
);
}
Server component
import { serverClient } from '@/lib/orpc.server';
import { notFound } from 'next/navigation';
export default async function ProfilePage({
params,
}: {
params: { username: string };
}) {
try {
const profile = await serverClient.public.getProfile({
username: params.username,
});
return (
<div>
<h1>{profile.user.name}'s Bookmarks</h1>
<p>Total public groups: {profile.groups.length}</p>
<p>Total public bookmarks: {profile.bookmarks.length}</p>
</div>
);
} catch (error) {
notFound();
}
}
Direct client
import { client } from '@/lib/orpc';
try {
const profile = await client.public.getProfile.query({
username: 'johndoe',
});
console.log(`${profile.user.name} has ${profile.bookmarks.length} public bookmarks`);
// Filter bookmarks by group
const groupId = profile.groups[0].id;
const groupBookmarks = profile.bookmarks.filter(b => b.groupId === groupId);
} catch (error) {
console.error('Profile not found or not public');
}
Example response
{
"user": {
"name": "John Doe",
"email": "john@example.com",
"username": "johndoe",
"bio": "Developer and bookmark curator",
"github": "https://github.com/johndoe",
"twitter": "https://twitter.com/johndoe",
"website": "https://johndoe.com",
"image": "https://example.com/avatar.jpg",
"createdAt": "2024-01-15T10:00:00Z"
},
"groups": [
{
"id": "group_1",
"name": "Design Resources",
"color": "#3b82f6",
"createdAt": "2024-01-16T12:00:00Z"
}
],
"bookmarks": [
{
"id": "bookmark_1",
"title": "Figma",
"url": "https://figma.com",
"favicon": "https://figma.com/favicon.ico",
"type": "link",
"color": null,
"groupId": "group_1",
"createdAt": "2024-01-16T13:00:00Z"
}
]
}
Related endpoints