Full-stack platform

SocialSecure

A social platform with real-time chat, discovery, and news aggregation — built with privacy and account control as first-class features rather than an afterthought.

Role
Architect & sole developer
Stack
Express · MongoDB · React
Domain
Social platform
Status
Full-stack application
socialsecure main window
Main window
Real-time chat and delivery
Privacy first account controls
5 surfaces in one platform

What it is

SocialSecure is a full social application: real-time chat, user discovery, a content feed, a marketplace, news aggregation, and moderation tooling — with privacy-focused account controls running through all of it.

The name is the thesis. Most social platforms bolt privacy on after the fact and end up with settings that don't match the actual data flows. Building the account controls in from the start changes the shape of the backend.

Architecture

The backend is an Express application organized by responsibility rather than by convenience:

LayerContents
routes/Route modules for auth, chat, discovery, feed, market, moderation, public APIs, and news APIs.
services/Shared backend logic: news ingestion, location normalization and caching, realtime handling, lifecycle jobs, and admin utilities.
models/Mongoose models for users, posts, chat, moderation, ingestion, preferences, and social features.
middleware/Request middleware including shared auth token parsing and unified error handling.
utils/Normalization, telemetry helpers, filters, and preference mappers.
data/Static reference datasets, including sports and location maps.
scripts/Operational helpers for maintenance and diagnostics.
frontend/The React application — pages, components, tests, and build configuration.

Shared foundations

Rather than letting each route reinvent the same three things, the platform consolidates them:

  • Token normalization — free-form token-like values (hashtags, tags, keywords) are normalized into lowercase alphanumeric strings, so indexing and comparison behave identically everywhere.
  • Auth middleware — a single source for token parsing and verification, exposing both a required-auth and an optional-auth path, plus shared auth error handling. Optional auth is what lets public endpoints serve richer content to signed-in users without duplicating routes.
  • Structured event logging — emits event payloads with request metadata (IP, user agent) in one consistent shape, so telemetry is genuinely reusable across routes and services instead of being re-derived per endpoint.
The lesson

The most valuable work in this codebase wasn't a feature — it was pulling the repeated validation and auth logic into shared middleware. It's the kind of refactor that's invisible in a demo and obvious the moment a second developer touches the code.

Feature areas

  • Real-time chat — conversation handling with realtime message delivery.
  • Discovery — location-aware user discovery, which is why location normalization and caching get their own service.
  • News aggregation — an ingestion pipeline that pulls and normalizes external news content into the feed.
  • Marketplace — listings alongside the social features.
  • Moderation — tooling for managing content and users.
  • Privacy controls — account-level preferences that actually map to backend behavior.

Testing and deployment

The repository is set up for CI: backend tests run through Jest with --runInBand and --ci for deterministic ordering, and the frontend runs its own test suite in non-watch mode. Deployment variables are documented in a Railway template alongside the standard environment configuration.

Requirements

  • Node.js 18+
  • MongoDB
  • A configured .env with the MongoDB URI, JWT secret, and client URL

Related projects