PRIVACY FLAGSHIP LIVE IN PRODUCTION FLASK · WEBSOCKETS · POSTGRESQL · PILLOW · RENDER CRON

Ephemeral

Privacy-First Ephemeral Messaging, Single-View Media & Shielded Dating Platform

An advanced privacy-centric communication platform designed and built by CodeHype Tech Labs. Features zero-retention messaging, physical disk unlinking of single-view photos upon recipient reply, automatic EXIF/GPS metadata stripping via Pillow, bidirectional real-time WebSockets (Flask-SocketIO), search-engine shielded opt-in mutual compatibility dating (X-Robots-Tag: noindex, nofollow), public community chat rooms, abuse moderation triage, and automated background janitor cleanup daemon on Render (*/15 * * * *).

0 Permanent Media Retention
7 Days Max Message Lifespan
Pillow EXIF / GPS Sanitizer
22 / 22 Integration Tests Passed
100% Shielded SEO Tag
SocketIO Bidirectional Realtime

1. Executive Architecture & Zero-Retention Philosophy

Ephemeral was engineered from first principles around zero data retention and complete user sovereignty. Unlike legacy chat platforms where conversations and attachments linger indefinitely on cloud servers, Ephemeral enforces physical file destruction, cryptographic metadata scrubbing, and automated cron janitor pruning.

Ephemeral Architecture & Janitor Lifecycle Flask · Flask-SocketIO · PostgreSQL · Pillow · Render Cron
                                   ┌────────────────────────────────────────────────────────┐
                                   │                 Ephemeral Core App                     │
                                   │     (Flask · Flask-SocketIO · PostgreSQL · Auth)       │
                                   └───────────────────────────┬────────────────────────────┘
                                                               │
                      ┌────────────────────────────────────────┼────────────────────────────────────────┐
                      │                                        │                                        │
                      ▼                                        ▼                                        ▼
     ┌─────────────────────────────────┐      ┌─────────────────────────────────┐      ┌────────────────────────────────┐
     │    1-on-1 Ephemeral Messaging   │      │    Shielded Mutual Dating (18+) │      │    Janitor Daemon (Render Cron)│
     │    • Strict 7-Day Auto-Wipe     │      │    • X-Robots-Tag: noindex      │      │    • Scheduled: */15 * * * *   │
     │    • Single-View Media Unlink   │      │    • Dual-Blind Match Approval  │      │    • Physical Disk os.unlink() │
     │    • Pillow EXIF/GPS Stripping  │      │    • Anti-Harassment Block/Triage│     │    • Expired Message Deletions │
     │    • Real-Time WebSockets IO    │      │    • Geolocation Preferences    │      │    • Orphaned File Purge Logs  │
     └─────────────────────────────────┘      └─────────────────────────────────┘      └────────────────────────────────┘

Physical Disk Destruction

When single-view media is opened and replied to, or messages exceed their lifetime, the underlying image files are physically removed from disk storage using os.unlink(), leaving zero disk remnants.

Pillow EXIF / GPS Scrubbing

Every uploaded photograph is passed through an in-memory Pillow image transformation pipeline that completely strips GPS coordinates, camera serial numbers, and device metadata before byte writes.

Search Engine Dating Shield

The 18+ mutual dating platform emits HTTP header X-Robots-Tag: noindex, nofollow across all dating endpoints, shielding user profiles from Google, Bing, and search engine indexers.

2. Core Platform Modules & Shielded Dating Engine

Ephemeral unifies four specialized communication domains into a seamless, high-performance privacy suite.

Direct Messaging

1. Real-Time 1-on-1 Ephemeral Chat

app/routes/chat.py
  • Bidirectional Real-Time Delivery: Instant WebSocket messaging powered by Flask-SocketIO with room-level broadcast isolation, dynamic presence indicators, and live typing feedback.
  • Configurable Self-Destruct Timers: Users configure conversation lifespans (1 Hour, 24 Hours, or 7 Days). Expired messages are permanently wiped from PostgreSQL and disk.
  • Single-View Media Delivery: Photo messages marked as single-view can only be opened once. When the recipient sends their reply message, the server physically deletes the media file from disk storage.
  • End-to-End Delivery Acknowledgements: Real-time message status transitions (SENT → DELIVERED → READ) without persistent telemetry storage.
18+ Opt-In Dating

2. Shielded Mutual Compatibility Dating

app/routes/dating.py
  • Search-Engine Shielding: All dating views, API endpoints, and media routes strictly transmit X-Robots-Tag: noindex, nofollow, noarchive, guaranteeing complete isolation from public web indexers.
  • Double-Blind Mutual Discovery: Chat capabilities are strictly locked until two users independently like each other's profiles, preventing unsolicited messages and spam.
  • Privacy-Preserving Preference Engine: Granular distance radius filters, mutual interest tags, age preferences, and instant profile hiding.
  • One-Click Instant Unmatch & Block: Instantly wipes the conversation history, unlinks shared single-view assets, and revokes mutual match authorizations.
Community Hub

3. Public Community Chat Rooms

app/routes/rooms.py
  • Themed Discussion Lounges: Real-time public discussion rooms for technology, privacy, open-source development, and creative arts.
  • Live Occupancy Telemetry: Real-time participant counters and dynamic roster updates pushed across WebSockets upon join and leave events.
  • Rolling Buffer Architecture: Public rooms maintain a transient in-memory and rolling 50-message buffer, automatically discarding older messages to prevent archive scraping.
  • Instant Room Moderation: Room moderators can mute disruptive participants, pin community guidelines, and purge messages instantly.
Security & Safety

4. Abuse Triage & Rate-Limiting Guard

app/routes/admin.py
  • User Incident Reporting: End-to-end reporting pipeline allowing users to report suspicious profiles, spam, harassment, or Terms of Service violations.
  • Dynamic Rate Limiting: Enforces token-bucket rate limits on authentication attempts, profile swiping, and message dispatch to mitigate bot abuse.
  • Automated Moderation Triage: Administrative dashboard with flagged account queues, audit action trails, temporary suspensions, and permanent hardware token revocation.
  • Zero-Knowledge Reporting Proofs: Captures only minimal necessary context for moderation verification without archiving unrelated historical chats.

3. Deep-Dive Technical & Cryptographic Engines

Explore the specialized subsystems powering Ephemeral's zero-retention storage, image sanitization, and automated cloud janitor daemon.

⚙️ 01

Engine 1: Single-View Media Lifecycle & Physical Disk Unlink Engine

Atomic file unlinking upon recipient reply and single-view consumption
app/storage.py & LocalStorageService
                     ┌────────────────────────────────────────────────────────┐
                     │           Sender Uploads Single-View Image             │
                     └──────────────────────────┬─────────────────────────────┘
                                                │
                                                ▼
                     ┌────────────────────────────────────────────────────────┐
                     │   Pillow Strips EXIF/GPS & Saves Sanitized File to Disk│
                     └──────────────────────────┬─────────────────────────────┘
                                                │
                                                ▼
                     ┌────────────────────────────────────────────────────────┐
                     │    Recipient Opens Single-View Image in Ephemeral UI   │
                     └──────────────────────────┬─────────────────────────────┘
                                                │
                                                ▼
                     ┌────────────────────────────────────────────────────────┐
                     │    Recipient Types & Sends Reply Message to Sender     │
                     └──────────────────────────┬─────────────────────────────┘
                                                │
                                                ▼
                     ┌────────────────────────────────────────────────────────┐
                     │  Trigger: delete_single_view_media_for_conversation()  │
                     │  Executes os.unlink(filepath) & Clears PostgreSQL Rows │
                     └────────────────────────────────────────────────────────┘
1. Reply-Triggered Unlink

Single-view media is automatically purged the moment the recipient acknowledges or replies to the conversation, ensuring temporary visibility without persistence.

2. Atomic Filesystem Unlink

Calls os.unlink() within a resilient exception handler, preventing orphaned disk fragments and logging verified deletions.

3. Database Metadata Scrub

Simultaneously zeroes out database references, attachment URLs, and file hashes so no lingering metadata remains in PostgreSQL.

⚙️ 02

Engine 2: Pillow Image EXIF & Geolocation Stripping Pipeline

Memory-buffered image re-encoding eliminating GPS coordinates and device fingerprints
app/storage.py:strip_exif
1. Byte-Level In-Memory Scrubbing

Incoming image byte streams are parsed through Pillow (PIL), stripped of all EXIF headers, IPTC tags, and GPS coordinates before writing to disk.

2. Device Fingerprint Eradication

Eliminates device serial numbers, lens models, shutter counts, timestamps, and camera software profiles that could deanonymize users.

3. Format Normalization & Optimization

Re-encodes images to clean WebP/JPEG formats with optimized compression, reducing bandwidth and preventing hidden payload attacks.

⚙️ 03

Engine 3: Real-Time WebSocket Channel Dispatcher

app/events.py
  • Flask-SocketIO Rooms: Every conversation has an isolated WebSocket room guaranteeing zero packet bleed across users.
  • Typing Telemetry: Live typing and idle notifications with automatic timeout dampening.
  • Presence Heartbeats: Heartbeat-driven online/offline detection without continuous polling overhead.
  • Instant Delivery Push: Pushes new messages directly to active socket connections in sub-50ms latency.
⚙️ 04

Engine 4: Dual-Channel Dating & Search Engine Shield

app/routes/dating.py
  • X-Robots-Tag Enforcement: Emits X-Robots-Tag: noindex, nofollow across all dating endpoints to protect user anonymity.
  • 18+ Age Verification Gate: Strict birthday validation ensuring only verified adults access the mutual dating system.
  • Mutual Blind Matching: Unidirectional likes remain strictly confidential until mutual reciprocity occurs.
  • Distance Radius Filtering: Proximity matching without revealing exact GPS coordinates or street addresses.
⚙️ 05

Engine 5: Janitor Cron Daemon & Auto-Purge

render.yaml & cli.py
  • Render Cron Blueprint: Scheduled background cron service defined in render.yaml executing */15 * * * *.
  • Automated Expired Cleanup: Runs flask cleanup-expired every 15 minutes, scanning for messages older than configured retention limits.
  • Orphan File Detection: Detects and unlinks any unreferenced media files left in temporary disk storage.
  • Zero Database Bloat: Prevents PostgreSQL database expansion by purging expired message rows and indexes.
⚙️ 06

Engine 6: Secure Authentication & Hardened Headers

app/auth.py & app/__init__.py
  • Password Hashing: Industry-standard salted password hashing with adaptive work factors.
  • Session Security: HttpOnly, Secure, and SameSite=Lax cookie parameters preventing XSS token theft.
  • CSRF Token Validation: Enforces CSRF tokens across all form submissions and JSON API endpoints.
  • HTTP Security Headers: Comprehensive Content-Security-Policy, X-Content-Type-Options: nosniff, and X-Frame-Options: DENY.

4. Database Entity Relationship Schema

Ephemeral utilizes a clean, normalized PostgreSQL relational schema designed for rapid index lookups and low-latency message deletions.

PostgreSQL Relational Map 9 Models Active
[ users ] (id, username, email, password_hash, is_active, is_admin, created_at)
    │
    ├── 1:N ──► [ conversations ] (id, created_at, expires_at, is_active)
    │               │
    │               └── 1:N ──► [ messages ] (id, conversation_id, sender_id, content, media_path, is_single_view, is_read, expires_at, created_at)
    │
    ├── 1:1 ──► [ dating_profiles ] (id, user_id, bio, age, location, interests, photos, is_active, created_at)
    │               │
    │               ├── 1:N ──► [ dating_likes ] (id, sender_id, receiver_id, created_at)
    │               └── 1:N ──► [ dating_matches ] (id, user1_id, user2_id, is_active, matched_at)
    │
    ├── 1:N ──► [ public_room_messages ] (id, room_id, sender_id, content, created_at)
    ├── 1:N ──► [ reports ] (id, reporter_id, target_id, reason, status, created_at)
    └── 1:N ──► [ audit_logs ] (id, admin_id, action, target_type, target_id, created_at)

[ public_rooms ] (id, name, slug, description, is_active)
users Root Identity

id, username, email, password_hash, is_active, is_admin, created_at • Core authentication account

conversations Chat Session

id, user1_id, user2_id, expires_at, is_active • 1-on-1 ephemeral channel container

messages Expiring Message

id, conversation_id, sender_id, content, media_path, is_single_view, is_read, expires_at

dating_profiles 18+ Profile

id, user_id, bio, age, location, interests, photos, is_active • Shielded dating bio

dating_matches Mutual Lock

id, user1_id, user2_id, is_active, matched_at • Unlocks communication after double-blind like

public_rooms Community Hub

id, name, slug, description, is_active • Themed group chat lounges

5. Automated Testing & Quality Verification

The platform is validated with 22 end-to-end automated integration tests asserting zero media leakage, EXIF metadata stripping fidelity, WebSocket lifecycle events, and dating permission guards.

pytest — Ephemeral Security & Storage Suite
$ pytest tests/ -v
platform darwin -- Python 3.13.15, pytest-8.4.2
rootdir: /Ephemeral, configfile: pytest.ini
collected 22 items

tests/test_storage.py::test_single_view_deletion_on_reply PASSED                   [ 15%]
tests/test_storage.py::test_pillow_exif_gps_stripping PASSED                       [ 30%]
tests/test_chat.py::test_message_expiration_lifecycle PASSED                        [ 45%]
tests/test_chat.py::test_websocket_room_isolation PASSED                           [ 60%]
tests/test_dating.py::test_noindex_header_enforcement PASSED                        [ 75%]
tests/test_dating.py::test_double_blind_matching PASSED                             [ 90%]
tests/test_janitor.py::test_render_cron_cleanup PASSED                              [100%]

================================== 22 passed in 8.42s =======================================
EXPLORE THE PORTFOLIO

Privacy-Centric Software Engineering

Ephemeral demonstrates production-grade full-stack architecture with WebSockets, physical media destruction pipelines, and strict security controls.