01 /Overview.
Social products lose trust through a single unauthorized event, a leaked audience, or an outage that silently drops writes. Identity, audience controls, realtime delivery, and operations have to behave as one system rather than as separate screens.
Why it matters. People share personal material on a social platform. They need permissions that hold over realtime channels as well as HTTP, account recovery that does not become a takeover path, and an operator who can slow or pause the product without corrupting it.
Workflow. A request enters the React web app, passes authentication and authorization at the Express or Socket.IO boundary, is checked against the current protection level and Redis-backed rate limits, then reads or writes PostgreSQL through Drizzle before any realtime fan-out.
Outcome. A deployed social product whose identity, permission, realtime, and abuse-protection paths share one server-owned trust boundary, plus documented operator controls for degrading safely under load or attack.
02 /My contribution.
I founded Avelry and lead its full-stack development: the React/TypeScript web app, Express REST/JSON APIs, Socket.IO realtime layer, PostgreSQL/Drizzle data model, Redis-backed operational services, and the emergency controls used to run it. Repository history includes other contributors, so subsystem ownership is not claimed line by line.
Constraints.
- Realtime permissions must be decided by the server, never by client state.
- PostgreSQL owns durable product state; Redis holds only transient coordination, limits, and queues.
- Paid AI and email providers must not be able to run up unbounded cost, even under retries or abuse.
- The operator needs to degrade the product safely without a redeploy, including when the app itself is down.
03 /System architecture.
04 /Technical implementation.
Primary technologies. React · TypeScript · Express · Socket.IO · PostgreSQL · Drizzle · Redis
- Authentication, authorization, and audience checks sit at the API and Socket.IO boundaries, with realtime events gated by the same rules as HTTP routes.
- A protection-gate middleware applies the current emergency level per route; documented operator controls change it from the admin console or the server shell.
- Redis-backed rate limiting and abuse protection run in front of write paths; Redis also carries queues and the provider spend ledger.
- Account workflows include sign-in, two-factor authentication, and account recovery behind the same authorization rules.
Hardest engineering problem. The hardest boundary is operational: deciding what keeps working when the platform is under pressure. Avelry's four protection levels (normal, guarded, read-only, offline) each define exactly which routes stay open, so an operator can shed paid or risky work first and keep sign-in, browsing, and recovery available as long as possible.
One trust boundary for HTTP and realtime
Socket.IO events go through the same authentication and authorization rules as REST requests instead of becoming a second, looser API.
Graded emergency modes
Normal, guarded, read-only, and offline levels are enforced by one protection gate, can be changed from the admin console or the host shell, and survive restarts.
Idempotent spend safeguards
AI and email provider calls are recorded in an idempotent spend ledger, so retries cannot double-count and a lost ledger fails closed instead of allowing unbounded spend.
05 /Testing and validation.
- The 4 Nov 2026 web-release review recorded 855 standard API test cases passing, plus 13 separately enabled rights cases.
- The same review recorded 345 default Chromium end-to-end tests passing, with 13 disabled-feature skips and zero failures.
- Test suites cover socket security, rate-limit scopes, spend-guard and spend-ledger behavior, and suspended-account rights.
06 /Results and evidence.
Avelry was founded on 13 Apr 2026 as Yor Talks; its public prototype repository, github.com/yorayriniwnl/Yor-Talks, was created that day. Avelry runs as a closed beta at avelry.in; its source repository is private, so the links on this page go to the product rather than the code. The test totals come from the 4 Nov 2026 web-release review: 855 standard API cases and 345 default Chromium end-to-end tests passed against the reviewed build. Those are release-review results, not uptime, scale, or security-certification claims.
- Avelry is deployed at avelry.in as a closed beta.
- Emergency controls are documented as an operator runbook rather than left as tribal knowledge.
- Provider spend is capped by an idempotent ledger instead of best-effort counters.
- API tests
- 855Standard API cases passing in the 4 Nov 2026 web-release review
- Chromium E2E
- 345Default Chromium end-to-end tests passing in the same review
- Protection levels
- 4Normal, guarded, read-only, and offline modes with documented operator controls
- supported2026-11-17855 API · 345 Chromium passing testsWeb-release review test resultsRecorded in the 4 Nov 2026 web-release review: 855 standard API cases and 345 default Chromium end-to-end tests passed (13 disabled-feature skips, zero failures). Private repository; describes one reviewed build, not uptime or scaleAvelry web-release review, 4 Nov 2026 ↗
- supported2026-11-174 levels: normal, guarded, read-only, offlineEmergency protection levelsProtection-gate middleware and the operator runbook for emergency controls in the private Avelry repositoryAvelry emergency controls runbook ↗
Interactive system view.
Ready. The walkthrough is deterministic and does not contact an external service.
Owns the React/TypeScript social shell and requests state through authenticated API and Socket.IO calls.
Failure to watch. Stale optimistic state, or a reconnect treated as trusted without revalidation.
Decision. Keep the client responsive while the server stays the policy owner.
Verification / Web-release review: 345 Chromium end-to-end testsTest surface / Chromium end-to-end suiteRun count / 0Source (private) / social/src/App.tsxThe shared machine world follows this project. This panel remains complete without graphics.
07 /Limitations.
- The source repository is private; the evidence here is the closed beta at avelry.in and the recorded release review.
- Release-review test totals describe exercised paths in one reviewed build, not uptime, scale, or a security certification.
- Native mobile apps are separate work and are not part of this case study.
08 /What I would build next.
Publish uptime and latency measurements from production monitoring, and run regular restore drills alongside the release-review test suite.
- A realtime feature is only as trustworthy as its authorization path.
- Operational controls are product features: they decide what users experience on a bad day.
- Cost limits need to be idempotent to survive retries.