Skip to content

wu-json/pathogen

Repository files navigation

pathogen

Screen Shot 2022-04-18 at 4 07 08 PM

Pathogen is my senior thesis project, and is a Solana dApp for storing public health data. Organizations that need public health data for a certain disease can create pathogen bounties in SOL. Accounts can then submit their diagnostic data in exchange for shares of the bounty.

Quick Start

Configure Solana CLI

If you're on Windows, it is recommended to use WSL to run these commands

  1. Set config URL to localhost cluster
solana config set --url localhost
  1. Create CLI Keypair

If this is your first time using the Solana CLI, you will need to generate a new keypair:

solana-keygen new

Run the dApp

To run Pathogen locally, we need to install npm packages, run a local Solana cluster and deploy our dApp, and whip up a client instance:

# Installs npm packages for dApp and client app
yarn install:all

# Starts local Solana cluster + test validator and deploys app to it
yarn anchor:localnet

# Start the React client
yarn client:start

Once you run all of the commands above, you should have Pathogen running on your local machine!

Other Dev Commands

These aren't required to run Pathogen locally per se, but they are useful for development.

Start local Solana cluster and logs

Start a local Solana cluster:

# Runs local cluster
solana-test-validator

# Runs fresh local cluster
solana-test-validator --reset

To log transactions on the cluster, you can run the following:

solana logs

Deploying the On-chain Program

To deploy the on-chain program, run the following command. Note that the local Solana cluster must be running for the deploy step to work.

yarn anchor:build-and-deploy

Accessing Deployed Program ID

Once the program has been deployed to your local Solana cluster, you can get the program id like so:

yarn solana:program-id

Airdrop SOL into your default account

If your keypair account balance is zero request SOL from your local Solana cluster faucet:

# replace n with the amount of solana to airdrop
solana airdrop n

About

dApp for decentralized anonymous public health data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published