['Find guidance','Find official information and practical support.','Ask which services are offered, who they are for, and whether there is a fee.'], 'consult'=>['Arrange a consultation','Explore consultation and second-opinion access.','Ask about referral requirements, permitted patient locations, language support and the complete consultation price.'], 'records'=>['Arrange records and tests','Ask your clinical team which records or tests are needed.','Ask the provider how to transfer records securely, what referrals are needed and which test costs are included. Do not upload records here.'], 'access'=>['Compare access and costs','Compare administrative offers, coverage and travel requirements.','Ask for a written price breakdown, exclusions, insurance requirements, cancellation terms and accessibility arrangements.'], 'care'=>['Coordinate provider-led care','Arrange care directly with an authorised clinical provider.','Ask who is responsible for care, how consent and identity are verified, and how to reach the clinical team. The site does not approve treatment.'], 'followup'=>['Organise follow-up support','Arrange follow-up appointments and practical support.','Ask who handles follow-up, how to request help and which services and costs are included.'] ]; const COUNTRIES=['Canada','United States','Mexico','India','France','Singapore','United Kingdom']; const CURRENCIES=['CAD','USD','EUR','GBP','MXN','INR','SGD']; const SCOPES=['Administrative support','Consultation access','Records coordination','Cost and coverage information','Appointment coordination','Practical follow-up support']; $state=getenv('COORD_STATE')?:'/var/lib/nsu-coordination'; $source=getenv('COORD_SOURCES')?:'/var/www/nsu-care/data/directory.json'; $nonce=base64_encode(random_bytes(18)); header('Cache-Control: no-store');header('Referrer-Policy: no-referrer');header('X-Content-Type-Options: nosniff');header('Permissions-Policy: camera=(), microphone=(), geolocation=()'); header("Content-Security-Policy: default-src 'none'; script-src 'nonce-$nonce'; style-src 'nonce-$nonce'; connect-src 'self' https://nosignup.trade; img-src 'self'; base-uri 'none'; frame-ancestors 'none'; form-action 'self'"); function answer(array $data,int $status=200):void{http_response_code($status);header('Content-Type: application/json; charset=utf-8');echo json_encode($data,JSON_UNESCAPED_UNICODE|JSON_INVALID_UTF8_SUBSTITUTE);exit;} function fail(string $msg,int $status=400):void{answer(['ok'=>false,'error'=>$msg],$status);} // Retained state is evidence: ambiguous paths and failed reads are not absence. function coord_file_kind(string $file):string{ clearstatcache(true,$file);$s=@lstat($file); if($s===false){$names=@scandir(dirname($file));return is_array($names)&&!in_array(basename($file),$names,true)?'absent':'invalid';} return ($s['mode']&0170000)===0100000&&($s['nlink']??0)===1?'file':'invalid'; } function coord_storage_guard():void{ global $state;$p=$state; while(true){clearstatcache(true,$p);$s=@lstat($p); if($s!==false&&($s['mode']&0170000)!==0040000)fail('Storage requires review',503); $parent=dirname($p);if($parent===$p)break; if($s===false&&is_dir($parent)){$names=@scandir($parent);if(!is_array($names)||in_array(basename($p),$names,true))fail('Storage requires review',503);} $p=$parent; } if(coord_file_kind($state.'/state.lock')==='invalid'&&is_dir($state))fail('Storage requires review',503); } function coord_read_file(string $file,int $max=0){ if(coord_file_kind($file)!=='file')return false; $before=@lstat($file);$f=@fopen($file,'rb');if(!$f)return false;$opened=@fstat($f); if(!is_array($opened)||!is_array($before)||($max>0&&$opened['size']>$max)){fclose($f);return false;} $raw=@stream_get_contents($f,$max>0?$max+1:-1);$after=@fstat($f);fclose($f);clearstatcache(true,$file);$path=@lstat($file); if(!is_string($raw)||!is_array($after)||!is_array($path)||strlen($raw)!==$opened['size']||($max>0&&strlen($raw)>$max))return false; foreach(['dev','ino','mode','nlink','size','mtime','ctime'] as $key){if(($before[$key]??null)!==($opened[$key]??null)||($opened[$key]??null)!==($after[$key]??null)||($after[$key]??null)!==($path[$key]??null))return false;} return $raw; } function coord_number($value):bool{ return (is_int($value)||is_float($value)||is_string($value)&&is_numeric($value))&&is_finite((float)$value); } function coord_db_valid(array $db):bool{ if(!isset($db['offers'])||!is_array($db['offers']))return false; foreach(['rates','assistant'] as $key)if(array_key_exists($key,$db)&&!is_array($db[$key]))return false; foreach($db['offers'] as $r){ if(!is_array($r))return false; foreach(['id','owner','name','step','country','scope','currency','url','created'] as $key)if(!isset($r[$key])||!is_string($r[$key]))return false; foreach(['price','days','expires'] as $key)if(!isset($r[$key])||!coord_number($r[$key]))return false; if(!isset($r['deleted'])||!is_bool($r['deleted'])||array_key_exists('votes',$r)&&!is_array($r['votes']))return false; foreach($r['votes']??[] as $v)if(!is_array($v)||!isset($v['value'],$v['until'])||!coord_number($v['value'])||!coord_number($v['until']))return false; } foreach($db['rates']??[] as $r)if(!is_array($r)||!isset($r['n'],$r['until'])||!coord_number($r['n'])||$r['n']<0||!coord_number($r['until']))return false; $a=$db['assistant']??[]; if($a!==[]&&(!isset($a['day'],$a['n'],$a['last'])||!is_string($a['day'])||!coord_number($a['n'])||$a['n']<0||!coord_number($a['last'])))return false; return true; } function lockdb(bool $write=true):array{global $state;coord_storage_guard();if(!is_dir($state)&&!mkdir($state,0700,true))fail('Storage unavailable',503);$f=fopen($state.'/state.lock','c');if(!$f||!flock($f,$write?LOCK_EX:LOCK_SH))fail('Please retry',503);$file=$state.'/state.json';$db=['offers'=>[],'rates'=>[],'assistant'=>[]];if(coord_file_kind($file)==='invalid')fail('Storage requires review',503);if(coord_file_kind($file)==='file'){$raw=coord_read_file($file);if(!is_string($raw))fail('Storage requires review',503);$parsed=json_decode($raw?:'',true);if(!is_array($parsed)){flock($f,LOCK_UN);fclose($f);fail('Storage requires review',503);}$db=$parsed;}if(!coord_db_valid($db))fail('Storage requires review',503);if($write){$now=time();$db['rates']=array_filter($db['rates']??[],fn($r)=>($r['until']??0)>$now);foreach($db['offers'] as &$r){$r['votes']=array_filter($r['votes']??[],fn($v)=>($v['until']??0)>$now);}unset($r);}return [$f,$db];} function unlockdb($f,array $db,bool $save=true):void{global $state;if($save){$tmp=$state.'/state.json.tmp';$data=json_encode($db,JSON_UNESCAPED_UNICODE|JSON_THROW_ON_ERROR);if(file_put_contents($tmp,$data)!==strlen($data)||!chmod($tmp,0600)||!rename($tmp,$state.'/state.json')){flock($f,LOCK_UN);fclose($f);fail('Storage unavailable',503);}}flock($f,LOCK_UN);fclose($f);} function salt():string{ global $state;$file=$state.'/salt';$kind=coord_file_kind($file); if($kind==='absent'){ // Called only while lockdb holds the exclusive state lock. Mint only in a // positively empty store; even an empty state.json is retained context. $names=@scandir($state); if(!is_array($names)||array_diff($names,['.','..','state.lock'])!==[])fail('Storage requires review',503); $value=bin2hex(random_bytes(32));$f=@fopen($file,'xb');if(!$f)fail('Storage unavailable',503); $ok=@chmod($file,0600)&&@fwrite($f,$value)===strlen($value)&&@fflush($f);fclose($f); if(!$ok)fail('Storage unavailable',503); }elseif($kind!=='file')fail('Storage requires review',503); $raw=coord_read_file($file,4096); if(!is_string($raw)||!preg_match('/\A[\x09-\x0D\x20]*[a-fA-F0-9]{64}[\x09-\x0D\x20]*\z/D',$raw))fail('Storage requires review',503); // Keep the historical trim and case, hence exactly the same HMAC key. return trim($raw); } function network():string{$remote=$_SERVER['REMOTE_ADDR']??'unknown';if($remote==='127.0.0.1'&&isset($_SERVER['HTTP_X_REAL_IP']))$remote=$_SERVER['HTTP_X_REAL_IP'];return hash_hmac('sha256',gmdate('Y-m-d').'|'.$remote,salt());} function limit(array &$db,string $action,int $max):void{$key=network().'|'.$action;$r=$db['rates'][$key]??['n'=>0,'until'=>time()+86400];if($r['n']>=$max)fail('Daily limit reached. Please try tomorrow.',429);$r['n']++;$db['rates'][$key]=$r;if(count($db['rates'])>5000)fail('Capacity reached. Please try later.',503);} function textval($v,int $max):string{if(!is_string($v)||strlen($v)>$max||preg_match('/[\x00-\x1F]/',$v))fail('Invalid field');return trim($v);} function publicOffer(array $r,?int $now=null):array{ $now=$now??time();$score=$up=$down=0; foreach($r['votes']??[] as $v){ if(($v['until']??0)<=$now)continue; $value=$v['value']??null; // Written votes are +/-1; keep the old numeric projection for legacy values. $score+=is_int($value)||is_float($value)?$value:array_sum([$value]); $up+=($value===1);$down+=($value===-1); } return ['id'=>$r['id'],'name'=>$r['name'],'step'=>$r['step'],'country'=>$r['country'],'scope'=>$r['scope'],'price'=>$r['price'],'currency'=>$r['currency'],'days'=>$r['days'],'url'=>$r['url'],'created'=>$r['created'],'expires'=>$r['expires'],'score'=>$score,'up'=>$up,'down'=>$down,'flagged'=>$score<=-3,'verification'=>'Self-declared; not verified or endorsed'];} function resources():array{global $source;$d=json_decode(@file_get_contents($source)?:'{}',true);return is_array($d['resources']??null)?$d['resources']:[];} $path=parse_url($_SERVER['REQUEST_URI']??'/',PHP_URL_PATH); if($path!=='/'&&$path!=='/index.php'){http_response_code(404);echo 'Not found';exit;} $api=$_GET['api']??'';$method=$_SERVER['REQUEST_METHOD']??'GET'; // Match the public source shortcuts used by the other NoSignup faces. if($api==='' && (($_GET['src']??null)==='1' || ($_GET['download']??null)==='1'))$api='source'; if($api==='source'&&in_array($method,['GET','HEAD'],true)){header('Content-Type: text/plain; charset=utf-8');header('Content-Disposition: attachment; filename="nosignup-coordination.php"');readfile(__FILE__);exit;} if($api==='board'&&$method==='GET'){ // Read-only projection uses one expiry boundary; mutations prune before saving. [$f,$db]=lockdb(false);$offers=[];$now=time(); foreach($db['offers'] as $r){if(!$r['deleted']&&$r['expires']>$now)$offers[]=publicOffer($r,$now);} unlockdb($f,$db,false);answer(['ok'=>true,'offers'=>$offers,'resources'=>resources(),'steps'=>STEPS,'operator'=>'not_contracted','payments'=>false,'clinical_verification'=>false]); } if($method==='POST'){ $origin=$_SERVER['HTTP_ORIGIN']??'';if(!in_array($origin,['https://nosignup.org','http://127.0.0.1:8908'],true))fail('Origin not allowed',403); if(($_SERVER['HTTP_X_COORD_REQUEST']??'')!=='1')fail('Request header required',403); if(stripos($_SERVER['CONTENT_TYPE']??'','application/json')!==0)fail('JSON required',415); if((int)($_SERVER['CONTENT_LENGTH']??0)>4096)fail('Request too large',413); $raw=file_get_contents('php://input',false,null,0,4097);if(strlen($raw)>4096)fail('Request too large',413);$body=json_decode($raw,true);if(!is_array($body))fail('Invalid JSON'); if($api==='offer'){ if(($body['public_business_only']??false)!==true)fail('Confirm public business information only'); $name=textval($body['name']??'',100);if(strlen($name)<3||!preg_match('/^[\pL\pN .,&()\x{2019}\x{0027}-]+$/u',$name))fail('Use an organisation name only'); $step=$body['step']??'';$country=$body['country']??'';$scope=$body['scope']??'';$currency=$body['currency']??''; if(!is_string($step)||!isset(STEPS[$step])||!in_array($country,COUNTRIES,true)||!in_array($scope,SCOPES,true)||!in_array($currency,CURRENCIES,true))fail('Choose a listed option'); $price=$body['price']??null;$days=$body['days']??null;if(!is_int($price)||$price<0||$price>10000000||!is_int($days)||$days<1||$days>365)fail('Invalid price or availability'); $url=textval($body['url']??'',300);$u=parse_url($url); if(!$u||($u['scheme']??'')!=='https'||isset($u['user'])||isset($u['pass'])||isset($u['port'])||isset($u['query'])||isset($u['fragment'])||!preg_match('/^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/i',$u['host']??'')||filter_var($u['host'],FILTER_VALIDATE_IP))fail('Use an official HTTPS website, without tracking query or login details'); [$f,$db]=lockdb();limit($db,'offer',3);$db['offers']=array_values(array_filter($db['offers'],fn($r)=>$r['expires']>time()));if(count($db['offers'])>=500)fail('Pilot capacity reached',503); $token=bin2hex(random_bytes(32));$id=bin2hex(random_bytes(12));$db['offers'][]=['id'=>$id,'owner'=>hash('sha256',$token),'name'=>$name,'step'=>$step,'country'=>$country,'scope'=>$scope,'price'=>$price,'currency'=>$currency,'days'=>$days,'url'=>$url,'created'=>gmdate('c'),'expires'=>time()+30*86400,'votes'=>[],'deleted'=>false];unlockdb($f,$db);answer(['ok'=>true,'id'=>$id,'withdrawal_key'=>$token],201); } if($api==='vote'||$api==='withdraw'){ $id=textval($body['id']??'',24);[$f,$db]=lockdb();limit($db,$api,100);$found=false; foreach($db['offers'] as &$r){if($r['id']!==$id||$r['deleted']||$r['expires']<=time())continue;$found=true; if($api==='withdraw'){if(!hash_equals($r['owner'],hash('sha256',textval($body['key']??'',64))))fail('Invalid withdrawal key',403);$r['deleted']=true;} else{$value=$body['value']??null;if(!in_array($value,[-1,0,1],true))fail('Invalid vote');$r['votes']=array_filter($r['votes'],fn($v)=>$v['until']>time());$key=network();if(count($r['votes'])>=100&&!isset($r['votes'][$key]))fail('Pilot vote capacity reached for this offer',429);if($value===0)unset($r['votes'][$key]);else $r['votes'][$key]=['value'=>$value,'until'=>strtotime('tomorrow UTC')];} break; }unset($r);if(!$found)fail('Offer unavailable',404);unlockdb($f,$db);answer(['ok'=>true]); } if($api==='assistant'){ $step=$body['step']??'';if(!is_string($step)||!isset(STEPS[$step]))fail('Choose a step'); [$f,$db]=lockdb();limit($db,'assistant',8);$a=$db['assistant']??[];$day=gmdate('Y-m-d');if(($a['day']??'')!==$day)$a=['day'=>$day,'n'=>0,'last'=>0];if($a['n']>=60||time()-$a['last']<30){unlockdb($f,$db);answer(['ok'=>true,'mode'=>'reference','text'=>STEPS[$step][2],'reason'=>'Local assistant capacity is busy. Showing the reviewed checklist instead.']);}$a['n']++;$a['last']=time();$db['assistant']=$a;unlockdb($f,$db); global $state;$modelLock=fopen($state.'/model.lock','c');if(!$modelLock||!flock($modelLock,LOCK_EX|LOCK_NB))answer(['ok'=>true,'mode'=>'reference','text'=>STEPS[$step][2],'reason'=>'Local assistant is busy.']); $catalog=resources();$brief=[];foreach($catalog as $r)$brief[]=['id'=>$r['id'],'name'=>$r['name'],'note'=>$r['note']]; $prompt='You are a nonclinical administrative directory assistant. Do not diagnose, recommend treatment or claim any provider is verified. Return JSON only: {"summary":"a short plain-language paraphrase of the checklist", "resource_ids":["IDs from supplied list only"]}. Do not add facts or web links. Do not give medical instructions. Step: '.STEPS[$step][0].'. Checklist: '.STEPS[$step][2].'. Public resources: '.json_encode($brief); $payload=json_encode(['model'=>'qwen2.5:0.5b-instruct','stream'=>false,'format'=>'json','prompt'=>$prompt,'keep_alive'=>'1m','options'=>['num_predict'=>160,'num_ctx'=>2048,'temperature'=>0,'num_thread'=>2]]); $ch=curl_init('http://127.0.0.1:11434/api/generate');curl_setopt_array($ch,[CURLOPT_POST=>true,CURLOPT_POSTFIELDS=>$payload,CURLOPT_HTTPHEADER=>['Content-Type: application/json'],CURLOPT_RETURNTRANSFER=>true,CURLOPT_CONNECTTIMEOUT=>2,CURLOPT_TIMEOUT=>20,CURLOPT_PROXY=>'']);$result=curl_exec($ch);$code=curl_getinfo($ch,CURLINFO_HTTP_CODE);curl_close($ch);flock($modelLock,LOCK_UN);fclose($modelLock); $response=json_decode(is_string($result)?$result:'{}',true);$parsed=json_decode($response['response']??'{}',true);$ids=[];$known=array_column($catalog,'id');foreach(($parsed['resource_ids']??[]) as $id){if(is_string($id)&&in_array($id,$known,true))$ids[]=$id;} // Generated prose is deliberately not published as medical guidance. Only allowlisted IDs are used. answer(['ok'=>true,'mode'=>$code===200&&count($ids)?'local_model':'reference','text'=>STEPS[$step][2],'resource_ids'=>array_slice(array_values(array_unique($ids)),0,3),'model'=>'qwen2.5:0.5b-instruct','reason'=>'The local model can suggest existing source IDs. The displayed checklist is reviewed text; suggested sources are not clinical recommendations.']); } fail('Unknown action',404); } if(!in_array($method,['GET','HEAD'],true)){http_response_code(405);exit;} if($api!=='')fail('Unknown action',404); header('Content-Type: text/html; charset=utf-8'); ?>NoSignup — coordinate your next step
nosignup.org
NSU pinwheel ↗

PRIVATE CHECKLIST · OPEN SERVICE OFFERS

Coordinate the next step.
Keep your story yours.

Work through a care-access checklist, compare offers for each step, and find official resources—with no patient account or medical uploads.

Your checklist stays in this tab. We do not ask for your name, diagnosis or medical records. Progress and saved offers disappear on refresh or closing the tab. Provider links take you to the provider’s own identity, privacy and eligibility process.

These are optional administrative steps, not a prescribed treatment pathway. You and your clinical team decide what is appropriate.

Find resources with the local assistant

Only the selected step ID is sent to our server. No personal question or medical information is submitted. The model can shortlist existing sources; it does not diagnose or certify providers.

Service bids for this step

Providers can publish reusable, nonbinding offers without seeing anyone’s checklist. No providers have been verified by this pilot. Saving an offer does not book, accept a contract or pay.

Independent official resources

Source links, not bids or partners. Location does not establish permission to treat you. Check actual services, costs and eligibility directly.

For providers: publish a service bid

Only public organisational information belongs here. No patient requests, medical details, private names, personal contacts or records. Offers expire after 30 days. Publishing does not establish provider verification or a partnership. Clinical services require appropriate credentials and permissions outside this site.

Withdraw your published bid

Use the offer ID and withdrawal key shown when you posted it. No account recovery is available.

How votes, privacy and this pilot work

Upvotes and downvotes express community views about relevance—not treatment safety, clinical competence or identity. A net score of −3 collapses an offer by default; anyone can reveal flagged offers. Votes reset daily and never approve treatment, release money or accept bids.

We limit votes to one current choice per offer per daily network bucket. Shared networks may share a vote, and changing networks can evade the limit; this is not one-person-one-vote. We temporarily retain keyed daily network hashes for rate limiting, not raw IP addresses. These expire on subsequent write activity. Connection metadata can still be processed by hosting/network infrastructure. Absolute anonymity is not promised.

The checklist uses no tracking cookies or persistent browser storage; its activity stays in page memory. The optional Wallet stores your selected recovery phrase and unresolved payment references in this browser only after you choose to create or restore a wallet. This site’s code can access words stored here. Trade receives wallet addresses and public signing proofs, never your checklist. Wallet transfers are separate from provider bids and do not book or pay for treatment. The assistant sends only a step category when explicitly requested. Votes and provider bids are server-side actions; provider bids are public. Websites opened externally have their own privacy policies. Do not publish patient information.

No administrative operator is currently contracted. This pilot offers no monitored patient support, appointments, escrow or treatment payments. Public bid capacity is limited. Paid features require verified counterparties, funding and accepted operator responsibilities. This is a commercial project in development, not a charity. No cancer cure is promised.

Download this single-file application