- Backend: Spring Boot 3 + WebFlux, JWT auth, Oracle ADB wallet, 8 controllers/services/repositories (Auth~Tag), DTOs, exception handling - Frontend: Next.js 15, TypeScript, Tailwind CSS, AuthContext, 7 pages (dashboard, knowledge, chat, study, todos, habits, login) - DB: V1 migration with 12 tables including VECTOR(1024) + HNSW index - Ops: PM2 ecosystem config, deploy.sh, start-backend.sh - CLAUDE.md: DB credentials replaced with env var references Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
584 B
TypeScript
23 lines
584 B
TypeScript
"use client";
|
|
|
|
import { useEffect } from "react";
|
|
import { useRouter } from "next/navigation";
|
|
import { useAuth } from "@/lib/auth-context";
|
|
|
|
export default function Home() {
|
|
const router = useRouter();
|
|
const { isAuthenticated, isLoading } = useAuth();
|
|
|
|
useEffect(() => {
|
|
if (!isLoading) {
|
|
router.replace(isAuthenticated ? "/dashboard" : "/login");
|
|
}
|
|
}, [isAuthenticated, isLoading, router]);
|
|
|
|
return (
|
|
<div className="flex items-center justify-center min-h-screen">
|
|
<div className="text-[var(--color-text-muted)]">Loading...</div>
|
|
</div>
|
|
);
|
|
}
|