);
const Toggle = ({ label, hint, on }) => {
const [v, setV] = React.useState(!!on);
return (
);
// ─────────────────────────────────────────────────────────────────
// MEDIA LIBRARY
const CMSMedia = () => {
const [view, setView] = React.useState('grid');
const types = [
{ n: 'cover.jpg', size:'2.4 MB', dim:'2400×1350', c:'#7c9bff' },
{ n: 'hero-shot.png', size:'4.1 MB', dim:'3200×2000', c:'#a78bfa' },
{ n: 'team-photo-01.jpg', size:'1.8 MB', dim:'2000×1333', c:'#ff8a3a' },
{ n: 'wordmark.svg', size:'12 KB', dim:'vector', c:'#d4ff3a' },
{ n: 'screenshot-dashboard.png', size:'1.2 MB', dim:'1920×1080', c:'#7ee787' },
{ n: 'process-diagram.svg', size:'24 KB', dim:'vector', c:'#fde047' },
{ n: 'og-default.jpg', size:'380 KB', dim:'1200×630', c:'#34d399' },
{ n: 'avatar-hassan.jpg', size:'120 KB', dim:'400×400', c:'#22d3ee' },
{ n: 'icon-set.svg', size:'8 KB', dim:'vector', c:'#f472b6' },
{ n: 'video-cover.jpg', size:'2.1 MB', dim:'1920×1080', c:'#7c9bff' },
{ n: 'pattern-grid.svg', size:'4 KB', dim:'vector', c:'#a78bfa' },
{ n: 'product-mock.png', size:'3.4 MB', dim:'2400×1600', c:'#d4ff3a' },
];
return (
Media library
284 files · 2.4 GB used of 50 GB
+ New folder
↑ Upload
{['All','Images','SVG','Video','Documents'].map((t,i) => (
{t}
))}
setView('grid')} style={{padding:'4px 9px',borderRadius:5,fontSize:12,background: view==='grid' ? 'var(--bg-3)' : 'transparent',color: view==='grid' ? 'var(--ink)' : 'var(--ink-3)'}}>⊞ Grid
setView('list')} style={{padding:'4px 9px',borderRadius:5,fontSize:12,background: view==='list' ? 'var(--bg-3)' : 'transparent',color: view==='list' ? 'var(--ink)' : 'var(--ink-3)'}}>☰ List
{view === 'grid' && (
{types.map((f,i) => (
))}
)}
{view === 'list' && (
{['Name','Type','Dimensions','Size','Uploaded',''].map(h => (
{h}
))}
{types.map((f,i) => (
))}
)}
);
};
// ─────────────────────────────────────────────────────────────────
// USERS & ROLES
const CMSUsers = () => {
const users = [
{ name:'Hassan A.', email:'hassan@solidatoms.com', role:'Owner', last:'just now', avatar:'HA', color:'#d4ff3a', mfa:true, status:'active' },
{ name:'Amir Q.', email:'amir@solidatoms.com', role:'Admin', last:'8m ago', avatar:'AQ', color:'#7c9bff', mfa:true, status:'active' },
{ name:'Sana R.', email:'sana@solidatoms.com', role:'Editor', last:'2h ago', avatar:'SR', color:'#ff8a3a', mfa:true, status:'active' },
{ name:'Bilal K.', email:'bilal@solidatoms.com', role:'Editor', last:'yesterday', avatar:'BK', color:'#a78bfa', mfa:false, status:'active' },
{ name:'Noor M.', email:'noor@solidatoms.com', role:'Writer', last:'3 days ago', avatar:'NM', color:'#7ee787', mfa:false, status:'active' },
{ name:'pending@externalclient.com', email:'pending@externalclient.com', role:'Reviewer', last:'—', avatar:'?', color:'#ffffff44', mfa:false, status:'invited' },
];
return (
Team & roles
5 members · 1 pending invite
+ Invite member
{/* Roles legend */}
{[
{r:'Owner',c:1,d:'Full access, billing, team'},
{r:'Admin',c:1,d:'Manage content, no billing'},
{r:'Editor',c:2,d:'Write, edit, publish'},
{r:'Writer',c:1,d:'Write, edit drafts only'},
].map(x => (
))}
{['Member','Email','Role','MFA','Last active',''].map(h => (
{h}
))}
{users.map((u,i) => (
0 ? '1px solid var(--line)' : 'none', opacity: u.status==='invited' ? 0.6 : 1}}>
{u.avatar}
{u.name}
{u.status === 'invited' &&
INVITE SENT }
{u.email}
{u.role}
{u.mfa ? '✓ On' : '— Off'}
{u.last}
⋯
))}
{/* Permission matrix */}
Permission matrix
{['Permission','Owner','Admin','Editor','Writer'].map(h => (
{h}
))}
{[
['Read all content', true, true, true, true],
['Create drafts', true, true, true, true],
['Publish content', true, true, true, false],
['Delete content', true, true, false, false],
['Manage media', true, true, true, false],
['Invite members', true, true, false, false],
['Manage roles', true, false, false, false],
['Manage billing', true, false, false, false],
['Delete workspace', true, false, false, false],
].map(([p, ...perms], i) => (
0 ? '1px solid var(--line)' : 'none'}}>
{p}
{perms.map((ok, j) => (
{ok ? '●' : '○'}
))}
))}
);
};
// ─────────────────────────────────────────────────────────────────
// SETTINGS
const CMSSettings = () => {
const [tab, setTab] = React.useState('general');
return (
Settings
{[
['general','General'],
['workflow','Workflow'],
['integrations','Integrations'],
['domains','Domains'],
['api','API & webhooks'],
['billing','Billing'],
].map(([id,l]) => (
setTab(id)} style={{
padding:'8px 12px',borderRadius:7,fontSize:13,textAlign:'left',
background: tab===id ? 'rgba(255,255,255,0.04)' : 'transparent',
color: tab===id ? 'var(--ink)' : 'var(--ink-3)',
border:'1px solid', borderColor: tab===id ? 'var(--line-2)' : 'transparent'
}}>{l}
))}
{tab === 'general' && (
)}
{tab === 'workflow' && (
Editorial workflow
Drag stages to reorder. Required gates can't be skipped.
{[
['Draft','Editor','—','required'],
['Review','Editor + Admin','MFA','required'],
['Schedule','Editor','—','optional'],
['Publish','Admin','MFA','required'],
].map(([s,r,g,t],i) => (
0{i+1}
{s}
{r}
Gate: {g}
{t}
⋮
))}
)}
{tab === 'integrations' && (
{[
{n:'Stripe',d:'Payments + subscriptions',on:true,c:'#635bff'},
{n:'Resend',d:'Transactional + newsletter',on:true,c:'#000'},
{n:'PostHog',d:'Product analytics',on:true,c:'#1d4aff'},
{n:'Sentry',d:'Error monitoring',on:true,c:'#362d59'},
{n:'Slack',d:'Notifications',on:false,c:'#4a154b'},
{n:'Linear',d:'Project mgmt sync',on:false,c:'#5e6ad2'},
{n:'Algolia',d:'Search index',on:false,c:'#003dff'},
{n:'Cloudinary',d:'Image CDN',on:true,c:'#3448c5'},
].map(i => (
{i.n[0]}
{i.on ? 'Connected' : 'Connect'}
))}
)}
{tab === 'domains' && (
{[
['solidatoms.com','Primary','✓ Verified','Cloudflare'],
['www.solidatoms.com','Redirect','✓ Verified','Cloudflare'],
['atoms.tools','Tool subdomain','✓ Verified','Cloudflare'],
['client.solidatoms.com','Portal','⧗ Pending DNS','—'],
].map(([d,t,s,prov],i) => (
{d}
{t}
{s}
{prov}
⋯
))}
+ Add domain
)}
{tab === 'api' && (
API keys
{[
['Production','sk_live_••••8a9f','Created Apr 2 · Last used 12m ago'],
['Preview','sk_test_••••e1c2','Created May 1 · Last used 3h ago'],
].map(([n,k,t],i)=>(
))}
Webhooks
3 active endpoints · 99.8% delivery rate
)}
{tab === 'billing' && (
)}
);
};
// ─────────────────────────────────────────────────────────────────
// ACTIVITY
const CMSActivity = () => {
const events = [
{who:'HA',c:'#d4ff3a',action:'published',target:'Lighthouse Diff v1.0',col:'Tool',when:'12m ago'},
{who:'SR',c:'#ff8a3a',action:'requested review on',target:'Ledgerline case study v2',col:'Project',when:'2h ago'},
{who:'BK',c:'#a78bfa',action:'edited',target:'RAG is dead. Long live retrieval…',col:'Journal',when:'4h ago'},
{who:'HA',c:'#d4ff3a',action:'invited',target:'pending@externalclient.com',col:'Team',when:'yesterday'},
{who:'AQ',c:'#7c9bff',action:'archived',target:'Old pricing page',col:'Page',when:'2 days ago'},
{who:'NM',c:'#7ee787',action:'commented on',target:'Northbound case study',col:'Project',when:'2 days ago'},
{who:'SR',c:'#ff8a3a',action:'created',target:'Designing for LLM-native UI',col:'Journal',when:'3 days ago'},
{who:'HA',c:'#d4ff3a',action:'rolled API key',target:'Production',col:'Settings',when:'1 week ago'},
{who:'AQ',c:'#7c9bff',action:'connected',target:'PostHog integration',col:'Settings',when:'1 week ago'},
];
return (
Activity
Everything that happened in this workspace, in order.
{['All','Content','Team','Settings'].map((t,i)=>(
{t}
))}
{events.map((e,i) => (
{e.who}
{e.who} {e.action} {e.target}
{e.col.toUpperCase()}
{e.when}
))}
);
};
// ─────────────────────────────────────────────────────────────
// SUPER-ADMIN COMMAND CENTER — every controller in one place
const SuperAdminCommandCenter = ({ setPage }) => {
const controllers = [
{ page:'analytics', icon:'↗', label:'Analytics studio', sub:'Traffic · cohorts · alerts', metric:'2.4k/min', status:'live', badge:'NEW', module:'M12 · SP12', tone:'var(--accent)' },
{ page:'email', icon:'✉', label:'Email studio', sub:'Transactional · drips', metric:'18 templates', status:'live', badge:null, module:'M13', tone:'#7c9bff' },
{ page:'onboarding', icon:'◐', label:'Onboarding', sub:'First-run wizard', metric:'4 steps', status:'live', badge:null, module:'M14', tone:'#a78bfa' },
{ page:'portal', icon:'◉', label:'Client portal', sub:'Ledgerline · active', metric:'3 clients', status:'live', badge:null, module:'M09', tone:'#ff8a3a' },
{ page:'plan', icon:'▢', label:'Project plan', sub:'14 modules · 13 shipped', metric:'93%', status:'live', badge:null, module:'M01', tone:'#7ee787' },
{ page:'pricing', icon:'$', label:'Pricing & billing', sub:'4 plans · Stripe', metric:'$84.2k MRR', status:'live', badge:null, module:'M08', tone:'#22d3ee' },
{ page:'auth', icon:'⊕', label:'Auth & identity', sub:'Login · SSO · MFA', metric:'8 screens', status:'live', badge:null, module:'M10', tone:'#f472b6' },
{ page:'home', icon:'◱', label:'Public site', sub:'Marketing surfaces', metric:'12 pages', status:'live', badge:null, module:'M02–11', tone:'#fde047' },
];
return (
◈ CONTROL DECK
All modules
{controllers.length} controllers · all healthy
ALL SYSTEMS GO
setPage('plan')} className="mono" style={{fontSize:10,color:'var(--ink-3)',letterSpacing:'0.06em',padding:'5px 10px',borderRadius:6,border:'1px solid var(--line)'}}>OPEN ROADMAP ↗
{controllers.map(c => (
{setPage(c.page); window.scrollTo({top:0})}} style={{
padding:'18px 20px',background:'var(--bg-2)',textAlign:'left',
display:'flex',flexDirection:'column',gap:12,transition:'all .15s ease',position:'relative',minHeight:138
}}
onMouseEnter={e=>{e.currentTarget.style.background='#16161a'}}
onMouseLeave={e=>{e.currentTarget.style.background='var(--bg-2)'}}>
{c.icon}
{c.badge && {c.badge} }
{c.module}
{c.metric}
{c.status.toUpperCase()}
))}
{/* Active sprint strip */}
● ACTIVE SPRINT
SP12 · Analytics studio
W44–W45 · Day 2 of 10 · 4/26 pts shipped
setPage('analytics')} className="btn btn-primary" style={{padding:'7px 14px',fontSize:11}}>Open Analytics ↗
);
};
window.CMS = CMS;