← back to Marketing Command Center

modules/board/index.js

30 lines

// Streams Board — the Hootsuite-style multi-column view of the whole marketing
// machine. One vertical column per channel (the connected social platforms +
// Constant Contact email), each showing connection state + that channel's queue
// (scheduled / staged / posted) as dated cards. Read-only aggregation: the board
// pulls from the EXISTING module APIs client-side (/api/channels, /constant-contact,
// /linkedin, /social) so there's no data duplicated here — this module only
// declares the column layout (incl. channels not yet wired, shown as "soon").
module.exports = {
  id: 'board',
  title: 'Streams Board',
  icon: '🗂️',
  mount(router) {
    // The ordered columns the board renders. `kind` tells the front-end which
    // existing API feeds the column; `soon` marks channels with no publish path
    // yet (Threads/Bluesky) so they render as a styled placeholder, not broken.
    router.get('/columns', (_req, res) => res.json({
      columns: [
        { id: 'facebook',  label: 'Facebook',  icon: '📘', kind: 'social' },
        { id: 'instagram', label: 'Instagram', icon: '📸', kind: 'social' },
        { id: 'tiktok',    label: 'TikTok',    icon: '🎵', kind: 'social' },
        { id: 'youtube',   label: 'YouTube',   icon: '▶️', kind: 'social' },
        { id: 'linkedin',  label: 'LinkedIn',  icon: '💼', kind: 'linkedin' },
        { id: 'bluesky',   label: 'Bluesky',   icon: '🦋', kind: 'social' },
        { id: 'threads',   label: 'Threads',   icon: '🧵', kind: 'social' },
        { id: 'email',     label: 'Email · Constant Contact', icon: '✉️', kind: 'email' },
      ],
    }));
  },
};