Bit Pharma is an international biosecurity and medical research risk management firm
Prod (old repo): http://bitpharma.com https://bitpharma.com http://www.bitpharma.com https://www.bitpharma.com
Dev: http://gitpharma.com https://gitpharma.com http://www.gitpharma.com https://www.gitpharma.com
const url = https://www.gitpharma.com/api;const { status, body } = await fetch(`${url}/hello`);
console.log(status, body); // => 200, "Hello World!"const signUpResponse = await fetch(`${url}/users`, {
method: "POST",
body: {
displayName: "Bender", // <--- displayName is public
email: "[email protected]", // <--- email is private
password: "good news everyone"
}
});
// signUpResponse.status === 200;
// get the code from bender@planetexpess.com inbox
const verifyResponse = await fetch(`${url}/users/verify`, {
method: "POST",
body: { code: 123456 }
});
// verifyResponse.status === 200;const loginResponse = await fetch(`${url}/api/login`, {
method: "POST",
body: { password: "good news everyone" }
});
// loginResponse.status === 200;// if not signed in as bender
const readResponse = await fetch(`${url}/api/users/bender`);
// readResponse.body === { displayName: "bender" };
// readResponse.status === 200;
// if signed in as bender, more details available:
const readResponse = await fetch(`${url}/api/users/bender`);
// readResponse.body === { displayName: "bender", email: "bender@planetexpress.com", teamIds: [...] };
// readResponse.status === 200;const changeResponse = await fetch(`${url}/api/users/bender/password`, {
method: "POST",
body: { password: "good news everyone", newPassword: "remember me" }
});
// changeResponse.status === 200;const forgotResponse = await fetch(`${url}/api/users/bender/forgot`, {
method: "POST"
});
// forgotResponse.status === 200;
// get the code from bender@planetexpess.com inbox
const resetResponse = await fetch(`${url}/api/users/bender/reset`, {
method: "POST",
body: { code: 123456 }
});
// resetResponse.status === 200;// if signed in as bender
const deleteResponse = await fetch(`${url}/api/users/bender`, {
method: "DELETE"
});
// resetResponse.status === 200;Document in this README file Document the API with JSDoc E2e test with CodeceptJS Unit test with Jest
git clone https://github.com/bionicles/bp
# run the database
yarn run-db
# install dependencies, lint, audit, and unit-test
yarn prep
# start the NextJS server
yarn dev
# to run a lighthouse test
yarn lighthouse
# open a new terminal and rerun e2e tests automatically on changes:
yarn watchFor security issues or sensitive matters, please email [email protected] -- To contribute feature requests, bug reports, questions, or comments, ensure the issue is on the issues list (please do not duplicate existing issues) and move it to "doing" on the issues triage project when you work actively to solve it.
Only 1-2 issues active at once, and please give constructive criticism!
- MacOS + Ubuntu
- git and hub and GitHub
- GitHub Actions
- VS Code
- make
- nodemon
- npm and yarn
- markdown
- CodeceptJS
- Lighthouse
- Jest
- Docker and Docker Compose
- React + NextJS + npx create-next-app
- tailwind css and tufte css
- PostgreSQL
- node-postgres
- Twilio
- Stripe Connect
- semantic-release
-
To
sign up easilyas auserI wantonly one email/password login optionbecauseI often forget which of N auth providers I used... I cannot forget which option I chose -
To
give private feedbackas auserI wantan email for Bit Pharma leadershipbecausesome issues are private -
To
give public feedbackas auserI wanta link to Github Issuesbecausethis lets me report and track my concerns -
To
find the reagents I needas aresearcherI wantto search inventory in my lab and nearby labsbecauseit is hard to find reagents -
To
save my inventoryas aresearcherI wanta keyboard form to add inventorybecauseit is faster to type -
To
read inventoryas aresearcherI wantto view item databecausethis lets me see where it is -
To
know what I haveas aresearcherI wantto view an item databecausethis lets me see where it is -
To
stay up to dateas aresearcherI wantto click on and edit inventory databecausethings change -
To
delete inventoryas aresearcherI wantto archive itemsbecausestuff goes bad or gets used up -
To
comply with regulationsas aresearcherI wantan immutable audit trail of eventsbecausethis helps me prove to others what happened -
To
prevent theft and terrorismas abiologistI wantto be notified when stuff goes missingbecausemy reagents are expensive and potentially dangerous -
To
get paidas aprovider of goods and servicesI wanta way to connect my inventory with stripebecausethis lets me charge money for my contributions to others -
To
increase revenueas aprovider of goods and servicesI wanta way to promote my inventorybecausemarketing helps potential customers find my offerings -
To
make a list of what I needas aresearcherI wantto add items to a cartbecausethis lets me track what I want to buy -
To
order what I needas aresearcherI wantto checkout easilybecauseI need my stuff faster -
To
know when my things arriveas aresearcherI wantshipment trackingbecausethis helps me plan experiments -
To
track stuff I likeas aresearcherI wanta wish listbecausesome things are interesting but I am not ready to purchase them -
To
receive critical updatesas auserI wanta minimal notification systembecausethis makes sure I will not miss anything -
To
not use crappy websitesas auserI wantreleases to require Lighthouse >90 on all frontsbecauseI don't like to use slow, inaccessible sites
This project is licensed under the MIT License - see the LICENSE.md file for details