pnpm install
The project uses Husky and lint-staged to enforce code quality checks before each commit. These are automatically set up when you run pnpm install
thanks to the prepare
script.
When you try to commit changes, the following checks will run automatically on staged files:
- Prettier formatting check
- ESLint with zero warnings allowed
If any checks fail, the commit will be blocked until you fix the issues.
-
Generate the schema
pnpm db:generate
-
Push the migrations
pnpm db:migrate
pnpm dev
https://dbdiagram.io/d/DID%2FUCAN-67cae800263d6cf9a096e5dd
You can use JavaScript to view and delete the key pair stored in IndexedDB.
// Show the key pair
let dbRequest = indexedDB.open('cryptoKeysDB', 1);
dbRequest.onsuccess = function (e) {
const db = e.target.result;
const transaction = db.transaction('keys', 'readonly');
const objectStore = transaction.objectStore('keys');
const request = objectStore.getAll();
request.onsuccess = function () {
console.log(request.result);
};
};
// Delete the database
indexedDB.deleteDatabase('cryptoKeysDB');
The last command is useful if you want to remove the current key pair.
To avoid having to delete key pairs repeatedly when you are testing, just use private browsing windows.