erDiagram
MERCHANT ||--o{ PROGRAM : "configures"
PROGRAM ||--o{ PROGRAM_CUSTOMER_ACCOUNT : "has"
PROGRAM ||--o{ PROGRAM_ORDER_FULFILLMENT : "has"
PROGRAM ||--o{ PROGRAM_ORDER_DISCOUNT : "has"
PROGRAM_ORDER_FULFILLMENT ||--o{ RULE_TARGET : "includes_or_excludes"
PROGRAM_ORDER_DISCOUNT ||--o{ RULE_TARGET : "includes_or_excludes"Document Version: 1.0
Created: 2025-12-23
This document outlines the implementation plan for adding Role-Based Access Control (RBAC) and Secure Authentication to MedStory. The goal is to create a secure, MVP-ready authentication system that allows patients to share their medical timeline with relatives and doctors via secure, time-limited access links.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { send, doWork } from "./lib.mjs"; | |
| import cluster from "node:cluster"; | |
| const NAME = process.env.NAME; | |
| export async function onMessage(message) { | |
| if (cluster.worker.message !== message) { | |
| cluster.worker.message = message; | |
| } else { | |
| return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $privateKey = 'someprivatekey'; | |
| $secretInfo = 'secretInfo'; | |
| $method = 'aes-256-cbc'; | |
| $ivLength = openssl_cipher_iv_length($method); | |
| $iv = random_bytes($ivLength); | |
| $encryptedData = openssl_encrypt($secretInfo, $method, $privateKey, OPENSSL_RAW_DATA, $iv); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import csv | |
| import sys | |
| import argparse | |
| import datetime | |
| parser=argparse.ArgumentParser( | |
| description='''By default it will parse the today's logs''' | |
| ) | |
| parser.add_argument('-d', type=int, default=1, help='set the number of days you would like to parse the logs. dafault 1 day.') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/python3 | |
| import concurrent.futures | |
| from math import floor, sqrt | |
| import time | |
| def is_prime(number: int) -> bool: | |
| if not (number & 1): return 0 | |
| iteration = floor(sqrt(number)) + 1 |
NewerOlder