Skip to content

Repository files navigation

Brief

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.

Stack

  • 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)

Requirements

  • Node.js 18.18 or newer (see package.json engines)

Install

npm install

Environment variables

Copy .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 /.

Database (optional)

If you set DATABASE_URL, apply migrations against that database:

DATABASE_URL="postgresql://..." npx prisma migrate deploy

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

Run locally

npm run dev

Open http://localhost:3000.

Build and production serve

npm run build
npm start

Deploy

Use a host that runs Next.js with server-side API routes (not static file hosting only). Vercel is a straightforward option:

  1. Push the repository to GitHub, GitLab, or Bitbucket.
  2. Create a new project in Vercel and import the repo.
  3. Keep the default Next.js build settings (npm run build, which includes prisma generate).
  4. Add environment variables from .env.example as needed.
  5. After the first deploy, if you use DATABASE_URL, run npx prisma migrate deploy from any machine that can reach the database.
  6. Redeploy if you change environment variables.

For subpath hosting, set NEXT_PUBLIC_BASE_PATH at build time to match the URL prefix.

Lint

npm run lint

About

Brief is a mobile‑first web app that turns PubMed into a personalized, newspaper‑style feed of biomedical papers, ranked by relevance and recency to your research interests.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages