Skip to content

Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.

chore: remove legacy MUI drawer, Header, Sidebar, and theme files

valzor6d27175471ef
diff --git a/frontend/src/layout/Drawer/DrawerHeader.jsx b/frontend/src/layout/Drawer/DrawerHeader.jsx
deleted file mode 100644
index ba9c23b..0000000
--- a/frontend/src/layout/Drawer/DrawerHeader.jsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import React from 'react';
-import { Box, Typography } from '@mui/material';
-import Logo from '../../components/ui/Logo';
-import { GREY, PRIMARY } from '../../themes/index';
-
-export default function DrawerHeader({ open }) {
- return (
- <Box
- sx={{
- display: 'flex',
- alignItems: 'center',
- gap: 1.5,
- px: open ? 3 : 0,
- justifyContent: open ? 'flex-start' : 'center',
- minHeight: 60,
- borderBottom: `1px solid ${GREY.A800}`,
- flexShrink: 0,
- }}
- >
- <Logo size={32} />
- {open && (
- <Typography
- variant="h5"
- sx={{
- fontWeight: 700,
- color: 'text.primary',
- letterSpacing: '-0.3px',
- whiteSpace: 'nowrap',
- }}
- >
- Twiligent
- </Typography>
- )}
- </Box>
- );
-}
diff --git a/frontend/src/layout/Drawer/Navigation.jsx b/frontend/src/layout/Drawer/Navigation.jsx
deleted file mode 100644
index 1a7b2cf..0000000
--- a/frontend/src/layout/Drawer/Navigation.jsx
+++ /dev/null
@@ -1,200 +0,0 @@
-import React from 'react';
-import { useNavigate, useLocation } from 'react-router-dom';
-import {
- Box, List, ListItemButton, ListItemIcon, ListItemText,
- Typography, Divider, Avatar, Tooltip,
-} from '@mui/material';
-import {
- Dashboard, YouTube, Subscriptions, ContentCut,
- Instagram, CloudUpload, ManageAccounts, Settings,
-} from '@mui/icons-material';
-import { useAppContext } from '../../context/AppContext';
-import { PRIMARY, GREY } from '../../themes/index';
-
-const DRAWER_WIDTH = 260;
-
-const NAV_GROUPS = [
- {
- label: 'Analytics',
- items: [
- { path: '/', label: 'Overview', icon: <Dashboard /> },
- { path: '/videos', label: 'All Videos', icon: <Subscriptions /> },
- { path: '/shorts', label: 'Shorts', icon: <ContentCut /> },
- { path: '/reels', label: 'IG Content', icon: <Instagram /> },
- ],
- },
- {
- label: 'Publishing',
- items: [
- { path: '/upload', label: 'Publish', icon: <CloudUpload /> },
- ],
- },
- {
- label: 'Management',
- items: [
- { path: '/accounts', label: 'Accounts', icon: <ManageAccounts /> },
- { path: '/settings', label: 'Settings', icon: <Settings /> },
- ],
- },
-];
-
-function NavItem({ item, open }) {
- const navigate = useNavigate();
- const location = useLocation();
- const active = location.pathname === item.path;
-
- const button = (
- <ListItemButton
- selected={active}
- onClick={() => navigate(item.path)}
- sx={{
- borderRadius: 1.5,
- mb: 0.5,
- px: open ? 2 : 1.5,
- py: 1,
- justifyContent: open ? 'flex-start' : 'center',
- minHeight: 40,
- position: 'relative',
- ...(active && {
- bgcolor: PRIMARY.lighter,
- '&::after': {
- content: '""',
- position: 'absolute',
- right: 0,
- top: '20%',
- height: '60%',
- width: 2,
- background: PRIMARY.main,
- borderRadius: '2px 0 0 2px',
- },
- }),
- }}
- >
- <ListItemIcon
- sx={{
- minWidth: open ? 36 : 'auto',
- color: active ? PRIMARY.main : GREY[500],
- '& svg': { fontSize: 20 },
- }}
- >
- {item.icon}
- </ListItemIcon>
- {open && (
- <ListItemText
- primary={item.label}
- primaryTypographyProps={{
- fontSize: '0.875rem',
- fontWeight: active ? 600 : 400,
- color: active ? PRIMARY.main : 'text.primary',
- }}
- />
- )}
- </ListItemButton>
- );
-
- if (!open) {
- return <Tooltip title={item.label} placement="right">{button}</Tooltip>;
- }
- return button;
-}
-
-export default function Navigation({ open }) {
- const { accounts } = useAppContext();
- const navigate = useNavigate();
-
- const ytAccounts = accounts.filter(a => a.platform !== 'instagram');
- const igAccounts = accounts.filter(a => a.platform === 'instagram');
-
- return (
- <Box sx={{ flex: 1, overflow: 'auto', px: open ? 1.5 : 1, py: 1.5 }}>
- {NAV_GROUPS.map((group, gi) => (
- <Box key={gi} sx={{ mb: 1 }}>
- {open && (
- <Typography
- sx={{
- px: 1, mb: 0.75,
- fontSize: '0.7rem',
- fontWeight: 600,
- letterSpacing: '0.08em',
- textTransform: 'uppercase',
- color: 'text.secondary',
- }}
- >
- {group.label}
- </Typography>
- )}
- <List disablePadding>
- {group.items.map(item => (
- <NavItem key={item.path} item={item} open={open} />
- ))}
- </List>
- {gi < NAV_GROUPS.length - 1 && (
- <Divider sx={{ my: 1.5 }} />
- )}
- </Box>
- ))}
-
- {/* Accounts quick list */}
- {open && accounts.length > 0 && (
- <>
- <Divider sx={{ my: 1.5 }} />
- <Typography
- sx={{
- px: 1, mb: 0.75,
- fontSize: '0.7rem',
- fontWeight: 600,
- letterSpacing: '0.08em',
- textTransform: 'uppercase',
- color: 'text.secondary',
- }}
- >
- Accounts
- </Typography>
- <List disablePadding>
- {accounts.map(acc => {
- const isIG = acc.platform === 'instagram';
- const path = isIG ? `/instagram/${acc.id}` : `/channel/${acc.id}`;
- return (
- <ListItemButton
- key={acc.id}
- onClick={() => navigate(path)}
- sx={{
- borderRadius: 1.5,
- mb: 0.3,
- px: 1.5,
- py: 0.75,
- '&:hover': { bgcolor: GREY[100] },
- }}
- >
- <ListItemIcon sx={{ minWidth: 34 }}>
- <Avatar
- src={acc.thumbnail || acc.profilePictureUrl || acc.thumbnails?.default || ''}
- sx={{
- width: 24,
- height: 24,
- fontSize: '0.6rem',
- bgcolor: isIG ? '#E1306C' : '#FF0000',
- border: 'none',
- }}
- >
- {isIG ? <Instagram sx={{ fontSize: 12 }} /> : <YouTube sx={{ fontSize: 12 }} />}
- </Avatar>
- </ListItemIcon>
- <ListItemText
- primary={acc.title}
- primaryTypographyProps={{
- fontSize: '0.8rem',
- fontWeight: 400,
- noWrap: true,
- color: 'text.primary',
- }}
- />
- </ListItemButton>
- );
- })}
- </List>
- </>
- )}
- </Box>
- );
-}
diff --git a/frontend/src/layout/Drawer/index.jsx b/frontend/src/layout/Drawer/index.jsx
deleted file mode 100644
index 159e18a..0000000
--- a/frontend/src/layout/Drawer/index.jsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import React from 'react';
-import { Drawer, Box, useMediaQuery } from '@mui/material';
-import DrawerHeader from './DrawerHeader';
-import Navigation from './Navigation';
-import { GREY } from '../../themes/index';
-
-export const DRAWER_WIDTH = 260;
-export const MINI_DRAWER_WIDTH = 72;
-
-export default function MainDrawer({ open, onClose }) {
- const isMobile = useMediaQuery('(max-width:1024px)');
-
- const drawerContent = (
- <Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', overflow: 'hidden' }}>
- <DrawerHeader open={!isMobile ? open : true} />
- <Navigation open={!isMobile ? open : true} />
- </Box>
- );
-
- if (isMobile) {
- return (
- <Drawer
- variant="temporary"
- open={open}
- onClose={onClose}
- ModalProps={{ keepMounted: true }}
- sx={{
- '& .MuiDrawer-paper': {
- width: DRAWER_WIDTH,
- boxSizing: 'border-box',
- borderRight: `1px solid ${GREY.A800}`,
- },
- }}
- >
- {drawerContent}
- </Drawer>
- );
- }
-
- return (
- <Drawer
- variant="permanent"
- sx={{
- width: open ? DRAWER_WIDTH : MINI_DRAWER_WIDTH,
- flexShrink: 0,
- transition: 'width 0.2s ease',
- '& .MuiDrawer-paper': {
- width: open ? DRAWER_WIDTH : MINI_DRAWER_WIDTH,
- boxSizing: 'border-box',
- overflowX: 'hidden',
- transition: 'width 0.2s ease',
- borderRight: `1px solid ${GREY.A800}`,
- },
- }}
- >
- {drawerContent}
- </Drawer>
- );
-}
diff --git a/frontend/src/layout/Header/index.jsx b/frontend/src/layout/Header/index.jsx
deleted file mode 100644
index 9a7b0bb..0000000
--- a/frontend/src/layout/Header/index.jsx
+++ /dev/null
@@ -1,139 +0,0 @@
-import React from 'react';
-import { useNavigate, useLocation } from 'react-router-dom';
-import {
- AppBar, Toolbar, Box, IconButton, Typography,
- Breadcrumbs, Link, useMediaQuery, Tooltip, Avatar, Badge,
-} from '@mui/material';
-import {
- MenuOpen, Menu as MenuIcon, Refresh,
- NavigateNext, Notifications, Settings,
-} from '@mui/icons-material';
-import { DRAWER_WIDTH, MINI_DRAWER_WIDTH } from '../Drawer/index';
-import { useAppContext } from '../../context/AppContext';
-import { GREY, PRIMARY } from '../../themes/index';
-
-const BREADCRUMB_MAP = {
- '/': { label: 'Overview', parent: null },
- '/videos': { label: 'All Videos', parent: 'Analytics' },
- '/shorts': { label: 'Shorts', parent: 'Analytics' },
- '/reels': { label: 'IG Content', parent: 'Analytics' },
- '/upload': { label: 'Publish', parent: 'Publishing' },
- '/accounts': { label: 'Accounts', parent: 'Management' },
- '/settings': { label: 'Settings', parent: 'Management' },
-};
-
-export default function Header({ drawerOpen, onToggleDrawer }) {
- const navigate = useNavigate();
- const location = useLocation();
- const isMobile = useMediaQuery('(max-width:1024px)');
- const { loading, refreshAll } = useAppContext();
-
- const drawerWidth = drawerOpen ? DRAWER_WIDTH : MINI_DRAWER_WIDTH;
-
- // resolve breadcrumb for dynamic routes like /channel/:id and /instagram/:id
- let pathname = location.pathname;
- let crumb = BREADCRUMB_MAP[pathname];
- if (!crumb && pathname.startsWith('/channel/')) {
- crumb = { label: 'Channel Analytics', parent: 'Analytics' };
- } else if (!crumb && pathname.startsWith('/instagram/')) {
- crumb = { label: 'Instagram Analytics', parent: 'Analytics' };
- }
-
- return (
- <AppBar
- position="fixed"
- sx={{
- width: isMobile ? '100%' : `calc(100% - ${drawerWidth}px)`,
- ml: isMobile ? 0 : `${drawerWidth}px`,
- transition: 'width 0.2s ease, margin-left 0.2s ease',
- zIndex: 1200,
- bgcolor: 'background.paper',
- borderBottom: `1px solid ${GREY.A800}`,
- boxShadow: 'none',
- }}
- >
- <Toolbar sx={{ minHeight: '60px !important', px: { xs: 2, sm: 3 }, gap: 2 }}>
- {/* Drawer toggle */}
- <IconButton
- onClick={onToggleDrawer}
- edge="start"
- size="small"
- sx={{
- color: 'text.primary',
- bgcolor: drawerOpen ? 'transparent' : GREY[100],
- '&:hover': { bgcolor: GREY[100] },
- }}
- >
- {drawerOpen ? <MenuOpen /> : <MenuIcon />}
- </IconButton>
-
- {/* Breadcrumbs */}
- <Box sx={{ flex: 1 }}>
- {crumb && (
- <Breadcrumbs
- separator={<NavigateNext fontSize="small" sx={{ color: GREY[400] }} />}
- sx={{ '& .MuiBreadcrumbs-ol': { flexWrap: 'nowrap' } }}
- >
- <Link
- underline="hover"
- color="text.secondary"
- onClick={() => navigate('/')}
- sx={{ cursor: 'pointer', fontSize: '0.75rem', fontWeight: 500 }}
- >
- Dashboard
- </Link>
- {crumb.parent && (
- <Typography sx={{ fontSize: '0.75rem', color: 'text.secondary' }}>
- {crumb.parent}
- </Typography>
- )}
- <Typography sx={{ fontSize: '0.75rem', fontWeight: 600, color: 'text.primary' }}>
- {crumb.label}
- </Typography>
- </Breadcrumbs>
- )}
- </Box>
-
- {/* Right actions */}
- <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
- <Tooltip title="Refresh all accounts">
- <IconButton
- size="small"
- onClick={refreshAll}
- disabled={loading}
- sx={{
- color: loading ? PRIMARY.light : 'text.secondary',
- '&:hover': { bgcolor: GREY[100] },
- }}
- >
- <Refresh sx={{ fontSize: 20, ...(loading && { animation: 'spin 1s linear infinite' }) }} />
- </IconButton>
- </Tooltip>
- <Tooltip title="Settings">
- <IconButton
- size="small"
- onClick={() => navigate('/settings')}
- sx={{ color: 'text.secondary', '&:hover': { bgcolor: GREY[100] } }}
- >
- <Settings sx={{ fontSize: 20 }} />
- </IconButton>
- </Tooltip>
- <Avatar
- sx={{
- width: 32,
- height: 32,
- ml: 0.5,
- bgcolor: PRIMARY.main,
- fontSize: '0.8rem',
- fontWeight: 600,
- cursor: 'pointer',
- }}
- >
- T
- </Avatar>
- </Box>
- </Toolbar>
- <style>{`@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }`}</style>
- </AppBar>
- );
-}
diff --git a/frontend/src/layouts/Sidebar.jsx b/frontend/src/layouts/Sidebar.jsx
deleted file mode 100644
index 635a60c..0000000
--- a/frontend/src/layouts/Sidebar.jsx
+++ /dev/null
@@ -1,173 +0,0 @@
-import React from 'react';
-// React is used for React.cloneElement in NAV item icon rendering
-import {
- Drawer, Box, Typography, List, ListItemButton, ListItemIcon, ListItemText,
- Avatar, Divider, Chip,
-} from '@mui/material';
-import {
- Dashboard as DashboardIcon, YouTube as YouTubeIcon, ManageAccounts,
- Settings, PlaylistPlay, ContentCut, Instagram, CloudUpload,
-} from '@mui/icons-material';
-import Logo from '../components/ui/Logo';
-
-const DRAWER_WIDTH = 256;
-
-const NAV = [
- { id: 'overview', label: 'Overview', icon: <DashboardIcon /> },
- { id: 'videos', label: 'All Videos', icon: <PlaylistPlay /> },
- { id: 'shorts', label: 'All Shorts', icon: <ContentCut /> },
- { id: 'reels', label: 'IG Content', icon: <Instagram /> },
- { id: 'upload', label: 'Publish', icon: <CloudUpload /> },
- { id: 'accounts', label: 'Accounts', icon: <ManageAccounts /> },
- { id: 'settings', label: 'Settings', icon: <Settings /> },
-];
-
-export default function Sidebar({ tab, setTab, accounts, onViewChannel }) {
- return (
- <Drawer variant="permanent" sx={{
- width: DRAWER_WIDTH, flexShrink: 0,
- '& .MuiDrawer-paper': { width: DRAWER_WIDTH, boxSizing: 'border-box', overflowX: 'hidden' },
- }}>
- {/* Logo + Brand */}
- <Box sx={{ px: 2.5, pt: 2.5, pb: 2, display: 'flex', alignItems: 'center', gap: 1.5 }}>
- <Logo size={36} />
- <Typography sx={{ fontWeight: 800, fontSize: 15, letterSpacing: '-0.4px', color: 'text.primary' }}>
- Twiligent
- </Typography>
- </Box>
-
- <Divider sx={{ mx: 2, mb: 1 }} />
-
- {/* Navigation */}
- <Box sx={{ px: 1.5, py: 1 }}>
- <Typography sx={{ px: 1, mb: 1, fontSize: 10, fontWeight: 700, letterSpacing: '0.1em', textTransform: 'uppercase', color: 'text.secondary' }}>
- Menu
- </Typography>
- <List disablePadding sx={{ display: 'flex', flexDirection: 'column', gap: 0.3 }}>
- {NAV.map(item => {
- const active = tab === item.id;
- return (
- <ListItemButton
- key={item.id}
- selected={active}
- onClick={() => setTab(item.id)}
- sx={{
- borderRadius: 2, py: 1.1,
- background: active
- ? 'linear-gradient(135deg, rgba(255,0,0,0.18) 0%, rgba(255,68,68,0.08) 100%)'
- : 'transparent',
- border: active ? '1px solid rgba(255,0,0,0.2)' : '1px solid transparent',
- '&:hover': {
- background: active
- ? 'linear-gradient(135deg, rgba(255,0,0,0.22) 0%, rgba(255,68,68,0.12) 100%)'
- : 'rgba(255,255,255,0.04)',
- },
- transition: 'all 0.15s ease',
- }}>
- <ListItemIcon sx={{
- minWidth: 38,
- color: active ? '#FF4444' : '#64748B',
- transition: 'color 0.15s',
- }}>
- {React.cloneElement(item.icon, { sx: { fontSize: 20 } })}
- </ListItemIcon>
- <ListItemText
- primary={item.label}
- primaryTypographyProps={{
- fontSize: 13.5,
- fontWeight: active ? 700 : 500,
- color: active ? 'text.primary' : '#94A3B8',
- letterSpacing: '-0.01em',
- }}
- />
- {active && (
- <Box sx={{
- width: 6, height: 6, borderRadius: '50%',
- background: '#FF0000',
- boxShadow: '0 0 8px rgba(255,0,0,0.7)',
- }} />
- )}
- </ListItemButton>
- );
- })}
- </List>
- </Box>
-
- <Divider sx={{ mx: 2, my: 1.5 }} />
-
- {/* Accounts Quick Access */}
- <Box sx={{ px: 2, mb: 1 }}>
- <Typography sx={{ fontSize: 10, fontWeight: 700, letterSpacing: '0.1em', textTransform: 'uppercase', color: 'text.secondary' }}>
- Accounts
- </Typography>
- </Box>
-
- <List sx={{ px: 1.5, flex: 1, overflow: 'auto' }} disablePadding>
- {accounts.length === 0 ? (
- <Box sx={{ textAlign: 'center', py: 3, px: 2 }}>
- <Typography sx={{ fontSize: 12, color: 'text.secondary', lineHeight: 1.5 }}>
- No accounts added yet
- </Typography>
- </Box>
- ) : (
- accounts.map(acc => {
- const isIG = acc.platform === 'instagram';
- return (
- <ListItemButton
- key={acc.id}
- onClick={() => onViewChannel(acc)}
- sx={{
- borderRadius: 2, mb: 0.4, py: 0.9,
- '&:hover': { bgcolor: 'rgba(255,255,255,0.04)' },
- }}>
- <ListItemIcon sx={{ minWidth: 36 }}>
- <Box sx={{ position: 'relative' }}>
- <Avatar
- src={acc.thumbnail || acc.thumbnails?.default || acc.thumbnailUrl || acc.profilePictureUrl || ''}
- sx={{ width: 28, height: 28, border: 'none' }}>
- {isIG ? <Instagram sx={{ fontSize: 14 }} /> : <YouTubeIcon sx={{ fontSize: 14 }} />}
- </Avatar>
- <Box sx={{
- position: 'absolute', bottom: -2, right: -2,
- width: 12, height: 12, borderRadius: '50%',
- bgcolor: isIG ? '#E1306C' : '#FF0000',
- border: '1.5px solid #060910',
- display: 'flex', alignItems: 'center', justifyContent: 'center',
- }}>
- {isIG
- ? <Instagram sx={{ fontSize: 7, color: '#fff' }} />
- : <YouTubeIcon sx={{ fontSize: 7, color: '#fff' }} />}
- </Box>
- </Box>
- </ListItemIcon>
- <ListItemText
- primary={acc.title}
- primaryTypographyProps={{ fontSize: 12.5, fontWeight: 500, noWrap: true, color: '#CBD5E1' }}
- />
- </ListItemButton>
- );
- })
- )}
- </List>
-
- {/* Footer summary */}
- <Box sx={{ p: 2, pt: 1.5 }}>
- <Divider sx={{ mb: 1.5 }} />
- <Box sx={{ display: 'flex', gap: 1 }}>
- <Chip
- icon={<YouTubeIcon sx={{ fontSize: '14px !important' }} />}
- label={`${accounts.filter(a => a.platform !== 'instagram').length} YT`}
- size="small" variant="outlined"
- sx={{ flex: 1, justifyContent: 'flex-start', borderColor: 'rgba(255,0,0,0.25)', color: '#FF4444', fontSize: 11, fontWeight: 600 }}
- />
- <Chip
- icon={<Instagram sx={{ fontSize: '14px !important' }} />}
- label={`${accounts.filter(a => a.platform === 'instagram').length} IG`}
- size="small" variant="outlined"
- sx={{ flex: 1, justifyContent: 'flex-start', borderColor: 'rgba(225,48,108,0.25)', color: '#E1306C', fontSize: 11, fontWeight: 600 }}
- />
- </Box>
- </Box>
- </Drawer>
- );
-}
diff --git a/frontend/src/theme.js b/frontend/src/theme.js
deleted file mode 100644
index 91fe330..0000000
--- a/frontend/src/theme.js
+++ /dev/null
@@ -1,162 +0,0 @@
-import { createTheme } from '@mui/material/styles';
-
-const theme = createTheme({
- palette: {
- mode: 'dark',
- primary: { main: '#FF0000', light: '#FF4444', dark: '#CC0000' },
- secondary: { main: '#3EA6FF', light: '#6EC6FF', dark: '#0078D4' },
- background: { default: '#080B14', paper: '#0E1420' },
- success: { main: '#22C55E', light: '#4ADE80', dark: '#16A34A' },
- warning: { main: '#F59E0B', light: '#FCD34D' },
- error: { main: '#EF4444', light: '#F87171' },
- text: { primary: '#F1F5F9', secondary: '#94A3B8' },
- divider: 'rgba(255,255,255,0.07)',
- },
- typography: {
- fontFamily: '"Inter", "Roboto", "Helvetica", "Arial", sans-serif',
- h3: { fontWeight: 800, letterSpacing: '-0.03em' },
- h4: { fontWeight: 800, letterSpacing: '-0.02em' },
- h5: { fontWeight: 700, letterSpacing: '-0.01em' },
- h6: { fontWeight: 600, letterSpacing: '-0.01em' },
- subtitle1: { color: '#94A3B8', fontWeight: 500 },
- body2: { color: '#94A3B8' },
- caption: { color: '#64748B' },
- },
- shape: { borderRadius: 14 },
- components: {
- MuiCard: {
- styleOverrides: {
- root: {
- backgroundImage: 'none',
- backgroundColor: '#0E1420',
- border: '1px solid rgba(255,255,255,0.07)',
- boxShadow: '0 4px 24px rgba(0,0,0,0.4)',
- transition: 'border-color 0.2s, box-shadow 0.2s',
- '&:hover': {
- borderColor: 'rgba(255,255,255,0.13)',
- boxShadow: '0 8px 32px rgba(0,0,0,0.5)',
- },
- },
- },
- },
- MuiPaper: {
- styleOverrides: {
- root: { backgroundImage: 'none' },
- },
- },
- MuiButton: {
- styleOverrides: {
- root: {
- textTransform: 'none',
- fontWeight: 600,
- borderRadius: 10,
- letterSpacing: '-0.01em',
- },
- contained: {
- boxShadow: '0 4px 14px rgba(0,0,0,0.4)',
- '&:hover': { boxShadow: '0 6px 20px rgba(0,0,0,0.5)' },
- },
- },
- },
- MuiChip: {
- styleOverrides: {
- root: { fontWeight: 600, borderRadius: 8 },
- },
- },
- MuiDrawer: {
- styleOverrides: {
- paper: {
- backgroundColor: '#060910',
- borderRight: '1px solid rgba(255,255,255,0.06)',
- backgroundImage: 'none',
- },
- },
- },
- MuiTextField: {
- styleOverrides: {
- root: {
- '& .MuiOutlinedInput-root': {
- borderRadius: 10,
- backgroundColor: 'rgba(255,255,255,0.03)',
- '& fieldset': { borderColor: 'rgba(255,255,255,0.1)' },
- '&:hover fieldset': { borderColor: 'rgba(255,255,255,0.18)' },
- '&.Mui-focused fieldset': { borderColor: 'rgba(255,0,0,0.5)' },
- },
- },
- },
- },
- MuiDialog: {
- styleOverrides: {
- paper: {
- backgroundColor: '#0E1420',
- backgroundImage: 'none',
- borderRadius: 18,
- border: '1px solid rgba(255,255,255,0.08)',
- boxShadow: '0 25px 60px rgba(0,0,0,0.7)',
- },
- },
- },
- MuiTooltip: {
- styleOverrides: {
- tooltip: {
- backgroundColor: '#1E2A3A',
- border: '1px solid rgba(255,255,255,0.1)',
- fontSize: 12,
- fontWeight: 500,
- borderRadius: 8,
- padding: '6px 12px',
- },
- },
- },
- MuiLinearProgress: {
- styleOverrides: {
- root: { borderRadius: 6, height: 6, backgroundColor: 'rgba(255,255,255,0.06)' },
- },
- },
- MuiTableHead: {
- styleOverrides: {
- root: {
- '& .MuiTableCell-head': {
- backgroundColor: 'rgba(255,255,255,0.03)',
- color: '#64748B',
- fontWeight: 700,
- fontSize: 11,
- textTransform: 'uppercase',
- letterSpacing: '0.08em',
- borderBottom: '1px solid rgba(255,255,255,0.07)',
- },
- },
- },
- },
- MuiTableRow: {
- styleOverrides: {
- root: {
- '&:hover': { backgroundColor: 'rgba(255,255,255,0.025) !important' },
- '& .MuiTableCell-root': {
- borderBottom: '1px solid rgba(255,255,255,0.05)',
- color: '#CBD5E1',
- },
- },
- },
- },
- MuiDivider: {
- styleOverrides: {
- root: { borderColor: 'rgba(255,255,255,0.07)' },
- },
- },
- MuiListItemButton: {
- styleOverrides: {
- root: { borderRadius: 10, transition: 'all 0.15s ease' },
- },
- },
- MuiAvatar: {
- styleOverrides: {
- root: {
- border: '2px solid rgba(255,255,255,0.08)',
- },
- },
- },
- },
-});
-
-export default theme;
diff --git a/frontend/src/themes/index.jsx b/frontend/src/themes/index.jsx
deleted file mode 100644
index e69a92d..0000000
--- a/frontend/src/themes/index.jsx
+++ /dev/null
@@ -1,400 +0,0 @@
-import { createTheme, alpha } from '@mui/material/styles';
-
-// Mantis palette — Ant Design blue as primary
-const PRIMARY = {
- lighter: '#e6f4ff',
- 100: '#bae0ff',
- 200: '#91caff',
- light: '#69b1ff',
- 400: '#4096ff',
- main: '#1890ff',
- dark: '#096dd9',
- 700: '#0050b3',
- darker: '#003a8c',
- 900: '#002766',
- contrastText: '#fff',
-};
-
-const SECONDARY = {
- lighter: '#f9f0ff',
- light: '#d3adf7',
- main: '#722ed1',
- dark: '#531dab',
- darker: '#22075e',
- contrastText: '#fff',
-};
-
-const SUCCESS = {
- lighter: '#f6ffed',
- light: '#b7eb8f',
- main: '#52c41a',
- dark: '#389e0d',
- darker: '#135200',
- contrastText: '#fff',
-};
-
-const WARNING = {
- lighter: '#fffbe6',
- light: '#ffe58f',
- main: '#faad14',
- dark: '#d46b08',
- darker: '#613400',
- contrastText: '#212121',
-};
-
-const ERROR = {
- lighter: '#fff1f0',
- light: '#ffa39e',
- main: '#ff4d4f',
- dark: '#cf1322',
- darker: '#820014',
- contrastText: '#fff',
-};
-
-const INFO = {
- lighter: '#e6fffb',
- light: '#87e8de',
- main: '#13c2c2',
- dark: '#08979c',
- darker: '#006d75',
- contrastText: '#fff',
-};
-
-const GREY = {
- 0: '#ffffff',
- 50: '#fafafa',
- 100: '#f5f5f5',
- 200: '#f0f0f0',
- 300: '#d9d9d9',
- 400: '#bfbfbf',
- 500: '#8c8c8c',
- 600: '#595959',
- 700: '#262626',
- 800: '#141414',
- 900: '#000000',
- A50: '#fafafb',
- A100: '#fafafa',
- A200: '#bfbfbf',
- A400: '#434343',
- A700: '#1f1f1f',
- A800: '#e6ebf1',
-};
-
-const theme = createTheme({
- palette: {
- mode: 'light',
- primary: { ...PRIMARY },
- secondary: { ...SECONDARY },
- success: { ...SUCCESS },
- warning: { ...WARNING },
- error: { ...ERROR },
- info: { ...INFO },
- grey: GREY,
- text: {
- primary: GREY[700],
- secondary: GREY[500],
- disabled: GREY[400],
- },
- action: {
- disabled: GREY[300],
- },
- divider: GREY[200],
- background: {
- paper: GREY[0],
- default: GREY.A50,
- },
- },
- typography: {
- fontFamily: '"Inter", "Roboto", "Helvetica", "Arial", sans-serif',
- htmlFontSize: 16,
- fontWeightLight: 300,
- fontWeightRegular: 400,
- fontWeightMedium: 500,
- fontWeightBold: 600,
- h1: { fontWeight: 600, fontSize: '2.375rem', lineHeight: 1.21 },
- h2: { fontWeight: 600, fontSize: '1.875rem', lineHeight: 1.27 },
- h3: { fontWeight: 600, fontSize: '1.5rem', lineHeight: 1.33 },
- h4: { fontWeight: 600, fontSize: '1.25rem', lineHeight: 1.4 },
- h5: { fontWeight: 600, fontSize: '1rem', lineHeight: 1.5 },
- h6: { fontWeight: 400, fontSize: '0.875rem', lineHeight: 1.57 },
- body1: { fontSize: '0.875rem', lineHeight: 1.57 },
- body2: { fontSize: '0.75rem', lineHeight: 1.66 },
- subtitle1: { fontSize: '0.875rem', fontWeight: 600, lineHeight: 1.57 },
- subtitle2: { fontSize: '0.75rem', fontWeight: 500, lineHeight: 1.66 },
- caption: { fontSize: '0.75rem', lineHeight: 1.66 },
- overline: { lineHeight: 2.66 },
- button: { textTransform: 'capitalize' },
- },
- shape: { borderRadius: 8 },
- breakpoints: {
- values: { xs: 0, sm: 768, md: 1024, lg: 1266, xl: 1440 },
- },
- mixins: {
- toolbar: { minHeight: 60, paddingTop: 8, paddingBottom: 8 },
- },
- components: {
- MuiCssBaseline: {
- styleOverrides: {
- body: { fontFamily: '"Inter", "Roboto", "Helvetica", "Arial", sans-serif' },
- '*::-webkit-scrollbar': { width: 6, height: 6 },
- '*::-webkit-scrollbar-track': { background: GREY[100] },
- '*::-webkit-scrollbar-thumb': { background: GREY[300], borderRadius: 3 },
- },
- },
- MuiCard: {
- defaultProps: { elevation: 0 },
- styleOverrides: {
- root: {
- borderRadius: 8,
- border: `1px solid ${GREY.A800}`,
- boxShadow: 'none',
- },
- },
- },
- MuiCardContent: {
- styleOverrides: {
- root: { padding: 20, '&:last-child': { paddingBottom: 20 } },
- },
- },
- MuiCardHeader: {
- styleOverrides: {
- root: { padding: '20px 20px 0' },
- title: { fontSize: '0.875rem', fontWeight: 600 },
- },
- },
- MuiPaper: {
- defaultProps: { elevation: 0 },
- styleOverrides: {
- root: { backgroundImage: 'none' },
- rounded: { borderRadius: 8 },
- outlined: { borderColor: GREY.A800 },
- },
- },
- MuiButton: {
- defaultProps: { disableElevation: true },
- styleOverrides: {
- root: { fontWeight: 500, textTransform: 'capitalize', borderRadius: 8 },
- contained: { '&:hover': { boxShadow: 'none' } },
- sizeLarge: { padding: '8px 22px' },
- sizeMedium: { padding: '6px 16px' },
- sizeSmall: { padding: '4px 10px' },
- },
- },
- MuiIconButton: {
- styleOverrides: {
- root: { borderRadius: 8 },
- sizeSmall: { padding: 4 },
- },
- },
- MuiChip: {
- styleOverrides: {
- root: { borderRadius: 4, fontWeight: 500, '&.MuiChip-light': { color: PRIMARY.main, background: PRIMARY.lighter } },
- },
- },
- MuiDrawer: {
- styleOverrides: {
- paper: {
- backgroundColor: GREY[0],
- borderRight: `1px solid ${GREY.A800}`,
- backgroundImage: 'none',
- },
- },
- },
- MuiAppBar: {
- defaultProps: { elevation: 0, color: 'inherit' },
- styleOverrides: {
- root: {
- borderBottom: `1px solid ${GREY.A800}`,
- backgroundColor: GREY[0],
- backgroundImage: 'none',
- },
- },
- },
- MuiListItemButton: {
- styleOverrides: {
- root: {
- borderRadius: 8,
- '&.Mui-selected': {
- backgroundColor: PRIMARY.lighter,
- color: PRIMARY.main,
- '&:hover': { backgroundColor: alpha(PRIMARY.lighter, 0.9) },
- '& .MuiListItemIcon-root': { color: PRIMARY.main },
- },
- '&:hover': { backgroundColor: alpha(PRIMARY.main, 0.04) },
- },
- },
- },
- MuiListItemIcon: {
- styleOverrides: {
- root: { minWidth: 36, color: GREY[600] },
- },
- },
- MuiTextField: {
- styleOverrides: {
- root: {
- '& .MuiOutlinedInput-root': {
- borderRadius: 8,
- '& fieldset': { borderColor: GREY.A800 },
- '&:hover fieldset': { borderColor: PRIMARY.light },
- '&.Mui-focused fieldset': { borderColor: PRIMARY.main },
- },
- },
- },
- },
- MuiOutlinedInput: {
- styleOverrides: {
- root: { borderRadius: 8 },
- input: { padding: '10.5px 14px' },
- notchedOutline: { borderColor: GREY.A800 },
- },
- },
- MuiSelect: {
- styleOverrides: {
- select: { padding: '10.5px 14px' },
- },
- },
- MuiDivider: {
- styleOverrides: {
- root: { borderColor: GREY.A800 },
- },
- },
- MuiTableHead: {
- styleOverrides: {
- root: {
- background: GREY.A50,
- '& .MuiTableCell-root': {
- color: GREY[700],
- fontWeight: 600,
- fontSize: '0.75rem',
- textTransform: 'uppercase',
- letterSpacing: '0.04em',
- borderBottom: `1px solid ${GREY.A800}`,
- padding: '10px 16px',
- },
- },
- },
- },
- MuiTableCell: {
- styleOverrides: {
- root: {
- borderBottom: `1px solid ${GREY.A800}`,
- padding: '12px 16px',
- fontSize: '0.875rem',
- },
- },
- },
- MuiTableRow: {
- styleOverrides: {
- root: {
- '&:last-of-type td': { borderBottom: 'none' },
- '&:hover': { backgroundColor: alpha(PRIMARY.main, 0.03) },
- },
- },
- },
- MuiTab: {
- styleOverrides: {
- root: {
- textTransform: 'capitalize',
- minHeight: 46,
- fontWeight: 500,
- fontSize: '0.875rem',
- '&.Mui-selected': { fontWeight: 600, color: PRIMARY.main },
- },
- },
- },
- MuiTabs: {
- styleOverrides: {
- indicator: { height: 2, borderRadius: '2px 2px 0 0' },
- },
- },
- MuiTooltip: {
- styleOverrides: {
- tooltip: {
- backgroundColor: GREY[700],
- fontSize: '0.75rem',
- borderRadius: 6,
- padding: '6px 12px',
- },
- arrow: { color: GREY[700] },
- },
- },
- MuiDialog: {
- styleOverrides: {
- paper: { borderRadius: 8, boxShadow: '0 20px 60px rgba(0,0,0,0.15)' },
- },
- },
- MuiDialogTitle: {
- styleOverrides: {
- root: { padding: '20px 24px', fontSize: '1.125rem', fontWeight: 600 },
- },
- },
- MuiDialogContent: {
- styleOverrides: {
- root: { padding: '16px 24px' },
- },
- },
- MuiDialogActions: {
- styleOverrides: {
- root: { padding: '12px 20px' },
- },
- },
- MuiLinearProgress: {
- styleOverrides: {
- root: { height: 6, borderRadius: 3, backgroundColor: GREY[200] },
- bar: { borderRadius: 3 },
- },
- },
- MuiAvatar: {
- styleOverrides: {
- root: {
- width: 36,
- height: 36,
- fontSize: '0.875rem',
- background: PRIMARY.lighter,
- color: PRIMARY.main,
- },
- },
- },
- MuiBreadcrumbs: {
- styleOverrides: {
- separator: { color: GREY[400] },
- },
- },
- MuiAlert: {
- styleOverrides: {
- root: { borderRadius: 8 },
- standardSuccess: { background: SUCCESS.lighter, color: SUCCESS.darker, '& .MuiAlert-icon': { color: SUCCESS.main } },
- standardWarning: { background: WARNING.lighter, color: WARNING.darker, '& .MuiAlert-icon': { color: WARNING.main } },
- standardError: { background: ERROR.lighter, color: ERROR.darker, '& .MuiAlert-icon': { color: ERROR.main } },
- standardInfo: { background: INFO.lighter, color: INFO.darker, '& .MuiAlert-icon': { color: INFO.main } },
- },
- },
- MuiMenuItem: {
- styleOverrides: {
- root: { borderRadius: 4, margin: '0 4px', padding: '6px 12px', fontSize: '0.875rem' },
- },
- },
- MuiInputLabel: {
- styleOverrides: {
- root: { fontSize: '0.875rem', fontWeight: 500 },
- },
- },
- MuiFormHelperText: {
- styleOverrides: {
- root: { marginLeft: 0, fontSize: '0.75rem' },
- },
- },
- MuiBadge: {
- styleOverrides: {
- standard: { minWidth: 18, height: 18, fontSize: '0.65rem' },
- },
- },
- },
-});
-
-// Expose custom color tokens for use in components
-theme.palette.primary = { ...theme.palette.primary, ...PRIMARY };
-theme.palette.grey = { ...theme.palette.grey, ...GREY };
-
-export { PRIMARY, SECONDARY, SUCCESS, WARNING, ERROR, INFO, GREY };
-export default theme;