Skip to content

NeoLorenzo/FabbroFactory

Repository files navigation

Fabbro Factory

Personal content workspace built with Next.js, deployed as a PWA on GitHub Pages, with Supabase for auth + per-user cloud data.

Important scope note

This repository is open source, but it is not a general-purpose product and not intended as a turnkey app for other people.

It is specifically built for my own environment, workflows, naming conventions, and data assumptions. Other developers may still find parts of it useful, but using it as a base will require substantial refactors. Those refactors are intentionally out of scope for this project.

What this app currently does

  • Writing Space with saved document management
  • Phase-based document organization (Design, Alpha, Beta, Released)
  • Auto-pairing of article rows with saved documents by title match
  • Manual live Substack archive sync for publication data
  • Google OAuth sign-in via Supabase
  • PWA support (manifest + service worker)
  • Static export + deploy to GitHub Pages via GitHub Actions

Tech stack

  • Next.js 14 (App Router)
  • React 18
  • Supabase (@supabase/supabase-js)
  • GitHub Actions + GitHub Pages

Local development

Install and run:

npm ci
npm run dev

Typical local URL:

  • http://localhost:3000

Environment variables

Create .env.local:

NEXT_PUBLIC_SUPABASE_URL=...
NEXT_PUBLIC_SUPABASE_ANON_KEY=...

Notes:

  • .env* is ignored by git.
  • Only the public anon key is used client-side.

Supabase setup

Run the SQL in supabase/schema.sql inside the Supabase SQL Editor.

This creates:

  • public.user_document_libraries
  • public.substack_publication_sources
  • public.substack_archive_posts

All tables are protected with RLS policies keyed by auth.uid().

OAuth redirect configuration (important)

In Supabase Auth URL Configuration:

  • Set Site URL to your deployed app URL, for example:
    • https://neolorenzo.github.io/FabbroFactory/
  • Add Additional Redirect URLs for:
    • deployed URL(s)
    • local dev URL(s), e.g. http://localhost:3000/

If this is wrong, Google sign-in may redirect back to localhost or another unexpected URL.

GitHub Pages deployment

Workflow file: .github/workflows/deploy-pages.yml

Deployment model:

  • Trigger: every push to main
  • Build: next build with STATIC_EXPORT=true
  • Output: out/
  • Deploy target: GitHub Pages artifact deployment

In GitHub repository settings:

  1. Open Settings -> Pages
  2. Set Source to GitHub Actions

Required GitHub Actions secrets:

  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY

PWA files

Data model and flow

  • Documents are stored locally for responsiveness via browser storage.
  • When authenticated, cloud sync persists the document library to Supabase.
  • Projects are stored locally first and sync to Supabase (user_projects) when authenticated, with local fallback if cloud is unavailable.
  • Articles dashboards use manual archive sync from Substack into Supabase (substack_archive_posts), not CSV imports or a local Substack Data folder.

Privacy and repository hygiene

  • Ignored by git:
    • Substack Data/
    • .env, .env.*, .env.local
    • local dev logs (dev*.log)
  • If sensitive files were ever tracked historically, remove them from history before publishing a repo.

Non-goals

  • No promise of stable APIs or extension points for external integrators
  • No guarantee of backwards compatibility for schema or UI contracts
  • No support commitment for third-party deployments without heavy customization

Releases

No releases published

Packages

 
 
 

Contributors