45โ โโโ routes/ # Route definitions and HTTP handling
46โ โ โโโ api/ # API endpoints
47โ โ โโโ glimpse/ # Glimpse routes (enhanced with React frontend)
48โ โ โโโ tasks/ # Task-related routes
49โ โ โโโ views/ # User-facing views
50โ โ โโโ authCheck.ts # Authentication middleware
51โ โโโ services/ # External service integrations
52โโโ frontend/ # React frontend assets
53โ โโโ glimpse.html # HTML template for glimpse views
54โ โโโ glimpse.tsx # React entry point
55โ โโโ components/ # React components
56โ โ โโโ GlimpseView.tsx # Main glimpse display component
57โ โ โโโ NotionBlock.tsx # Notion block renderer
120### Data Access Routes
121- `GET /views/glimpse/:id` - Get complete page data with blocks by Notion page ID (JSON only)
122- `GET /glimpse/:id` - **Enhanced with React Frontend** - Content negotiation based on Accept header:
123- **Browser requests** (`Accept: text/html`): Returns rich React frontend with interactive Notion content display
124- **API requests** (`Accept: application/json`): Returns raw JSON data (same as before)
125- **Fallback**: If HTML template fails to load, automatically serves JSON
126127### React Frontend Features
128129The `/glimpse/:id` endpoint now includes a rich React frontend when accessed via browser:
130131#### **Content Rendering**
153- **Content Negotiation**: Single endpoint serves both HTML and JSON
154- **Static File Serving**: Frontend assets served via `/frontend/*` route
155- **React 18.2.0**: Pinned version for consistency
156- **TypeScript Support**: Shared types for Notion data structures
157- **Prism.js Integration**: Advanced syntax highlighting with automatic language detection, line numbers, and support for 30+ programming languages including JavaScript, TypeScript, Python, Java, C++, and more (performance-optimized with non-blocking script loading)
158159**Note:** The glimpse endpoints now provide both programmatic access (JSON) and user-friendly viewing (React frontend) from the same URL, maintaining backward compatibility while adding rich content display capabilities.
160161### Demo API Endpoints
basic-html-starterREADME.md1 match
3435If you want more interactivity, check out this
36[React starter](https://www.val.town/x/std/reactHonoStarter).
3738### โ favicon.svg
basic-html-starterREADME.md1 match
3435If you want more interactivity, check out this
36[React starter](https://www.val.town/x/std/reactHonoStarter).
3738### โ favicon.svg
tanstack-basicmain.tsx5 matches
1/** @jsxImportSource https://esm.sh/react@19 */
2import {
3QueryClient,
4QueryClientProvider,
5} from "https://esm.sh/@tanstack/react-query@^5.0.0?deps=react@19";
6import {
7createRootRouteWithContext,
11Outlet,
12RouterProvider,
13} from "https://esm.sh/@tanstack/react-router@^1.121.0?deps=react@19";
14import React from "https://esm.sh/react@19";
15import { createRoot } from "https://esm.sh/react-dom@19/client?deps=react@19";
16import { App } from "./App.tsx";
17
tanstack-basicApp.tsx2 matches
1/** @jsxImportSource https://esm.sh/react@19 */
2import React from "https://esm.sh/react@19";
3import { type PostType, usePosts } from "./posts.ts";
4
basic-html-starterREADME.md1 match
3435If you want more interactivity, check out this
36[React starter](https://www.val.town/x/std/reactHonoStarter).
3738### โ favicon.svg
tanstack-basicposts.ts1 match
1import { useQuery } from "https://esm.sh/@tanstack/react-query@^5.0.0?deps=react@19";
2import axios from "https://esm.sh/redaxios";
3
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2import { sqlite } from "https://esm.town/v/std/sqlite?v=6";
3import { parseProject } from "https://esm.town/v/std/utils/index.ts";
4import { html } from "https://esm.town/v/stevekrouse/html";
5import { renderToString } from "npm:react-dom@18.2.0/server";
6import config from "./config.json" with { type: "json" };
7import { SparklineSVG } from "./sparklineSVG";
statussparklineSVG1 match
1/** @jsxImportSource https://esm.sh/react@18.2.0 */
2export function SparklineSVG({ strokeWidth = 2, data = [], fill = "none", stroke = "black" }) {
3const padding = 2;
linkInBioTemplatemain.tsx2 matches
1/** @jsxImportSource https://esm.sh/react */
2import { renderToString } from "npm:react-dom/server";
34export default async function(req: Request) {