πŸš€ SHIPPED: The Stateless Feedback Substrate (v1.0)

●6 ●52 ●116
calendar_today ago β€’ schedule2 min read

Most "user feedback" plugins are just thinly veiled surveillance scripts. They inject heavy tracking pixels, log cursor movement, ship raw database telemetry to centralized SaaS clouds, and create a massive compliance liability.

We refused to build that way.

Today, my team lifted the code freeze on the Pocket Portfolio Feedback Substrateβ€”a stateless, local-first feedback engine engineered for absolute data sovereignty.

Here is the exact technical blueprint of how we solved the user-telemetry paradox on the write-path:

πŸ”Ή Zero-Telemetry Trigger Logic
100% client-side eligibility validation. Zero telemetry is shipped on navigation just to determine if a user should see the modal.

// Local-First State Machine
const visitGate = localStorage.getItem('pp_dash_visits');
if (visitGate && JSON.parse(visitGate).count > 5) {
  mountFeedbackSubstrate();
}

πŸ”Ή Deterministic Privacy (The HMAC Decoupling)
To decouple telemetry metadata from actual user records, identity on the vault/event store uses a strict cryptographic barrier:
anonUserHash = HMAC-SHA256(uid, pepper)
Raw user IDs and emails never touch the analytics collections. The FEEDBACK_ANON_PEPPER remains locked on our server-side secure environment variables.

πŸ”Ή Dual-Scrub Sanitization
Data is sanitized client-side before submission, and scrubbed again server-side on the API write-path. If a user accidentally pastes sensitive PII or raw transaction keys, our regex/entropy engine strips it down to anonymous context strings before it hits persistence.

πŸ”Ή Restricted Server-Only Write Paths
We bypassed client-direct database writes. All submissions go through POST /api/feedback/submit using the Firebase Admin SDK. The public firestore.rules explicitly block all client-side write access:

match /feedbackSubmissions/{document} {
  allow read: if request.auth.token.admin == true;
  allow write: if false; // Server-side SDK writes only
}

πŸ”Ή Synchronous P0 Escalation
A client reporting a critical, broken UI state (P0) triggers an immediate bypass of standard curation queues. Our API route parses the severity on-the-fly and fires a direct webhook payload alongside a verified Resend transactional dispatch straight to *Emails are not allowed* for immediate triage.

πŸ”Ή Static Compilation of Featured Receipts
Our public landing pages (/ and /open) never query the live feedback database. Instead, they load from featuredReceipts. When our team promotes a submission inside /admin/analytics, we compile a sanitized, static excerpt to the public CMS. No leaks, no trace parameters, and no connection back to the sourceSubmissionId.

The code is compiled, the rules are deployed, and the pipeline is officially live. No trackers, no third-party cookies, and no telemetry creep.

If you're on our dashboard, you can force-mount the substrate and audit the network payload using ?showFeedbackModal=true.

Your Data. Your Device. Your Rules.

#LocalFirst #SelfSovereignIdentity #EdgeComputing #SovereignTech #TypeScript

πŸ”₯ Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Local-First: The Browser as the Vault

Pocket Portfolio - Apr 20

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelskiverified - Apr 23

The End of Data Export: Why the Cloud is a Compliance Trap

Pocket Portfolio - Apr 6

Split-Brain: Analyst-Grade Reasoning Without Raw Transactions on the Server

Pocket Portfolio - Apr 8

Merancang Backend Bisnis ISP: API Pelanggan, Paket Internet, Invoice, dan Tiket Support

Masbadar - Mar 13
chevron_left
5.8k Points β€’ 174 Badges
United Kingdom β€’ pocketportfolio.app/press
67Posts
51Comments
33Connections
Led delivery of OceanBrain at National Grid Ventures, reducing manual subsea investigations by 60%.
... Show more

Related Jobs

View all jobs β†’

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!