freezmo/app/offline/page.tsx
Martin Dvorak 3ea2cea100 Freezmo: self-hosted notes-to-activities study app
Next.js 15 app that turns photos, PDFs, DOCX/PPTX and text into a swipeable
feed of AI-generated activities (flashcards, multiple choice, true/false,
fill-in-the-blank, matching, ordering, short answer) using the user's own
Ollama models.

Highlights:
- All AI calls run in server route handlers; the browser never talks to Ollama.
- Bring-your-own-key mode (default): the key lives only in the browser and is
  sent per-request; server, local-daemon and shared-key modes also supported.
- Client-side document extraction (pdf.js, mammoth, jszip) with scanned-PDF
  page rendering for the vision model; notes stay in their original language.
- ChatGPT-style shell: collapsible sidebar / mobile drawer, neutral token-based
  light + dark themes, folder organisation, PWA (manifest, SW, offline page).
- Strict JSON validation with zod + auto-repair, rate limiting, and request
  guards (cross-origin, body-size, API-key sanitising).
- setup.sh bootstraps deps, .env.local and a production build.

Gitignore excludes .env*, the generated pdf.js worker and local scratch files.
2026-10-06 20:56:55 +00:00

19 lines
806 B
TypeScript

import { HomeIcon } from "@/components/icons";
export const metadata = { title: "Offline" };
/** Shown by the service worker when a navigation can't reach the network. */
export default function OfflinePage() {
return (
<main className="frost-bg grid min-h-dvh place-items-center px-4">
<div className="card relative max-w-sm space-y-3 p-6 text-center">
<HomeIcon className="mx-auto size-8 text-frost-400" />
<h1 className="text-xl font-semibold text-frost-950 dark:text-frost-50">You&apos;re offline</h1>
<p className="text-sm text-frost-600 dark:text-frost-300">
Freezmo needs a connection for generating decks and grading answers. Your saved decks are
still in this browser — reconnect and reload.
</p>
</div>
</main>
);
}