Brief is a mobile-first web app that turns PubMed into a personalized, newspaper-style feed of biomedical papers, ranked by relevance, journal tier, and recency to your research interests.
- Next.js 14 (App Router), React, TypeScript, Tailwind CSS
- PubMed E-utilities for search and article data
- Optional PostgreSQL via Prisma for kept papers tied to an anonymous browser session (local storage is always used as well)
- Node.js 18.18 or newer (see
package.jsonengines)
npm installCopy .env.example to .env locally. For deployment, set the same variables in your host’s dashboard.
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
No | PostgreSQL connection string. If unset, the feed works; the kept list falls back to local storage only (the /api/saved routes return an error). |
NCBI_API_KEY |
No | NCBI API key for higher E-utilities rate limits (request a key). |
NEXT_PUBLIC_BASE_PATH |
No | URL path prefix when the app is not served at the domain root. Use a leading slash and no trailing slash, e.g. /my-app. Leave unset for deployment at /. |
If you set DATABASE_URL, apply migrations against that database:
DATABASE_URL="postgresql://..." npx prisma migrate deployPrisma is configured with Linux engine binaries suitable for Vercel (rhel-openssl-3.0.x in prisma/schema.prisma). postinstall runs prisma generate so installs stay in sync with the schema.
npm run devOpen http://localhost:3000.
npm run build
npm startUse a host that runs Next.js with server-side API routes (not static file hosting only). Vercel is a straightforward option:
- Push the repository to GitHub, GitLab, or Bitbucket.
- Create a new project in Vercel and import the repo.
- Keep the default Next.js build settings (
npm run build, which includesprisma generate). - Add environment variables from
.env.exampleas needed. - After the first deploy, if you use
DATABASE_URL, runnpx prisma migrate deployfrom any machine that can reach the database. - Redeploy if you change environment variables.
For subpath hosting, set NEXT_PUBLIC_BASE_PATH at build time to match the URL prefix.
npm run lint