Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

משפּחה געשיכטע

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.

Getting started

npm install
npm run dev

Firebase setup

Create 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_id

The app initializes Firebase in src/lib/firebase.ts.

Import PDFs (Firebase Storage + Firestore)

  1. Download the PDFs from Google Drive so they exist on disk.
  2. 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"
  1. 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.

Admin access

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"

Document metadata

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
}

Normalize titles (dates + display titles)

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.mjs

Use --overwrite to re-run for documents that already have date or displayTitle.

Next steps

  • Curate metadata (years, languages, tags, descriptions)
  • Add a lightweight admin UI for edits
  • Generate thumbnails for faster browsing

Deploy (Firebase Hosting)

npm install
npm run build
firebase deploy --only hosting

Firestore rules

Deploy Firestore rules:

firebase deploy --only firestore:rules,firestore:indexes

Storage rules

Deploy Storage rules:

firebase deploy --only storage

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages