Documentation v2.0.0

Welcome to P.E.Y.E.K 2.0.0. This version adds comprehensive security hardening, new UI components (Charts, Tables, Forms), and optimized Android integration paths.

OWASP Security Hardening NEW

P.E.Y.E.K 2.0.0 is built with OWASP Top 10 compliance in mind. Our Node.js backend and client SDK include:

  • A03 Injection Defense: Built-in xssSafe() and sanitizeInput() helpers.
  • A05 Security Misconfiguration: Pre-configured Helmet.js and .htaccess security headers.
  • A07 Authentication Failures: Multiple layers of rate limiting (Global + Analytics).
  • Security Nonces: Support for strict CSP nonces in index.html.

Content Protection NEW

Protect your intellectual property with our new obfuscation layer:

  • Canvas Photo Rendering: Sensitive images are rendered to pixels on a canvas, disabling "Right-Click Save As".
  • DevTools Detection: Automatically blurs sensitive UI if DevTools is opened.
  • Screen Protection: CSS print blackout prevents easy screenshots/PDF printing.
  • Input Sanitization: URL parameters are audited for injection patterns on load.

Android Integration Guide NEW

Deploy your P.E.Y.E.K web apps to Android smoothly.

Option 1: Trusted Web Activity (TWA)

The recommended way to publish to Google Play. It uses Chrome to run your PWA in a standalone window.

npx @bubblewrap/cli init --manifest https://peyek.pcode.my.id/manifest.json npx @bubblewrap/cli build

Option 2: Native WebView Integration

Best for adding P.E.Y.E.K elements to existing Android apps. Use s.setJavaScriptEnabled(true) and s.setDomStorageEnabled(true) in your WebSettings.

// Java Example WebView webView = findViewById(R.id.webview); webView.getSettings().setDomStorageEnabled(true); webView.loadUrl("https://peyek.pcode.my.id");

Advanced UI: Tables & Charts NEW

We've added powerful, zero-dependency data visualization components.

// Charting example PeyekCharts.bar('#myChart', { labels: ['Sales', 'Growth', 'Retention'], data: [75, 82, 90] }); // Data Table example new PeyekTable('#table', { data: users, searchable: true, pagination: true });

Installation (CLI)

npx create-peyek-app my-new-project

Initialization

import { PeyekCore } from '@rterizz23/peyek-core'; PeyekCore.init({ license: 'PYK-V2-...' });