nospoilers

NoSpoilers Monorepo Skeleton

This repository is organized as a monorepo with clear boundaries:

Environment config

Both apps consume shared environment constants from @nospoilers/types.

Supported environments: dev, stage, prod.

Override variables per platform:

Web

Mobile

Auth service module

A new shared auth module lives at services/auth and provides:

Content media ingestion/search service

services/content now supports a media-ingestion/search workflow for group experiences:

Security controls and abuse prevention

Auth endpoint protections

services/auth enforces in-memory per-identity rate limiting on:

When limits are exceeded, requests are blocked for a cool-down window and suspicious activity scores are incremented.

Abuse controls

services/content adds invite spam throttling (createInviteLink) to cap invite generation bursts per user.

Suspicious behavior is tracked for:

Use getSuspiciousActivity(...) in both services for operations review and abuse triage.

Input validation and output encoding

User-generated text inputs are validated and sanitized before persistence, including:

All sanitized text paths apply defensive HTML entity encoding to reduce XSS risks in downstream renderers.

Structured audit logs

services/auth emits structured auth audit events via getAuthAuditLog(...) for:

services/content emits structured content audit events via getContentAuditEvents(...) for:

Progress roll-forward/rollback details remain available in getProgressAuditTrail(...).

Monitoring, alerting, and error tracking defaults

For web/mobile/backend deployments, use these defaults:

Recommended dashboards:

  1. Auth reliability (OTP send/verify success rates, login failures, refresh failures)
  2. Abuse detection (rate-limit blocks, suspicious activity score distribution)
  3. Invite funnel (issued invites, accept attempts, expired/max-use failures)
  4. Progress integrity (mark-read volume, rollback success/failure ratio)

Secure deployment defaults