Familybook V 1.0.0
Familybook V 1.0.0 Logo

Familybook V 1.0.0

FamilyBook: Project Overview

FamilyBook is a private, family-oriented social networking platform designed to provide a secure and intimate space for families and close-knit groups to connect, share, and communicate. Unlike mainstream social media, it emphasizes privacy through granular relationship logic and restricted-access groups.

🏗️ Technical Architecture

The project follows a modern decoupled architecture:

  • Frontend: A single-page application (SPA) built with React and TypeScript.
  • Backend: A RESTful API and WebSocket server built with Node.js and Express.
  • Database: A relational PostgreSQL database for structured data and complex relationship modeling.
  • Real-time: Bidirectional communication via Socket.io for messaging and notifications.
  • Infrastructure: Production-ready deployment managed via PM2, with Nginx serving as a reverse proxy.

💻 Tech Stack

Frontend

  • Framework: React (Create React App v5)
  • Language: TypeScript (v4.9.5)
  • Styling: Tailwind CSS (v3.4.17) for utility-first responsive design.
  • Routing: React Router (v7) for advanced client-side navigation.
  • Icons: Heroicons
  • Components: Headless UI for accessible, unstyled components.
  • State Management: React Context API for Auth, Theme, Socket, and Notifications.

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database Driver: pg (node-postgres)
  • Real-time: Socket.io (v4)
  • Authentication: JSON Web Tokens (JWT) with bcryptjs hashing.
  • Media Processing: sharp for high-performance image resizing and multer for file uploads.
  • Security: helmet for CSP and security headers, cors for cross-origin management.
  • Integrations: web-push for VAPID-based push notifications.

🚀 Core Features & Functions

1. 👥 Relationship & Privacy Logic

  • Social Graph: Support for both "Friends" and specific "Family" relationship types.
  • Granular Privacy: Users can set default and per-post privacy levels (Public, Friends, Family).
  • Mentions: Integrated tagging system that automatically surfaces posts on mentioned users' walls.

2. 🛡️ Advanced Groups System

  • Tiered Visibility:

    • Public: Discoverable and open to all.
    • Private: Discoverable, but requires membership approval.
    • Secret: Completely hidden; requires invitation and has strict super-admin-only audit bypass for safety.
  • Internal Ecosystem: Each group contains its own wall, forums, and events.

3. 🏛️ Forum System

  • Structured forums within groups with categories, threads, and replies.
  • Support for pinned and locked threads.
  • Rich media integration in both initial threads and replies.

4. 📅 Event Management

  • Create and manage family or group events with dates, locations, and descriptions.
  • RSVP System: Track attendees ("Going", "Maybe", "Declined") in real-time.

5. 💬 Communication & Notifications

  • Real-time Messaging: Direct 1-on-1 messaging between connected users.
  • Notification Engine: In-app alerts and browser-level Web Push Notifications (VAPID) for likes, comments, mentions, and invites.

6. 🛡️ Administrative Control

  • Tiered Moderation: Moderator, Admin, and Super Admin roles with escalating permissions.
  • Global Moderation: Tools to manage users, moderate content (posts, comments, photos), and review reports.
  • Audit Logging: Comprehensive system logs tracking all administrative actions for transparency and security.

📊 Database Schema Highlights

The relational model ensures data integrity across:

  • UUIDs: All records use v4 UUIDs for identifiers.
  • Complex Joins: Robust handling of many-to-many relationships (group memberships, event attendees, friendships).
  • Automation: SQL triggers for automated updated_at timestamp management.
  • Integrity: Strict foreign key constraints ensuring consistency between posts, comments, and reactions.