Viper is the PATCH Teams Vulnerability Management Platform (VMP).
- Define healthcare workflows
- Simulate cybersecurity events on those workflows.
We are using the Northeastern PATCH Jira for tracking tickets/progress.
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
The project includes a seed script to populate the database with sample data for development and testing.
npm run db:seedThe seed script will:
- Check if the seed user exists (creates if needed)
- 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-keySEED_CLEAR_DB=true npm run db:seedAfter 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.
- 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
Run npx prisma studio to view the database, usually on http://localhost:5555
- Run
npx prisma migrate status-- should indicate that you have a generated migration that has not been applied - Change your
DATABASE_URL.envfile 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"
- Verify that you're using the correct
DATABASE_URLwithnpx prisma studio. Just makes sure the entries look consistent npx prisma migrate deploy- 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)
- Go to "Backup & Restore", select a time to restore to (can often just pick a few mins ago)
- Check Prisma docs for failed migrations
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.
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.
To check for lint errors use npm run lint.
To have biome linter make changes use npm run format.