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 [email protected] 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: "[email protected]", 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 [email protected] 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 watch
For 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 easily
as auser
I wantonly one email/password login option
becauseI often forget which of N auth providers I used... I cannot forget which option I chose
-
To
give private feedback
as auser
I wantan email for Bit Pharma leadership
becausesome issues are private
-
To
give public feedback
as auser
I wanta link to Github Issues
becausethis lets me report and track my concerns
-
To
find the reagents I need
as aresearcher
I wantto search inventory in my lab and nearby labs
becauseit is hard to find reagents
-
To
save my inventory
as aresearcher
I wanta keyboard form to add inventory
becauseit is faster to type
-
To
read inventory
as aresearcher
I wantto view item data
becausethis lets me see where it is
-
To
know what I have
as aresearcher
I wantto view an item data
becausethis lets me see where it is
-
To
stay up to date
as aresearcher
I wantto click on and edit inventory data
becausethings change
-
To
delete inventory
as aresearcher
I wantto archive items
becausestuff goes bad or gets used up
-
To
comply with regulations
as aresearcher
I wantan immutable audit trail of events
becausethis helps me prove to others what happened
-
To
prevent theft and terrorism
as abiologist
I wantto be notified when stuff goes missing
becausemy reagents are expensive and potentially dangerous
-
To
get paid
as aprovider of goods and services
I wanta way to connect my inventory with stripe
becausethis lets me charge money for my contributions to others
-
To
increase revenue
as aprovider of goods and services
I wanta way to promote my inventory
becausemarketing helps potential customers find my offerings
-
To
make a list of what I need
as aresearcher
I wantto add items to a cart
becausethis lets me track what I want to buy
-
To
order what I need
as aresearcher
I wantto checkout easily
becauseI need my stuff faster
-
To
know when my things arrive
as aresearcher
I wantshipment tracking
becausethis helps me plan experiments
-
To
track stuff I like
as aresearcher
I wanta wish list
becausesome things are interesting but I am not ready to purchase them
-
To
receive critical updates
as auser
I wanta minimal notification system
becausethis makes sure I will not miss anything
-
To
not use crappy websites
as auser
I wantreleases to require Lighthouse >90 on all fronts
becauseI don't like to use slow, inaccessible sites
This project is licensed under the MIT License - see the LICENSE.md file for details