diff --git a/docker-compose.yml b/docker-compose.yml index 3304a94..41dbf18 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - .env environment: - PRODUCTION=0 - - MODEL_NAME=${MODEL_NAME:-qwen2.5:3b} + - MODEL_NAME=${MODEL_NAME:-qwen2.5:7b} devices: - /dev/dri:/dev/dri depends_on: diff --git a/frontend/src/NewApp/BackstoryApp.css b/frontend/src/NewApp/BackstoryApp.css index 8f0ac56..c4c3a90 100644 --- a/frontend/src/NewApp/BackstoryApp.css +++ b/frontend/src/NewApp/BackstoryApp.css @@ -138,7 +138,7 @@ button { flex-grow: 0; } -.About.MuiCard-root, +.Docs.MuiCard-root, .assistant-message.MuiCard-root { border: 1px solid #E0E0E0; background-color: #FFFFFF; @@ -159,7 +159,7 @@ button { } -.About.MuiCard-root { +.Docs.MuiCard-root { display: flex; flex-grow: 1; width: 100%; @@ -167,20 +167,20 @@ button { margin-right: 0; } -.About .MuiCardContent-root, +.Docs .MuiCardContent-root, .assistant-message .MuiCardContent-root { padding: 0 16px !important; font-size: 0.9rem; } -.About span, +.Docs span, .assistant-message span { font-size: 0.9rem; } .user-message .MuiCardContent-root:last-child, .assistant-message .MuiCardContent-root:last-child, -.About .MuiCardContent-root:last-child { +.Docs .MuiCardContent-root:last-child { padding: 16px; } diff --git a/frontend/src/NewApp/BackstoryApp.tsx b/frontend/src/NewApp/BackstoryApp.tsx index f9a2c65..c8bfc66 100644 --- a/frontend/src/NewApp/BackstoryApp.tsx +++ b/frontend/src/NewApp/BackstoryApp.tsx @@ -24,14 +24,13 @@ import { Scrollable } from '../Components/Scrollable'; import { Footer } from './Components/Footer'; import { Snack, SeverityType } from '../Components/Snack'; import { Query } from '../Components/ChatQuery'; -import { ConversationHandle } from '../Components/Conversation'; - +import { ConversationHandle } from './Components/Conversation'; import { HomePage } from './Pages/HomePage'; import { ChatPage } from './Pages/ChatPage'; import { ResumeBuilderPage } from '../Pages/ResumeBuilderPage'; // import { BackstoryThemeVisualizer } from './BackstoryThemeVisualizer'; -import { AboutPage } from './Pages/AboutPage'; +import { DocsPage } from './Pages/DocsPage'; import { BetaPage } from './Pages/BetaPage'; import { CreateProfilePage } from './Pages/CreateProfilePage'; import { VectorVisualizerPage } from 'Pages/VectorVisualizerPage'; @@ -54,8 +53,8 @@ type NavigationLinkType = { const DefaultNavItems : NavigationLinkType[] = [ { name: 'Chat', path: '/chat', icon: }, { name: 'Resume Builder', path: '/resume-builder', icon: }, - { name: 'RAG Visualizer', path: '/rag-visualizer', icon: }, - { name: 'About', path: '/about', icon: }, + { name: 'Knowledge Explorer', path: '/knowledge-explorer', icon: }, + { name: 'Docs', path: '/docs', icon: }, // { name: 'How It Works', path: '/how-it-works', icon: }, // { name: 'For Candidates', path: '/for-candidates', icon: }, // { name: 'For Employers', path: '/for-employers', icon: }, @@ -286,10 +285,10 @@ const BackstoryApp = () => { {sessionId !== undefined && } /> - } /> - } /> + } /> + } /> } /> - } /> + } /> } /> } /> } /> @@ -330,13 +329,6 @@ const BackstoryApp = () => { }; -const App = () => { - return ( - - ); -}; - - export type { UserContext, NavigationLinkType diff --git a/frontend/src/NewApp/Components/Beta.css b/frontend/src/NewApp/Components/Beta.css index 1f95fe2..6faa7ae 100644 --- a/frontend/src/NewApp/Components/Beta.css +++ b/frontend/src/NewApp/Components/Beta.css @@ -5,10 +5,9 @@ .beta-clipper { position: absolute; top: 0; - left: -5px; width: 100%; height: 72px; - overflow: hidden; + overflow: visible; pointer-events: none; z-index: 1101; cursor: pointer; @@ -31,7 +30,7 @@ } .beta-label { - width: 200px; + width: 300px; position: absolute; display: flex; justify-content: center; diff --git a/frontend/src/NewApp/Components/Beta.tsx b/frontend/src/NewApp/Components/Beta.tsx index 80bf22e..35a27d9 100644 --- a/frontend/src/NewApp/Components/Beta.tsx +++ b/frontend/src/NewApp/Components/Beta.tsx @@ -1,16 +1,18 @@ import React, { useEffect, useRef, useState } from 'react'; import Box from '@mui/material/Box'; import useMediaQuery from '@mui/material/useMediaQuery'; -import { useTheme } from '@mui/material/styles'; +import { SxProps, useTheme } from '@mui/material/styles'; import './Beta.css'; type BetaProps = { + adaptive?: boolean; onClick?: (event?: React.MouseEvent) => void; + sx?: SxProps; } const Beta: React.FC = (props : BetaProps) => { - const { onClick } = props; + const { onClick, adaptive = true, sx = {} } = props; const betaRef = useRef(null); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('md')); @@ -36,8 +38,8 @@ const Beta: React.FC = (props : BetaProps) => { }; return ( - { onClick && onClick(e);}}> - + { onClick && onClick(e); }}> + BETA diff --git a/frontend/src/NewApp/Components/CandidateInfo.tsx b/frontend/src/NewApp/Components/CandidateInfo.tsx index 799642c..945167e 100644 --- a/frontend/src/NewApp/Components/CandidateInfo.tsx +++ b/frontend/src/NewApp/Components/CandidateInfo.tsx @@ -63,7 +63,7 @@ const CandidateInfo: React.FC = ({ userInfo }) => { {userInfo.full_name} navigate('/rag-visualizer')} + onClick={() => navigate('/knowledge-explorer')} label={formatRagSize(userInfo.rag_content_size)} color="primary" size="small" diff --git a/frontend/src/NewApp/Components/Document.tsx b/frontend/src/NewApp/Components/Document.tsx index bdca07a..5a84c73 100644 --- a/frontend/src/NewApp/Components/Document.tsx +++ b/frontend/src/NewApp/Components/Document.tsx @@ -39,7 +39,7 @@ const Document = (props: DocumentProps) => { const data = await response.text(); setDocument(data); } catch (error: any) { - console.error('Error obtaining About content information:', error); + console.error('Error obtaining Docs content information:', error); setDocument(`${filepath} not found.`); }; }; diff --git a/frontend/src/NewApp/Components/Header.tsx b/frontend/src/NewApp/Components/Header.tsx index 5e383f5..0fb0923 100644 --- a/frontend/src/NewApp/Components/Header.tsx +++ b/frontend/src/NewApp/Components/Header.tsx @@ -375,6 +375,7 @@ const Header: React.FC = ({ position="fixed" transparent={transparent} className={className} + sx={{ overflow: "hidden" }} > @@ -415,8 +416,8 @@ const Header: React.FC = ({ - - {navigate('/about/beta');}}/> + { navigate('/docs/beta'); }} /> + ); }; diff --git a/frontend/src/NewApp/Pages/AboutPage.tsx b/frontend/src/NewApp/Pages/AboutPage.tsx deleted file mode 100644 index 00ccbc0..0000000 --- a/frontend/src/NewApp/Pages/AboutPage.tsx +++ /dev/null @@ -1,422 +0,0 @@ -import React, { useState, useEffect } from 'react'; -import { useNavigate, useLocation, useParams } from 'react-router-dom'; -import { - Box, - Drawer, - AppBar, - Toolbar, - IconButton, - Typography, - List, - ListItem, - ListItemButton, - ListItemIcon, - ListItemText, - Paper, - Grid, - Card, - CardContent, - CardActionArea, - Divider, - useTheme, - useMediaQuery -} from '@mui/material'; -import MenuIcon from '@mui/icons-material/Menu'; -import CloseIcon from '@mui/icons-material/Close'; -import DescriptionIcon from '@mui/icons-material/Description'; -import CodeIcon from '@mui/icons-material/Code'; -import LayersIcon from '@mui/icons-material/Layers'; -import DashboardIcon from '@mui/icons-material/Dashboard'; -import PaletteIcon from '@mui/icons-material/Palette'; -import AnalyticsIcon from '@mui/icons-material/Analytics'; -import ViewQuiltIcon from '@mui/icons-material/ViewQuilt'; - -import { Document } from '../Components/Document'; -import { BackstoryPageProps } from '../../Components/BackstoryTab'; -import { BackstoryUIOverviewPage } from './BackstoryUIOverviewPage'; -import { BackstoryAppAnalysisPage } from './BackstoryAppAnalysisPage'; -import { BackstoryThemeVisualizerPage } from './BackstoryThemeVisualizerPage'; -import { MockupPage } from './MockupPage'; - -// Get appropriate icon for document type -const getDocumentIcon = (title: string) => { - switch (title) { - case 'About': - return ; - case 'BETA': - return ; - case 'Resume Generation Architecture': - case 'Application Architecture': - return ; - case 'UI Overview': - case 'UI Mockup': - return ; - case 'Theme Visualizer': - return ; - case 'App Analysis': - return ; - default: - return ; - } -}; - -// Sidebar navigation component using MUI components -const Sidebar: React.FC<{ - currentPage: string; - onDocumentSelect: (docName: string, open: boolean) => void; - onClose?: () => void; - isMobile: boolean; -}> = ({ currentPage, onDocumentSelect, onClose, isMobile }) => { - // Document definitions - const documents = [ - { title: "About", route: "about" }, - { title: "BETA", route: "beta" }, - { title: "Resume Generation Architecture", route: "resume-generation" }, - { title: "Application Architecture", route: "about-app" }, - { title: "UI Overview", route: "ui-overview" }, - { title: "Theme Visualizer", route: "theme-visualizer" }, - { title: "App Analysis", route: "app-analysis" }, - { title: "UI Mockup", route: "ui-mockup" } - ]; - - const handleItemClick = (route: string) => { - onDocumentSelect(route, true); - if (isMobile && onClose) { - onClose(); - } - }; - - return ( - - - - Documentation - - {isMobile && onClose && ( - - - - )} - - - - - {documents.map((doc, index) => ( - - handleItemClick(doc.route)} - selected={currentPage === doc.route} - sx={{ - borderRadius: 1, - mb: 0.5 - }} - > - - {getDocumentIcon(doc.title)} - - - - - ))} - - - - ); -}; - -// AboutPage main component -const AboutPage = (props: BackstoryPageProps) => { - const { sessionId, submitQuery, setSnack } = props; - const navigate = useNavigate(); - const location = useLocation(); - const { paramPage = '' } = useParams(); - const [page, setPage] = useState(paramPage); - const [drawerOpen, setDrawerOpen] = useState(false); - - const theme = useTheme(); - const isMobile = useMediaQuery(theme.breakpoints.down('md')); - - // Track location changes - useEffect(() => { - const parts = location.pathname.split('/'); - if (parts.length > 2) { - setPage(parts[2]); - } else { - setPage(''); - } - }, [location]); - - // Close drawer when changing to desktop view - useEffect(() => { - if (!isMobile) { - setDrawerOpen(false); - } - }, [isMobile]); - - // Handle document navigation - const onDocumentExpand = (docName: string, open: boolean) => { - console.log("Document expanded:", { docName, open, location }); - if (open) { - const parts = location.pathname.split('/'); - if (parts.length > 2) { - const basePath = parts.slice(0, -1).join('/'); - navigate(`${basePath}/${docName}`); - } else { - navigate(docName); - } - } else { - const basePath = location.pathname.split('/').slice(0, -1).join('/'); - navigate(`${basePath}`); - } - }; - - // Toggle mobile drawer - const toggleDrawer = () => { - setDrawerOpen(!drawerOpen); - }; - - // Close the drawer - const closeDrawer = () => { - setDrawerOpen(false); - }; - - // Helper function to get document title from route - function documentTitleFromRoute(route: string): string { - const titles: Record = { - 'about': 'About', - 'beta': 'BETA', - 'resume-generation': 'Resume Generation Architecture', - 'about-app': 'Application Architecture', - 'ui-overview': 'UI Overview', - 'theme-visualizer': 'Theme Visualizer', - 'app-analysis': 'App Analysis', - 'ui-mockup': 'UI Mockup' - }; - - return titles[route] || 'Documentation'; - } - - interface DocViewProps { - page: string - }; - const DocView = (props: DocViewProps) => { - const { page } = props; - const title = documentTitleFromRoute(page); - const icon = getDocumentIcon(title); - - return ( - - - - {icon} - {title} - - - - - ); - }; - - // Render the appropriate content based on current page - function renderContent() { - switch (page) { - case 'about': - return - case 'beta': - return - case 'resume-generation': - return - case 'about-app': - return - case 'ui-overview': - return (); - case 'theme-visualizer': - return (); - case 'app-analysis': - return (); - case 'ui-mockup': - return (); - default: - // Document grid for landing page - return ( - - - Documentation - - - Select a document from the sidebar to view detailed technical information about the application. - - - - {[ - { title: "About", route: "about", description: "General information about the application and its purpose" }, - { title: "BETA", route: "beta", description: "Details about the current beta version and upcoming features" }, - { title: "Resume Generation Architecture", route: "resume-generation", description: "Technical overview of how resumes are processed and generated" }, - { title: "Application Architecture", route: "about-app", description: "System design and technical stack information" }, - { title: "UI Overview", route: "ui-overview", description: "Guide to the user interface components and interactions" }, - { title: "Theme Visualizer", route: "theme-visualizer", description: "Explore and customize application themes and visual styles" }, - { title: "App Analysis", route: "app-analysis", description: "Statistics and performance metrics of the application" }, - { title: "UI Mockup", route: "ui-mockup", description: "Visual previews of interfaces and layout concepts" } - ].map((doc, index) => ( - - - onDocumentExpand(doc.route, true)}> - - - - {getDocumentIcon(doc.title)} - - {doc.title} - - - {doc.description} - - - - - - ))} - - - ); - } - } - - // Calculate drawer width - const drawerWidth = 240; - - return ( - - {/* Mobile App Bar */} - {isMobile && ( - - - - - - - {page ? documentTitleFromRoute(page) : "Documentation"} - - - - )} - - {/* Navigation drawer */} - - {/* Mobile drawer (temporary) */} - {isMobile ? ( - - - - ) : ( - // Desktop drawer (permanent) - - - - )} - - - {/* Main content */} - - {renderContent()} - - - ); -}; - -export { AboutPage }; \ No newline at end of file diff --git a/frontend/src/NewApp/Pages/BackstoryAppAnalysisPage.tsx b/frontend/src/NewApp/Pages/BackstoryAppAnalysisPage.tsx index ff2a31f..02d9c70 100644 --- a/frontend/src/NewApp/Pages/BackstoryAppAnalysisPage.tsx +++ b/frontend/src/NewApp/Pages/BackstoryAppAnalysisPage.tsx @@ -122,7 +122,7 @@ const BackstoryAppAnalysisPage = () => {
  • - Public Navigation - Home, About, Pricing, Login/Register accessible to all users + Public Navigation - Home, Docs, Pricing, Login/Register accessible to all users
  • diff --git a/frontend/src/NewApp/Pages/BackstoryUIOverviewPage.tsx b/frontend/src/NewApp/Pages/BackstoryUIOverviewPage.tsx index 7bd706a..acab05b 100644 --- a/frontend/src/NewApp/Pages/BackstoryUIOverviewPage.tsx +++ b/frontend/src/NewApp/Pages/BackstoryUIOverviewPage.tsx @@ -137,7 +137,7 @@ const BackstoryUIOverviewPage: React.FC = () => { }, { title: 'Public Navigation', - items: ['Home', 'About', 'Pricing', 'Login', 'Register'], + items: ['Home', 'Docs', 'Pricing', 'Login', 'Register'], color: 'custom.highlight', borderColor: 'custom.highlight' } diff --git a/frontend/src/NewApp/Pages/BetaPage.tsx b/frontend/src/NewApp/Pages/BetaPage.tsx index 42bca0d..150ecb6 100644 --- a/frontend/src/NewApp/Pages/BetaPage.tsx +++ b/frontend/src/NewApp/Pages/BetaPage.tsx @@ -14,7 +14,7 @@ import { import { useTheme } from '@mui/material/styles'; import ConstructionIcon from '@mui/icons-material/Construction'; import RocketLaunchIcon from '@mui/icons-material/RocketLaunch'; -import { Navigate } from 'react-router-dom'; +import { Beta } from '../Components/Beta'; interface BetaPageProps { children?: React.ReactNode; @@ -187,6 +187,7 @@ export const BetaPage: React.FC = ({ Check back soon for updates. + div": { paddingRight: "30px", background: "gold", color: "#808080" } }} onClick={() => { navigate('/docs/beta'); }} /> )} diff --git a/frontend/src/NewApp/Pages/ChatPage.tsx b/frontend/src/NewApp/Pages/ChatPage.tsx index 1471f6b..3b954a5 100644 --- a/frontend/src/NewApp/Pages/ChatPage.tsx +++ b/frontend/src/NewApp/Pages/ChatPage.tsx @@ -5,7 +5,7 @@ import { useTheme } from '@mui/material/styles'; import MuiMarkdown from 'mui-markdown'; import { BackstoryPageProps } from '../../Components//BackstoryTab'; -import { Conversation, ConversationHandle } from '../../Components/Conversation'; +import { Conversation, ConversationHandle } from '../Components/Conversation'; import { ChatQuery, Tunables } from '../../Components/ChatQuery'; import { MessageList } from '../../Components/Message'; import { CandidateInfo, UserInfo } from 'NewApp/Components/CandidateInfo'; @@ -16,8 +16,7 @@ import { Typography } from '@mui/material'; const ChatPage = forwardRef((props: BackstoryPageProps, ref) => { const { sessionId, setSnack, submitQuery } = props; const theme = useTheme(); - const isMobile = useMediaQuery(theme.breakpoints.down('md')); - const [preamble, setPreamble] = useState([]); + const isMobile = useMediaQuery(theme.breakpoints.down('md')); const [questions, setQuestions] = useState([]); const [user, setUser] = useState(undefined) @@ -26,14 +25,6 @@ const ChatPage = forwardRef((props: Back return; } - setPreamble([{ - role: 'system', - disableCopy: true, - content: ` -What would you like to know about ${user.first_name}? -`, - }]); - setQuestions([ {user.questions.map(({ question, tunables }, i: number) => @@ -94,7 +85,6 @@ What would you like to know about ${user.first_name}? resetLabel: "chat", sessionId, setSnack, - // preamble: preamble, defaultPrompts: questions, submitQuery, }} />