Skip to content

Latest commit

 

History

833 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

interactives.pub

中文 | English

Next.js React TypeScript Supabase Prisma License: MIT

interactives.pub is an open publishing platform for interactive research papers, experimental media, and peer-reviewed creative-technology work. It combines a public journal website, author submission flow, review timeline, collaborative editor, MDX documentation, notifications, and storage-backed publishing infrastructure.

Live site: https://interactives.pub Repository: https://github.com/sunyitong/interactives.pub

Highlights

  • Next.js App Router architecture with React 19 and TypeScript.
  • Public journal routes for papers, issues, news, showcase posts, and documentation.
  • Authenticated submission, account, invitation, and role-aware editorial flows.
  • Timeline-style review interface with internal and author-visible comments.
  • Browser-based editor with file tree, preview, compilation, and Yjs-backed collaboration state.
  • Supabase Auth, Storage, and Postgres integration through Prisma.
  • MDX-powered documentation with Fumadocs.
  • PWA/offline support for selected editor and preview surfaces.
  • AI-assisted editorial and command features behind server-side quota and rate-limit controls.

Architecture

flowchart LR
  A["Authors and readers"] --> B["Next.js App Router"]
  B --> C["Public journal pages"]
  B --> D["Submission and review flows"]
  B --> E["Collaborative editor"]
  D --> F["Prisma data layer"]
  E --> F
  E --> G["Yjs document state"]
  C --> H["MDX docs and content"]
  F --> I["Supabase Postgres"]
  B --> J["Supabase Auth and Storage"]
  B --> K["Email, AI, and rate-limit services"]
Loading

Repository Layout

Path Purpose
app/ App Router routes, API handlers, public pages, editor, review, account, and publishing flows.
components/ Shared UI, page preview, editor helpers, notifications, paper components, and site chrome.
lib/ Business logic for auth, permissions, compilation, notifications, Yjs, AI, security, and storage.
content/docs/ Fumadocs MDX documentation.
prisma/ Prisma schema and seed script.
supabase/ Supabase local config, SQL helpers, and migrations.
scripts/ Maintenance, migration, stress-test, and debugging scripts.

Quick Start

git clone https://github.com/sunyitong/interactives.pub.git
cd interactives.pub
cp .env.example .env.local
npm install
npm run dev

npm install runs postinstall, which generates Fumadocs sources and Prisma client files:

fumadocs-mdx && prisma generate

Environment Variables

Start with .env.example. A minimal local setup normally needs:

  • DATABASE_URL
  • DIRECT_URL
  • NEXT_PUBLIC_SUPABASE_URL
  • NEXT_PUBLIC_SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY
  • NEXT_PUBLIC_SITE_URL

Optional integrations include Resend email, Discord paper alerts, Upstash Redis, OpenAI-compatible AI providers, security toggles, and Yjs maintenance settings.

Common Commands

npm run dev
npm run lint
npm run format:check
npm run typecheck
npm run test:ci

Deployment Notes

The production app is designed for Vercel plus Supabase.

  1. Create a Supabase project and apply the schema/migrations.
  2. Configure environment variables in Vercel.
  3. Configure storage buckets and public/private access policies.
  4. Set NEXT_PUBLIC_SITE_URL to the production domain.
  5. Set DISCORD_PAPER_WEBHOOK_URL to a freshly generated Discord webhook URL if paper alerts are enabled.
  6. Configure the cron path in vercel.json for Yjs maintenance if used.

Security Notes

  • Never expose SUPABASE_SERVICE_ROLE_KEY to the browser.
  • Keep .env.local and production secrets out of git.
  • Treat Discord webhook URLs as secrets. Rotate the webhook immediately if it has ever been committed, logged, or shared.
  • Review storage policies before public deployment.
  • Use SECURITY_* toggles deliberately; production should keep rate limiting and suspicious-activity checks enabled.

Contributing

This is an active research and publishing platform. Focused pull requests are welcome for documentation, tests, editor reliability, accessibility, security hardening, and deployment reproducibility. See CONTRIBUTING.md.

License

Released under the MIT License.

About

Open publishing platform for interactive academic authoring, editorial review and research media.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages