Modern frontend for intellectual property workflow management, built with Next.js App Router. The project includes:
- Marketing website (landing sections, FAQ, contact CTA)
- Client dashboard shell (cases, documents, timeline, payments, profile)
- Auth pages (login, signup)
- New patent filing flow
- Floating IPR chatbot widget integrated
- Next.js 16 (App Router)
- React 19
- Tailwind CSS 4
- ESLint 9
/- marketing website/login- user login/signup- user registration/dashboard- dashboard overview/dashboard/cases- case list/dashboard/cases/new- new patent filing form/dashboard/cases/success- filing success page/dashboard/documents- documents section/dashboard/messages- messages section/dashboard/payments- payments section/dashboard/profile- profile section/dashboard/timeline- timeline section/dashboard/cost-estimator- cost estimator/api/chatbot- Next.js proxy endpoint for chatbot backend
src/
app/
api/chatbot/route.js # Chatbot proxy route
dashboard/ # Dashboard pages
login/page.jsx
signup/page.jsx
layout.jsx # Root layout, mounts chatbot widget
page.jsx # Landing page
components/
ChatbotWidget.jsx # Floating chatbot UI
dashboard/
Sidebar.jsx
Topbar.jsx
lib/
api.js # API base URL helper
- Node.js 20+
- npm 10+
- Install dependencies:
npm install- Create
.env.localin project root:
NEXT_PUBLIC_API_URL=https://your-main-backend-domain.com
CHATBOT_BACKEND_URL=http://127.0.0.1:10000/chat- Start development server:
npm run dev- Open
http://localhost:3000
-
NEXT_PUBLIC_API_URLUsed by frontend auth and filing requests viasrc/lib/api.js. -
CHATBOT_BACKEND_URLUsed bysrc/app/api/chatbot/route.jsto forward chatbot requests. Must point directly to the chatbot POST endpoint, usually ending with/chat.
Example for deployed Flask chatbot:
CHATBOT_BACKEND_URL=https://your-flask-domain.com/chatThe chatbot UI is rendered globally from src/app/layout.jsx through src/components/ChatbotWidget.jsx.
Flow:
- User sends message from widget.
- Widget calls
POST /api/chatbot. - Next.js route forwards request to
CHATBOT_BACKEND_URL. - Response is returned to the widget and displayed.
This keeps your backend URL hidden from browser code and avoids direct cross-origin setup in the widget.
npm run dev- start local development servernpm run build- create production buildnpm run start- run production servernpm run lint- run ESLint checks
Set the same environment variables in your hosting platform:
- Vercel: Project Settings -> Environment Variables
- Netlify/Render/Azure: site/app environment variable settings
After changing env vars, redeploy or restart the app.
- Core UI and routing are implemented.
- Several dashboard sections currently show placeholder or empty-state data until backend sync is completed.
-
Chatbot says backend unavailable: Check
CHATBOT_BACKEND_URLand confirm the Flask service is reachable. -
Auth/fetch requests fail: Check
NEXT_PUBLIC_API_URLand backend CORS/security config. -
Environment changes not reflected: Restart local dev server or redeploy production build.