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/$%7Bsuccess?q=database&page=236&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 7136 results for "database"(3141ms)

offlineexamappschema.ts5 matches

@chrisboss•Updated 2 weeks ago
1/**
2 * Database Schema for the Nigerian Mock Exam Application
3 *
4 * This file defines the IndexedDB schema and types for the application.
5 */
6
7// Database configuration
8export const DB_CONFIG = {
9 name: "NigerianMockExamDB",
102}
103
104// Database initialization function
105export async function initDatabase(): Promise<IDBDatabase> {
106 return new Promise((resolve, reject) => {
107 const request = indexedDB.open(DB_CONFIG.name, DB_CONFIG.version);
108
109 request.onerror = (event) => {
110 reject(new Error("Failed to open database"));
111 };
112

offlineexamappApp.tsx4 matches

@chrisboss•Updated 2 weeks ago
3import { Routes, Route, Navigate } from "https://esm.sh/react-router-dom@6.20.1?deps=react@18.2.0";
4import { useAuth } from "../hooks/useAuth";
5import { useDatabase } from "../hooks/useDatabase";
6
7// Lazy load pages to improve initial load time
49
50const App: React.FC = () => {
51 const { isInitialized } = useDatabase();
52 const { isAuthenticated, user } = useAuth();
53 const [isOnline, setIsOnline] = useState(navigator.onLine);
67 }, []);
68
69 // Show loading state while database is initializing
70 if (!isInitialized) {
71 return (
75 <div className="h-full bg-blue-500 animate-pulse"></div>
76 </div>
77 <p className="mt-4 text-gray-600">Setting up local database...</p>
78 </div>
79 );

offlineexamappindex.tsx3 matches

@chrisboss•Updated 2 weeks ago
5import App from "./components/App";
6import { AuthProvider } from "./contexts/AuthContext";
7import { DatabaseProvider } from "./contexts/DatabaseContext";
8
9// Initialize the application
23 <React.StrictMode>
24 <BrowserRouter>
25 <DatabaseProvider>
26 <AuthProvider>
27 <App />
28 </AuthProvider>
29 </DatabaseProvider>
30 </BrowserRouter>
31 </React.StrictMode>

offlineexamappREADME.md1 match

@chrisboss•Updated 2 weeks ago
47│ └── index.tsx # Frontend entry point
48└── shared/
49 ├── database/ # IndexedDB schema and operations
50 └── models/ # Shared data models
51```

Jjindex.ts3 matches

@Jjjiii•Updated 2 weeks ago
2import { Hono } from "npm:hono";
3import { blob } from "https://esm.town/v/std/blob";
4import { runMigrations } from "./database/migrations.ts";
5import {
6 createUser,
8 getOnlineUsers,
9 getRecentMessages
10} from "./database/queries.ts";
11import { handleWebSocketConnection } from "./websocket.ts";
12import { MessageType } from "../shared/types.ts";
13
14// Run database migrations
15await runMigrations();
16

Jjwebsocket.ts1 match

@Jjjiii•Updated 2 weeks ago
5 createMessage,
6 getRecentMessages
7} from "./database/queries.ts";
8
9// Store active WebSocket connections

JjREADME.md1 match

@Jjjiii•Updated 2 weeks ago
13- **Backend** (`/backend/index.ts`): Hono HTTP server with WebSocket support for real-time messaging
14- **Frontend** (`/frontend/components/App.tsx`): React application for the chat interface
15- **Database**: SQLite for storing users, messages, and file references
16- **Storage**: Val Town blob storage for images and voice recordings
17

HjREADME.md1 match

@Jjjiii•Updated 2 weeks ago
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

reactHonoStarterREADME.md1 match

@Jjjiii•Updated 2 weeks ago
9- The **client-side entrypoint** is `/frontend/index.html`, which in turn imports `/frontend/index.tsx`, which in turn imports the React app from `/frontend/components/App.tsx`.
10
11[React Hono Example](https://www.val.town/x/stevekrouse/reactHonoExample) is a fuller featured example project, with a SQLite database table, queries, client-side CSS and a favicon, and some shared code that runs on both client and server.

TownieTODOs.md1 match

@juancgarza•Updated 2 weeks ago
9- [ ] make it one click to branch off like old jp townie demos
10- [ ] opentownie as a pr bot
11- [ ] give it the ability to see its own client-side and server-side logs by building a middleware that shoves them into a SQL light database date and then give it a tool to access them
12- [ ] do a browser use or screenshot thing to give it access to its own visual output
13- [ ] Have it default to creating a new branch off main

bookmarksDatabase

@s3thi•Updated 3 months ago

sqLiteDatabase1 file match

@ideofunk•Updated 6 months ago