1import { AtpAgent } from "https://esm.sh/@atproto/api@0.13.15";
2
3export const agent = new AtpAgent({ service: "https://public.api.bsky.app/" });
1```
2curl 'https://taras-free_open_router.web.val.run/api/v1/chat/completions' \
3 -H 'accept: application/json' \
4 -H 'authorization: Bearer THIS_IS_OVERRIDEN_ON_SERVER' \
5async function fetchRandomJoke() {
6 const response = await fetch(
7 "https://official-joke-api.appspot.com/random_joke",
8 );
9 return response.json();
3I built this as part of a larger project, as well a demo.
4
5The stack consists of [Clerk](https://www.clerk.com) for Auth, [InstantDB](https://www.instantdb.com) for my database, and the [Google maps api](https://developers.google.com/maps) for maps and routing etc.
6
7All the vals are located [here](https://vawogbemi-notuberfolder.web.val.run).
10* Fork all the vals, the link is [here](https://vawogbemi-notuberfolder.web.val.run).
11* Refactors the imports so they're importing from your vals and not this val.
12* Visit [Clerk](https://www.clerk.com), [InstantDB](https://www.instantdb.com), [Google maps api](https://developers.google.com/maps) and create accounts and get ur api keys.
13* Enter your api Keys into your [notUberConsts](https://www.val.town/v/vawogbemi/notUberConsts) and [notUberMapComponent](https://www.val.town/v/vawogbemi/notUberMapComponent) vals.
14* Follow me on [X](https://x.com/vawogbemi). THIS IS THE MOST IMPORTANT STEP.
15
3async function getRandomJoke() {
4 const response = await fetch(
5 "https://official-joke-api.appspot.com/random_joke",
6 );
7 return response.json();
3import { createRoot } from "https://esm.sh/react-dom/client";
4
5// Types for structured API response
6interface ResearchResult {
7 title: string;
116 const { query } = await request.json();
117
118 // Simulated Perplexity API call (replace with actual API integration)
119 const mockResult: ResearchResult = {
120 title: `Research on: ${query}`,
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
9}
10
11// Parses the response from the joke API.
12
13const randomJoke = await fetchRandomJoke();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();