Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7BsvgDataUrl%7D?q=api&page=36&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 19333 results for "api"(5969ms)

68---
69
70## Phase 2: Core Backend API
71**Goal**: Build RESTful API endpoints for invoice management
72
73### Tasks:
741. **Main API Setup**
75 - Create `main.tsx` with Hono app configuration
76 - Set up error handling and static file serving
77 - Configure CORS if needed
78
792. **Invoice API Endpoints**
80 - `GET /api/invoices` - List all invoices with filtering
81 - `POST /api/invoices` - Create new invoice
82 - `PUT /api/invoices/:id` - Update invoice (mainly status changes)
83 - `DELETE /api/invoices/:id` - Delete invoice
84 - `GET /api/invoices/stats` - Dashboard statistics
85
863. **Vendor API Endpoints**
87 - `GET /api/vendors` - List all vendors
88 - `PUT /api/vendors/:id` - Update vendor name
89
90### Deliverables:
91- Complete REST API for invoice management
92- API endpoints tested via admin tools or direct calls
93- Proper error handling and validation
94
182
183## Technical Stack
184- **Backend**: Hono.js for API routes
185- **Database**: SQLite with Val Town's sqlite service
186- **Frontend**: React 18.2.0 with TypeScript
207
2081. **Phase 1: Foundation & Database Setup** - Get the core database structure and admin tools working
2092. **Phase 2: Core Backend API** - Build the REST API endpoints for managing invoices and vendors
2103. **Phase 3: Frontend Foundation** - Create the basic React UI with invoice display and forms
2114. **Phase 4: Enhanced UI & Interactions** - Add advanced features like dashboard, filtering, and bulk operations
223- Uses Val Town best practices with proper project structure
224- SQLite database with proper schema and constraints
225- Hono.js backend with RESTful API design
226- React frontend with TailwindCSS for styling
227- Admin utilities for easy database management and seeding
238- add a checkbox that the llm can mark off after completeing a phase.
239- no need for code to "Update vendor name" i will do that manually in admin code
240- no need to " - `DELETE /api/invoices/:id` - Delete invoice" , i'll do that using SQL commands , so add to plan to create a section in "db-tools.tsx" with some SQL commands that i can easily copy to run and a link to the database explorer "https://arfan25-admin-sqliteexplorerapp.val.run/"
241
242---
261## Phase Completion Checklist
262- [ ] Phase 1: Foundation & Database Setup
263- [ ] Phase 2: Core Backend API
264- [ ] Phase 3: Frontend Foundation
265- [ ] Phase 4: Enhanced UI & Interactions
284
285```markdown
2862. **Invoice API Endpoints**
287 - `GET /api/invoices` - List all invoices with filtering
288 - `POST /api/invoices` - Create new invoice
289 - `PUT /api/invoices/:id` - Update invoice (mainly status changes)
290 - `DELETE /api/invoices/:id` - Delete invoice
291 - `GET /api/invoices/stats` - Dashboard statistics
292
2933. **Vendor API Endpoints**
294 - `GET /api/vendors` - List all vendors
295 - `PUT /api/vendors/:id` - Update vendor name
296
297->
298
2992. **Invoice API Endpoints**
300 - `GET /api/invoices` - List all invoices with filtering
301 - `POST /api/invoices` - Create new invoice
302 - `PUT /api/invoices/:id` - Update invoice (mainly status changes)
303 - `GET /api/invoices/stats` - Dashboard statistics
304
3053. **Vendor API Endpoints**
306 - `GET /api/vendors` - List all vendors
307```
308
353```markdown
354## Technical Stack
355- **Backend**: Hono.js for API routes
356- **Database**: SQLite with Val Town's sqlite service
357- **Frontend**: React 18.2.0 with TypeScript
362
363## Technical Stack
364- **Backend**: Hono.js for API routes
365- **Database**: SQLite with Val Town's sqlite service
366- **Frontend**: React 18.2.0 with TypeScript
406- Updated technical stack to mention DaisyUI, nord theme, and Iconify v3
407
408✅ **Removed vendor name update API** - No longer planning to build `PUT /api/vendors/:id` endpoint since you'll handle this manually in admin tools
409
410✅ **Removed delete invoice API** - No longer planning `DELETE /api/invoices/:id` endpoint since you'll use SQL commands directly
411
412✅ **Enhanced admin tools** - Added to Phase 1:

api_ianmenethil_compackage.json2 matches

@ianmenethilUpdated 1 day ago
1{
2 "name": "modular-api-server",
3 "version": "1.0.0",
4 "description": "A modular API server with OpenAPI-driven routing",
5 "main": "main.tsx",
6 "type": "module",

api_ianmenethil_commain.tsx9 matches

@ianmenethilUpdated 1 day ago
1// F:\zApps\valtown.servers\APIServer\main.tsx
2import { Hono } from "hono";
3import type { HonoVariables } from "@/core/requestTypes.ts";
4import { APP_CONFIG } from "@/config/index.ts";
5import { generateRoutesFromOpenAPI } from "./src/openapi/routeGenerator.ts";
6
7const app = new Hono<{ Variables: HonoVariables }>();
18 initializationPromise = (async () => {
19 try {
20 const specPath = "./src/openapi/spec";
21 const result = await generateRoutesFromOpenAPI(app, specPath);
22 const routes = result.routes;
23 console.log(`✅ Initialized ${routes.length} routes from OpenAPI spec`);
24 routesInitialized = true;
25 return true;
26 } catch (error) {
27 console.error("❌ Failed to initialize routes from OpenAPI:", error);
28 app.all("*", (c) => {
29 return c.json(
32 error: {
33 code: "SERVICE_UNAVAILABLE",
34 message: "API routes not available - OpenAPI initialization failed",
35 details: error instanceof Error ? error.message : "Unknown error",
36 },
82 console.log(`📚 Swagger --> ${APP_CONFIG.server.BASE_URL}/docs`);
83 console.log(`🔗 Redocly --> ${APP_CONFIG.server.BASE_URL}/redoc`);
84 console.log(`🌐 OpenAPI Spec --> ${APP_CONFIG.server.BASE_URL}/openapi.json`);
85 console.log(`🌐 OpenAPI Spec --> ${APP_CONFIG.server.BASE_URL}/openapi.yaml`);
86 await initializeRoutes();
87 Deno.serve(

api_ianmenethil_comdeno.json2 matches

@ianmenethilUpdated 1 day ago
29 "@/config/": "./src/config/",
30 "@/core/": "./src/core/",
31 "@/external-apis/": "./src/external-apis/",
32 "@/gateway/": "./src/gateway/",
33 "@/handlers/": "./src/handlers/",
34 "@/h/oauth/": "./src/handlers/oauth/",
35 "@/middleware/": "./src/middleware/",
36 "@/openapi/": "./src/openapi/",
37 "@/routes/": "./src/routes/",
38 "@/services/": "./src/services/",
1// macro_news_daily.tsx — twice/day @ 04 & 16 UTC
2import { blob } from "https://esm.town/v/std/blob";
3const KEY = Deno.env.get("NEWSAPI");
4
5export default async function run() {
6 const q = encodeURIComponent(`Fed OR CPI OR inflation OR ECB OR RBA`);
7 const url = `https://newsapi.org/v2/everything?` +
8 `q=${q}&language=en&sortBy=publishedAt&pageSize=10&apiKey=${KEY}`;
9
10 const arts = (await fetch(url).then(r=>r.json())).articles ?? [];

honeydewmain.tsx6 matches

@legalUpdated 1 day ago
92 <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Honeydew</title>
93 <style> 
94 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&family=Inter:wght@400&display=swap'); 
95 @keyframes spin{to{transform:rotate(360deg)}}
96 @keyframes slide-in-bounce {
474 <script> 
475 (function() {
476  const API_URL = '${sourceUrl}'; 
477  const STORE_KEYS = { projects: 'honeydew_projects_v1', tasks: 'honeydew_tasks_v1', theme: 'honeydew_theme_v1' }; 
478  let projects = [], tasks = [], activeView = 'today', conversationHistory = []; 
679
680    try { 
681      const res = await fetch(\`\${API_URL}?action=chat\`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ messages: conversationHistory.slice(0, -1), tasks, projects }) }); 
682      const data = await res.json(); 
683      if (!res.ok || data.error) throw new Error(data.error || 'Server error'); 
783    toggleLoading(btn, true); 
784    try { 
785      const res = await fetch(\`\${API_URL}?action=synthesizeProject\`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ goal }) }); 
786      const data = await res.json(); 
787      if (!res.ok || data.error) throw new Error(data.error || "Server error"); 
801    toggleLoading(btn, true); 
802    try { 
803      const res = await fetch(\`\${API_URL}?action=dailyRebalance\`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ tasks: todayTasks }) }); 
804      const data = await res.json(); 
805      if (!res.ok || data.error) throw new Error(data.error || "Server error"); 
1031 }
1032 } catch (error) {
1033 console.error("AI API Error:", error);
1034 return new Response(
1035 JSON.stringify({ error: error.message || "An unknown error occurred with the AI service." }),

anchorPDSanchor.ts1 match

@tijsUpdated 2 days ago
106// app.dropanchor.getGlobalFeed
107app.get("/app.dropanchor.getGlobalFeed", async (c) => {
108 // Authenticate request to prevent scraping
109 const authContext = await authenticateRequest(c);
110 if (!authContext) {

girocodeindex.ts1 match

@fxfrUpdated 2 days ago
76 </head>
77 <body>
78 <h1>QR Code Generator API</h1>
79 <h2>Usage</h2>
80 <p>Generate QR codes for payment information using GET parameters:</p>

girocodeREADME.md6 matches

@fxfrUpdated 2 days ago
1# QR Code Generator API
2
3A simple HTTP API that generates QR codes for payment information based on SEPA (Single Euro Payments Area) standards.
4
5## Features
7- ✅ Generates SVG QR codes for payment information
8- ✅ Supports SEPA payment format
9- ✅ URL parameter-based API
10- ✅ Built-in validation and error handling
11- ✅ Help documentation endpoint
12- ✅ Caching headers for performance
13
14## API Endpoints
15
16### `GET /`
34
35### `GET /help`
36Returns HTML documentation for the API.
37
38## Usage Examples
70## Error Handling
71
72The API returns appropriate HTTP status codes:
73- `200` - Success (QR code generated)
74- `400` - Bad Request (missing required parameters)

enchantingBeigeFireflymain.tsx2 matches

@fkjkUpdated 2 days ago
26
27 // Get weather for the current position
28 const apiKey = "28b7fee1c3078108ffb899013952f3e5"; // Replace with actual API key
29 const weatherUrl =
30 `https://api.openweathermap.org/data/2.5/weather?lat=${position.latitude}&lon=${position.longitude}&units=metric&appid=${apiKey}`;
31
32 try {

researchAgent2 file matches

@thesephistUpdated 5 hours ago
This is a lightweight wrapper around Perplexity's web search API

memoryApiExample2 file matches

@ingenierotitoUpdated 6 hours ago
apiry
snartapi