A document-first archive built with React, TypeScript, and Vite. The initial MVP focuses on browsing manuscripts, letters, and documents with a clean reading experience for PDFs.
npm install
npm run devCreate a .env.local file in the project root with your Firebase config:
VITE_FIREBASE_API_KEY=your_key
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idThe app initializes Firebase in src/lib/firebase.ts.
- Download the PDFs from Google Drive so they exist on disk.
- Create a Firebase service account JSON and set the env var:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
export FIREBASE_STORAGE_BUCKET="mishpokhe-geshikhte.firebasestorage.app"- Run the import script:
node scripts/import-pdfs.mjs --root "/path/to/Family Research"Use --dry-run to preview and --overwrite to update existing documents.
To allow yourself to write to Firestore/Storage, set an admin claim on your user:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
node scripts/set-admin.mjs --email "you@example.com"Documents are currently mocked in src/data/documents.ts. The planned Firestore schema mirrors this structure:
{
id: string
title: string
displayTitle?: string
section: 'Manuscripts' | 'Letters' | 'Documents'
date?: string
year?: string
language?: string
description: string
tags: string[]
pdfUrl?: string
storagePath?: string
filename?: string
featured?: boolean
}To parse leading dates from Firestore titles and store date + displayTitle:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
node scripts/normalize-titles.mjs --dry-run
node scripts/normalize-titles.mjsUse --overwrite to re-run for documents that already have date or displayTitle.
- Curate metadata (years, languages, tags, descriptions)
- Add a lightweight admin UI for edits
- Generate thumbnails for faster browsing
npm install
npm run build
firebase deploy --only hostingDeploy Firestore rules:
firebase deploy --only firestore:rules,firestore:indexesDeploy Storage rules:
firebase deploy --only storage