Skip to content

VIPER: Vulnerability Intelligence Program for Evaluation and Response - The Patch Team ARPA-H VMP.

License

Notifications You must be signed in to change notification settings

PATCH-UPGRADE/viper

Repository files navigation

Welcome to Viper

Viper is the PATCH Teams Vulnerability Management Platform (VMP).

  • Define healthcare workflows
  • Simulate cybersecurity events on those workflows.

Ticket Tracking

We are using the Northeastern PATCH Jira for tracking tickets/progress.

Getting Started

Check out the documentation under the docs folder and also CLAUDE.md.

Follow the guide in .env.example to create a .env file.

Install mprocs to run the multiple services:

npm install -g mprocs

Install dependencies:

npm i

Run mprocs:

mprocs

Database Seeding

The project includes a seed script to populate the database with sample data for development and testing.

How to seed:

npm run db:seed

The seed script will:

  1. Check if the seed user exists (creates if needed)
  2. Seed 20 realistic hospital assets owned by the seed user

If you also want a temporary (24 hour) testing API key, run:

npm run db:create-test-api-key

Optional: Clear database before seeding

SEED_CLEAR_DB=true npm run db:seed

⚠️ Warning: This will delete all existing assets and asset settings before seeding!

Login after seeding

After seeding, you can log in with:

  • Email: user@example.com

  • Password: (read the seed script)

  • Note that user/password auth is only enabled for development environments.

  • In production, only Google OAuth can be used, with a domain whitelist in Vercel's env vars.

Tech Stack

  • React Framework: Next.js
  • Routing: Next.js App Router
  • Data Fetching/Caching: Tanstack
  • Styling: Tailwind
  • Queue: inngest
  • DB: PSQL
  • ORM: prisma
  • RPC: tRPC
  • API Validation: Zod
  • Test Framework: Vitest
  • API Testing: Supertest
  • Linter: biome

Database

Run npx prisma studio to view the database, usually on http://localhost:5555

Manually Migrating Deployments

  1. Run npx prisma migrate status -- should indicate that you have a generated migration that has not been applied
  2. Change your DATABASE_URL .env file to be the URL associated with your Vercel preview/production environment
    • You can find this by going to our Vercel viper project page -> Storage -> neon-vmp-db
    • Hit "show secret"
  3. Verify that you're using the correct DATABASE_URL with npx prisma studio. Just makes sure the entries look consistent
  4. npx prisma migrate deploy
  5. Got an error? Made a mistake? You can restore our Neon database in the Neon console (accessible through Vercel -> neon-vmp-db -> Open in Neon)

You can also try this process using your Vercel Preview environment first, then try it with the main branch. Sometimes however main may have more migrations than your preview environment (e.g, you made a branch, and afterwards someone else made a branch with a migration and merged that into main before you could), so this doesn't always work.

Tests

To run tests with Vitest use npm run test.

You will need to manually export your API_KEY env variable to test the API.

You can find your API Keys under /user/settings.

Linting

To check for lint errors use npm run lint.

To have biome linter make changes use npm run format.

About

VIPER: Vulnerability Intelligence Program for Evaluation and Response - The Patch Team ARPA-H VMP.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 7

Languages