All Projects

PetSocial

Social networking platform for pet owners — backend, Next.js web app, and admin CMS. HLS video pipeline, SignalR real-time chat/feed, multi-device presence, S3+CloudFront, Docker + CI/CD. Built at Flexloop.

ASP.NET CoreC#SQL ServerRedisSignalRNext.jsTypeScriptFlutterFirebase
S Situation

Flexloop needed a full social networking platform for pet owners built from scratch — covering content sharing (posts, reels, stories), real-time messaging, a B2B marketplace for pet services, and an admin CMS — served across a Next.js web app, an admin dashboard, and Flutter iOS/Android apps simultaneously.

T Task

I owned the backend API, the Next.js user-facing web app, and the admin CMS dashboard. The backend had to handle real-time events, heavy media (video), and multi-device presence without managed infrastructure.

A Actions
  • Built a RESTful API in ASP.NET Core (.NET 10) with 20+ controllers — auth, pet profiles, social content, messaging, business profiles, notifications, bookmarks, and search.
  • Engineered a server-side HLS transcoding pipeline using FFmpeg: adaptive bitrate at 360p/720p/1080p (resolution-aware with portrait/landscape detection), libx264 encoding, 4-second segments, parallel uploads (up to 10 concurrent) of .m3u8 and .ts files directly to S3 — so video starts playing in seconds instead of waiting for a full file download.
  • Implemented three SignalR hubs: ChatHub (typing indicators, 3-level delivery/read receipts, multi-device presence via ConcurrentDictionary connection tracking), FeedHub (live new-post counts, unread notification badges), and ContentHub (real-time likes and comments per content item).
  • Designed secure auth with 2-minute JWT access tokens + 30-day rotating refresh tokens (BCrypt password hashing, token revocation chain stored in DB).
  • Integrated AWS S3 + CloudFront CDN for media delivery — presigned URL uploads, multipart for files over 16MB (6MB chunks, max 200MB), and a background FileCleanupService that purges unused S3 assets every 6 hours.
  • Ran two ASP.NET Core hosted background services: StoryCleanupService (expires stories every hour) and FileCleanupService (S3 asset GC every 6 hours).
  • Integrated Firebase Cloud Messaging for cross-platform push notifications (likes, comments, follows, messages) with fire-and-forget async dispatch.
  • Added OTP-based email/phone verification via Gmail SMTP, Twilio, and Bird SMS with 10-minute expiry.
  • Built a multi-stage Docker image (SDK build → ASP.NET runtime, non-root user UID 1001, FFmpeg bundled, curl health check) and a GitHub Actions CI/CD pipeline that builds, compresses, SCPs the image to EC2, deploys with --restart unless-stopped, and retries health checks 6 times before marking the deploy successful.
  • Built the user-facing Next.js 16 web app with Zustand state management, @microsoft/signalr for real-time PawChat, react-easy-crop for profile/post image editing, and full feature parity with the mobile app — feed, reels, stories, pet profiles, search, and notifications.
  • Developed the Next.js admin CMS with dashboards for user/pet moderation, FAQ management, support messages, event management, and terms/policy editing — giving Flexloop full operational control without engineering involvement.
R Results
  • HLS adaptive streaming cut video start time to seconds — mobile users on 360p load a fraction of the data vs. a full video file download.
  • Multi-device real-time presence (online/offline, typing, read receipts) handled entirely in-memory with zero Redis dependency using a ConcurrentDictionary connection registry.
  • Automated CI/CD pipeline reduced deployments to a single git push to main, with health-check-gated rollout to EC2.
  • Single API served web, iOS, and Android clients in production simultaneously.