MYHEALTHSOURCEmigrations.ts3 matches
1import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
23// Database schema for the health platform
4export async function runMigrations() {
5console.log("Running database migrations...");
67// Users table
182`);
183184console.log("Database migrations completed successfully!");
185}
186
6getAppointmentById,
7updateAppointmentStatus
8} from "../database/queries.ts";
910const appointments = new Hono();
MYHEALTHSOURCEhealth.ts1 match
8getBMIHistoryByUser,
9getDashboardData
10} from "../database/queries.ts";
1112const health = new Hono();
reactHonoStarterREADME.md1 match
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`.
1011[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.
untitled-7598index.ts2 matches
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { runMigrations } from "./database/migrations.ts";
3import boardsRouter from "./routes/boards.ts";
4import staticRouter from "./routes/static.ts";
11});
1213// Initialize database
14await runMigrations();
15
untitled-7598static.ts1 match
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils/index.ts";
3import * as db from "../database/queries.ts";
45const app = new Hono();
untitled-7598boards.ts1 match
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import * as db from "../database/queries.ts";
3import type {
4CreateColumnRequest,
untitled-7598README.md4 matches
15```
16โโโ backend/
17โ โโโ database/
18โ โ โโโ migrations.ts # Database schema setup
19โ โ โโโ queries.ts # Database query functions
20โ โโโ routes/
21โ โ โโโ boards.ts # Board management endpoints
51## Getting Started
52531. The backend will automatically create the necessary database tables on startup
542. Navigate to the root URL to access the kanban board interface
553. Create columns and start adding items to organize your work
19- **Temporary Sessions (Default)**: No data saved anywhere - maximum privacy
20- **Local Storage**: Sessions saved only in your browser - private and secure
21- **Server Storage**: Full AI analysis with persistent sessions saved to database
22- **Data Management**: Clear saved data with one click
23- Delete individual sessions
55โ โ โโโ power-abuse-analyzer.ts # Text analysis API
56โ โ โโโ static-file-server.ts # Static file server
57โ โโโ database/ # Database operations
58โ โ โโโ index.ts # SQLite database operations
59โ โโโ utils/ # Utility functions
60โ โ โโโ error-handler.ts # Error handling and response formatting
65โ โโโ analyzer.test.ts # Tests for text analysis
66โ โโโ chat-api.test.ts # Tests for chat API
67โ โโโ database.test.ts # Tests for database operations
68โ โโโ README.md # Test documentation
69โโโ frontend/ # Frontend files
73```
7475## Database Schema
7677The application uses SQLite with the following tables:
82- **Examples**: Stores examples of patterns, including user-provided examples
8384The database uses recursive common table expressions (CTEs) to handle threaded conversations about specific patterns.
8586## Usage
99- **๐ Temporary (Default)**: No data saved anywhere - maximum privacy
100- **๐พ Local Storage**: Sessions saved only in your browser - private and secure
101- **โ๏ธ Server Storage**: Full AI-powered analysis with sessions saved to the database
1024. Create a new analysis session
1035. Enter text to analyze or ask a question about power abuse patterns
117- **๐พ Local Storage**: Sessions are saved only in your browser's local storage. This provides privacy as data never leaves your device, but with limited analysis capabilities (no AI processing). Sessions are only available on the device where they were created.
118119- **โ๏ธ Server Storage**: Sessions are saved to the SQLite database on the server. This provides full AI-powered analysis using Cerebras Qwen-3 32B model, persistent sessions that can be accessed from any device, and complete pattern recognition capabilities.
120121## Prompts Used
con-juanchat-api.ts4 matches
1import * as db from "../database/index.ts";
2import { analyzeText } from "../analyzer/index.ts";
3import { handlePatternFollowUp } from "../analyzer/index.ts";
8const log = logger.createLogger('API:ChatAPI');
910// Initialize database
11await db.initDatabase();
1213// Types for our API
58const analysisResult = await analyzeText(message);
59
60// Store identified patterns in the database
61const messageId = await db.addMessage(session_id, message, "user", parent_id);
62const storedPatterns: db.Pattern[] = [];