Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Home() {

// Log ENVIRONMENT from server
useEffect(() => {
fetch('/agents/lit-matrix/api/env')
fetch('/agents/literature-matrix/api/env')
.then((r) => r.json())
.then((d) => console.log(`ENVIRONMENT=${d.ENVIRONMENT}`))
.catch(() => {})
Expand Down Expand Up @@ -70,31 +70,31 @@ export default function Home() {
const hasResults = sessionId && papers.length > 0

return (
<main className="min-h-screen bg-[#f0f2f5]">
<main className="bg-[#f0f2f5] min-h-screen">
{/* Test environment banner */}
{process.env.NEXT_PUBLIC_ENV !== 'production' && (
<div className="bg-red-600 text-white text-center py-1 text-xs font-bold tracking-widest">
<div className="bg-red-600 py-1 font-bold text-white text-xs text-center tracking-widest">
TEST ENVIRONMENT
</div>
)}
{/* Top bar */}
<div className="bg-gradient-to-r from-indigo-600 via-blue-600 to-cyan-500">
<div className="max-w-[1600px] mx-auto px-4 py-4 sm:px-8 sm:py-6">
<div className="flex items-start justify-between mb-3 sm:mb-4">
<div className="mx-auto px-4 sm:px-8 py-4 sm:py-6 max-w-[1600px]">
<div className="flex justify-between items-start mb-3 sm:mb-4">
<button
onClick={handleLogoClick}
className="flex items-center gap-3 cursor-pointer group"
className="group flex items-center gap-3 cursor-pointer"
>
<div className="w-8 h-8 sm:w-10 sm:h-10 rounded-xl bg-white/20 backdrop-blur flex items-center justify-center group-hover:bg-white/30 transition-colors">
<svg className="w-5 h-5 sm:w-6 sm:h-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<div className="flex justify-center items-center bg-white/20 group-hover:bg-white/30 backdrop-blur rounded-xl w-8 sm:w-10 h-8 sm:h-10 transition-colors">
<svg className="w-5 sm:w-6 h-5 sm:h-6 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2" />
</svg>
</div>
<div className="text-left">
<h1 className="text-lg sm:text-2xl font-bold text-white tracking-tight">
<h1 className="font-bold text-white text-lg sm:text-2xl tracking-tight">
{t('appTitle')}
</h1>
<p className="text-blue-100 text-[11px] sm:text-xs hidden sm:block">
<p className="hidden sm:block text-[11px] text-blue-100 sm:text-xs">
{t('appSubtitle')}
</p>
</div>
Expand All @@ -106,32 +106,32 @@ export default function Home() {
</div>

{/* Content */}
<div className="max-w-[1600px] mx-auto px-3 py-4 sm:px-8 sm:py-6">
<div className="mx-auto px-3 sm:px-8 py-4 sm:py-6 max-w-[1600px]">
{/* Matrix Table */}
{hasResults && (
<div className="bg-white rounded-xl shadow-sm ring-1 ring-black/5 p-3 sm:p-5">
<div className="bg-white shadow-sm p-3 sm:p-5 rounded-xl ring-1 ring-black/5">
<MatrixTable />
</div>
)}

{/* Empty State */}
{!hasResults && (
<div className="mt-4 sm:mt-10 flex flex-col items-center text-center px-4">
<div className="w-20 h-20 sm:w-28 sm:h-28 rounded-full bg-gradient-to-br from-blue-50 to-indigo-100 flex items-center justify-center mb-5 sm:mb-6">
<svg className="w-10 h-10 sm:w-14 sm:h-14 text-indigo-300" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<div className="flex flex-col items-center mt-4 sm:mt-10 px-4 text-center">
<div className="flex justify-center items-center bg-gradient-to-br from-blue-50 to-indigo-100 mb-5 sm:mb-6 rounded-full w-20 sm:w-28 h-20 sm:h-28">
<svg className="w-10 sm:w-14 h-10 sm:h-14 text-indigo-300" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.2} d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253" />
</svg>
</div>
<h3 className="text-lg sm:text-xl font-semibold text-gray-800 mb-2">
<h3 className="mb-2 font-semibold text-gray-800 text-lg sm:text-xl">
{t('emptyTitle')}
</h3>
<p className="text-gray-400 text-sm max-w-lg leading-relaxed">
<p className="max-w-lg text-gray-400 text-sm leading-relaxed">
{t('emptyDescription')}
</p>
<div className="mt-6 sm:mt-8 flex justify-center">
<div className="flex justify-center mt-6 sm:mt-8">
<button
onClick={() => searchBarRef.current?.typewrite('Find a paper using a distillation method to train models', { onboarding: true })}
className="px-3 py-1.5 bg-white rounded-full text-xs text-gray-500 shadow-sm ring-1 ring-gray-200/60 hover:ring-indigo-300 hover:text-indigo-600 hover:shadow-md active:scale-95 transition-all cursor-pointer"
className="bg-white shadow-sm hover:shadow-md px-3 py-1.5 rounded-full ring-1 ring-gray-200/60 hover:ring-indigo-300 text-gray-500 hover:text-indigo-600 text-xs active:scale-95 transition-all cursor-pointer"
>
Find a paper using a distillation method to train models
</button>
Expand Down
2 changes: 1 addition & 1 deletion lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* API utility functions
*/

const API_BASE_URL = '/agents/lit-matrix/api/v1'
const API_BASE_URL = '/agents/literature-matrix/api/v1'

export function getApiUrl(path: string): string {
return `${API_BASE_URL}${path}`
Expand Down
8 changes: 4 additions & 4 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server {
absolute_redirect off;

# All traffic goes to Next.js (includes both pages and API routes)
location /agents/lit-matrix/ {
location /agents/literature-matrix/ {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
Expand All @@ -19,7 +19,7 @@ server {
}

# Next.js static assets
location /agents/lit-matrix/_next/ {
location /agents/literature-matrix/_next/ {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Host $host;
Expand All @@ -34,12 +34,12 @@ server {

# Health check via Next.js API route
location /health {
proxy_pass http://127.0.0.1:3000/agents/lit-matrix/api/v1;
proxy_pass http://127.0.0.1:3000/agents/literature-matrix/api/v1;
proxy_http_version 1.1;
}

# Root -> redirect to app
location = / {
return 302 /agents/lit-matrix/;
return 302 /agents/literature-matrix/;
}
}