Local account portals LAN PDF viewer: http://192.168.177.124:8090/monlam-pdf-viewer.html PocketBase listens on 0.0.0.0:8090; localhost URLs below continue to work. V06 no-account workflow: http://127.0.0.1:8090/monlam-form-2026-v06.html The welcome section shows the Prayer Assembly as Tibetan year minus 2115. A public no-login PocketBase endpoint (/api/monlam/public/assembly-year) retrieves the published year from Pathgate Buddhist Practice Dates and caches it for six hours. Source: https://pathgate.org/index.php/buddhist-practice-dates The form continues working if the lookup fails; the heading identifies a cached value as last confirmed or shows that the number is unavailable. The Monastery Information landing section follows .note-landing-page.txt. English/Tibetan names, mailing address and contact fields save locally; photos/letters save in a separate IndexedDB store (up to 10 files, 10 MB each). New/MonId must be New or digits. Both monastery names (on separate rows), address, contact name, position, email, phone/mobile and WhatsApp are required to continue. Leading zeros in MonId are preserved. The participant form receives Tibetan name (English fallback), MonId (New stays blank), address and contact name. Continue reveals participants below the editable monastery section. V06 has its own participant-draft key and can copy an existing standalone draft once without changing the original. Download Pdf embeds registration.json with all editable fields, participant photos, seal and uploaded documents, alongside the unchanged named backend JSON and page JPEGs. Open registration PDF (also available before filling the form) restores this complete record. Separate Download Registration/Download Backup/Load Backup buttons are hidden; older JSON backups can still be selected in the opener. Older backend-only PDFs remain viewable but cannot restore information they never saved. The viewer Monastery tab includes all monastery/contact/authorization data, plus previews/downloads of the seal and uploaded documents. No server submission of the landing information/uploads is implemented. Only current Edge/mobile layout has been tested; older-device compatibility is still future work. For V06-only checks, run: node --test pocketbase-local/test/v06-browser.test.cjs This opens V06 directly in visible Edge, without any account/login/email flow. Authorization (after Contact) supplies editable Gregorian year/month/day, prefilled with the device's current local date. Saved/edited dates are kept. Upload one JPG/PNG/WebP image of the signed, dated monastery seal (up to 10 MB). The optional image has a preview, download and remove action and is stored separately from ordinary attachments. Expand See an example of what to upload for a clearly labeled sample document with a fictitious seal. The signature and date must be directly on/across the seal. The seal appears at the bottom right of the covering letter. PDF save/reopen preserves the date and authorizationSeal, and accepts previous V06 JSON backups. Continuing fills the participant-form/cover-letter date and Kab from the online assembly. The browser check downloads a real PDF, clears its disposable draft, restores all fields/photos/uploads from the PDF, and checks the viewer's Monastery tab. Applicant: http://127.0.0.1:8090/monlam-account.html Staff: http://127.0.0.1:8090/monlam-staff.html Admin: http://127.0.0.1:8090/_/ Form comparison (no login): http://127.0.0.1:8090/native04_c.html This standalone copy preserves native04's form/scan workflow with a separate browser draft, starts at monastery information, and removes demo accounts and email verification. It is not linked to PocketBase approval/submission. The original native04 remains unchanged. The account portal opens v05, copied from native03_c and sharing its guided assets and backup format. V05 prefills approved application details, with form drafts scoped to the backend/account. start.ps1 serves the existing RegForm directory through PocketBase on loopback. The approved-account screen links to monlam-form-2026-v05.html, a copy of native03_c. Its Open participant form link identifies the approved application; v05 fetches its details through the applicant's normal PocketBase session. Blank name/MonId/address/representative fields are prefilled. New keeps the ID blank; session and date remain for the representative to enter. Existing participant entries and nonblank fields are preserved. Participant drafts/downloads still work locally; no participant submission or server storage has been added. Gmail setup (enter passwords only in your local PocketBase dashboard) 1. In the sender's Google account, enable 2-Step Verification and generate an app password for Monlam PocketBase. App passwords may not be available for every account; consult your Google administrator if the option is missing. https://support.google.com/accounts/answer/185833 2. Sign into PocketBase Admin with your existing superuser account. In Settings / Application, set: Application name: Nyingma Monlam Registration Application URL: http://127.0.0.1:8090 This URL is inserted into the email links. During local testing, open those links on this machine. They will not work from a separate phone/computer. 3. In Settings / Mail settings, enable SMTP and enter: SMTP host: smtp.gmail.com Port: 465 TLS / SSL: enabled Auth method: PLAIN (default) Username: full sending Gmail address Password: Google app password Sender address: same Gmail address Sender name: Monlam Registration Save, then use PocketBase's Send test email action to test delivery. Use your own address as the test recipient. Do not use the ordinary Google account password and do not put the app password into source files or chat. Google SMTP reference: https://developers.google.com/workspace/gmail/imap/imap-smtp 4. Open the applicant portal, create a test account with an email you control, and open the verification email on this computer. The link opens the portal; press Confirm email. You can also request a password reset from Sign in. Applicant account deletion The signed-in applicant has a Delete account button beside Sign out. The dialog requires the current password and typing DELETE. Deletion is permanent and removes the account, application, memberships and application history. Only after server success does the portal clear this account's local login and drafts. Downloaded files, backups and copies on other devices remain. Cancel closes the dialog without deleting anything. Staff accounts cannot use this applicant-only deletion endpoint. Staff account setup In PocketBase Admin / Collections / monlam_staff, create a record with a name, email, password and password confirmation. Use that staff login on the staff portal. Staff do not use superuser credentials in the portal. Staff account creation is never public. Gmail and PocketBase staff passwords are separate. Review flow 1. Applicant verifies email, then completes/saves the application and submits to get an ML- code. Before verification, the application section is hidden; any existing saved/unfinished details are kept and restored afterward. Applicants enter their monastery name/address directly. No applicant directory lookup is offered; directory list/view access is staff-only. The optional MonId is an applicant-provided reference. Blank means New; entered IDs retain leading zeros. Staff see MonId and the applied full name in the application list, details and authorization section. 2. The WhatsApp button opens a prepared message to +91 6362309873. The applicant presses Send from the number supplied on their application. 3. In the staff portal, select the pending application. Check the message in Monlam's WhatsApp, then type the actual sender number and received code. 4. Review the displayed applied MonId/New and full monastery name. No directory selection or creation is required, even when the directory is empty. 5. Confirm authority for that monastery, choose Approve account, and record a note. The applicant sees this note. Approval, membership creation and audit are transactional. The membership retains the applied MonId/name. New remains New; this flow does not allocate a permanent monastery ID or merge/create directory records. 6. Applicant uses Refresh status to see approval and open the participant form. To undo approval, open an approved application in the staff portal, enter a reason in Undo account approval, and press Unapprove account. The application returns to pending review and its membership becomes inactive. Contact verification and participant drafts are retained. The reason is visible to the applicant and recorded in history. Staff may review and approve again; this reactivates the same membership rather than creating a duplicate. More information needed reopens an application for editing/resubmission; edits require fresh WhatsApp confirmation. Declined applications cannot be edited. Applicants stay signed in across browser restarts until sign-out or token expiry. Staff use sessionStorage and must sign in after a new browser session. Both token types are scoped to the backend URL and refreshed on load; passwords are never saved. Name/email are remembered for convenient sign-in. Incomplete applicant fields are saved locally on each edit, even when required fields are still missing. Refresh/reopening restores the draft. These caches are scoped to the backend and applicant account. Explicit Save application writes the complete application to PocketBase and clears the local field draft. Submitted/reviewed server data takes precedence over old local caches. Public configuration RegForm/monlam-config.js contains the backend URL (empty = same origin), WhatsApp recipient number and participant form URL. No credentials belong there. The dev launcher binds only to 127.0.0.1. For production use HTTPS, configure the real application URL and SMTP privately, and deploy the tested schema/hooks plus frontend. Participant access/submission needs its own server-side authorization; hiding a form link does not protect static files. Verification node --test RegForm/monlam-api.test.cjs RegForm/monlam-guided.test.cjs RegForm/monlam-pdf.test.cjs RegForm/monlam-pdf-reader.test.cjs node --test pocketbase-local/test/backend.test.cjs pocketbase-local/test/portal-browser.test.cjs The browser check opens visible Edge by default, with brief pauses so you can watch each action. It closes the test browser when finished. For headless runs in PowerShell, set $env:MONLAM_HEADLESS = '1' before running the test; remove that environment variable to return to visible mode. It uses an isolated temporary PocketBase and local SMTP capture. It covers delivered verification/reset links, signup, draft/save, submit, WhatsApp URL, session restore, wrong sender rejection, approval with an empty monastery directory, and a 390px mobile layout check. It also checks unfinished details across refresh/fresh tabs, and backend tests check that even verified applicants cannot read the monastery directory or select guessed official record IDs. It also downloads a real native03_c PDF and checks its one backend JSON plus page JPEG attachments, then opens it in the viewer and checks coordinate-based portrait previews. Unit tests cover multiple participant-page attachments. It does not test actual Gmail delivery or WhatsApp sending. It sends no external messages, creates no development-instance users, and deletes its temporary data. Set CHROMIUM_PATH if Edge is installed at another location.