13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans
27 <head>
28 <title>SQLite Explorer</title>
29 <link rel="preconnect" href="https://fonts.googleapis.com" />
30
31 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32 <link
33 href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34 rel="stylesheet"
35 />
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5// TMDB API Configuration
6const TMDB_API_KEY = "3fd2be6f0c70a2a598f084ddfb75487c"; // Public read-only key
7const TMDB_BASE_URL = "https://api.themoviedb.org/3";
8const TMDB_IMAGE_BASE_URL = "https://image.tmdb.org/t/p/w500";
9
45 async () => {
46 const response = await fetch(
47 `${TMDB_BASE_URL}/search/person?api_key=${TMDB_API_KEY}&query=${encodeURIComponent(searchTerm)}&language=en-US&page=1`
48 );
49 const data = await response.json();
54 const alternativeSearches = INDIAN_FILM_KEYWORDS.map(async (keyword) => {
55 const response = await fetch(
56 `${TMDB_BASE_URL}/search/person?api_key=${TMDB_API_KEY}&query=${encodeURIComponent(`${searchTerm} ${keyword}`)}&language=en-US&page=1`
57 );
58 const data = await response.json();
108 async () => {
109 const response = await fetch(
110 `${TMDB_BASE_URL}/person/${actorId}/movie_credits?api_key=${TMDB_API_KEY}&language=en-US`
111 );
112 const data = await response.json();
118 INDIAN_LANGUAGES.map(async (lang) => {
119 const response = await fetch(
120 `${TMDB_BASE_URL}/discover/movie?api_key=${TMDB_API_KEY}&with_cast=${actorId}&with_original_language=${lang}&sort_by=popularity.desc`
121 );
122 const data = await response.json();
835 <head>
836 <title>🌽 Kernel CRM</title>
837 <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
838 <style>${css}</style>
839 <meta name="viewport" content="width=device-width, initial-scale=1" />
72
73Built using:
74- [atproto/api](https://www.npmjs.com/package/@atproto/api) for Bluesky integration
75- [Val Town](https://val.town) for hosting and scheduling
10## Getting Started
11
121. Create a [Val Town API token](https://www.val.town/settings/api) with Val read and write permissions
132. Paste the token into the input box and get started
14
15## Forking the Project
16
17You'll need to get an **Open Router API key**.
18We choose Open Router so we could easily switch between
19all models. We soon want to make it so you can choose your
20model from a dropdown, but we're having trouble formatting the api calls such that they work on all providers. Maybe we need to switch to the vercel sdk
26 * DO NOT use the alert(), prompt(), or confirm() methods.
27
28 * If the user's app needs weather data, use open-meteo unless otherwise specified because it doesn't require any API keys.
29
30 * Tastefully add a view source link back to the user's val if there's a natural spot for it. Generate the val source url via `import.meta.url.replace("esm.town", "val.town")`. This link element should include a target="_top" attribute.
38 Val Town's client-side catch script automatically catches client-side errors to aid in debugging.
39
40 * Don't use any environment variables unless strictly necessary. For example use APIs that don't require a key.
41 If you need environment variables use `Deno.env.get('keyname')`
42
29
30 const openai = new OpenAI({
31 baseURL: "https://openrouter.ai/api/v1",
32 apiKey: Deno.env.get("OPEN_ROUTER_KEY"),
33 });
34 console.log(messages);
2 * This application creates a thumbnail maker using Hono for server-side routing and client-side JavaScript for image processing.
3 * It allows users to upload images, specify output options, and generate a composite thumbnail image.
4 * The app uses the HTML5 Canvas API for image manipulation and supports drag-and-drop functionality.
5 *
6 * The process is divided into two steps:
4
5// Utility Functions
6const API_BASE_URL = 'https://api.example.com';
7
8// Components
68 e.preventDefault();
69 try {
70 const response = await fetch(`${API_BASE_URL}/login`, {
71 method: 'POST',
72 headers: { 'Content-Type': 'application/json' },
121
122 try {
123 const response = await fetch(`${API_BASE_URL}/signup`, {
124 method: 'POST',
125 headers: { 'Content-Type': 'application/json' },
181
182 try {
183 const response = await fetch(`${API_BASE_URL}/upload`, {
184 method: 'POST',
185 body: formData
215
216 try {
217 const response = await fetch(`${API_BASE_URL}/chat`, {
218 method: 'POST',
219 headers: { 'Content-Type': 'application/json' },