Skip to content

KNOWDYN/LGF-Sci

Repository files navigation

LGF-Sci Platform v0.1 MVP

LGF-Sci Platform is a language-game integrity platform for scientific manuscripts. It contains a free local PWA, a paid REST API server with credit controls, and an ERP-style superadmin dashboard.

What it is

  • LGF-Sci Studio: free local/offline-capable PWA. Manuscripts can be analysed in the browser using the TypeScript language-game engine.
  • LGF-Sci API: REST endpoint with API keys, jobs, credit reservation, debit, release, and usage events.
  • LGF-Sci Control: superadmin dashboard for organisations, users, credits, API keys, jobs, credentials, billing hooks, and audit logs.

What it is not

LGF-Sci is not an AI-authorship detector, plagiarism detector, misconduct verdict engine, certification authority, or global quality-score system.

Deploy from GitHub to Vercel

  1. Push this repo to GitHub.
  2. Create a Vercel project from the GitHub repo.
  3. Add environment variables:
DATABASE_URL=postgresql://...
INSTALL_SECRET=long-random-secret
APP_ENCRYPTION_KEY=long-random-key
SESSION_SECRET=long-random-session-secret
NEXT_PUBLIC_APP_URL=https://your-domain.example
  1. Deploy.
  2. Open /install and run the one-time installer.
  3. Open /admin/login and sign in with the first superadmin account.
  4. Open /admin/settings/credentials and save operational credentials such as Stripe keys and webhook secret.

Local development

npm install
npm run dev

Without DATABASE_URL, the free PWA surface still loads, but installer/admin/API database functions will not operate.

REST API example

curl -X POST https://YOUR_DOMAIN/api/v1/analyze \
  -H "Authorization: Bearer lgf_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text":"Your manuscript text here...","domain_adapter":"psychology"}'

One-time installer boundary

The installer cannot physically delete its own route on Vercel because deployed files are immutable at runtime. It locks itself by writing installation_locked = true to the database. To remove the route physically, delete app/install from the repository and redeploy after successful installation.

About

Language Games for Scientific Integrity

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors