This project is the public SecuredApp marketing site and chatbot interface. It runs on Next.js 14 with React 18, Tailwind, and Redux Toolkit. The chatbot widget calls the FastAPI backend at http://72.60.102.190:2000 in production.
- Node.js 18+
- npm 9+
Install dependencies:
npm install --legacy-peer-depsThe --legacy-peer-deps flag avoids peer conflicts between react-chat-elements and React 18.
Create .env.local with the following keys:
NEXT_PUBLIC_API_BASE=http://72.60.102.190:2000
SECUREBOT_SYSTEM_PROMPT="You are SecureDApp's assistant..."NEXT_PUBLIC_API_BASEcontrols where the chatbot posts messages and form data.- Update the prompt if marketing/CS teams tweak copy.
npm run dev # Start local dev server at http://localhost:3000
npm run build # Production build
npm start # Serve the Next.js build (used in production)Note:
npm startexpects a serverful deployment (e.g., PM2, systemd, Docker). The deploy branch currently runs behind a custom Node host.
- Chat UI lives in
src/components/chat/ChatWidget.jsx. - Form submissions call
${NEXT_PUBLIC_API_BASE}/chatbot/form-submit. - Conversations hit
${NEXT_PUBLIC_API_BASE}/chat. - User info persists via
localStorageto keep follow-up messages seamless.
When developing locally with the FastAPI backend running at http://127.0.0.1:8000, set:
NEXT_PUBLIC_API_BASE=http://127.0.0.1:8000- Build:
npm run build - Copy
.next/bundle (or runnpm startdirectly on the target server) - Provide
.env.production/.env.localwith the correct API base URL - Ensure the FastAPI backend
/chatand/chatbot/form-submitendpoints are accessible from the hosting environment
Optional: use Docker/PM2 to keep the process alive.
src/components/chat/– chatbot widget, styles, guided flowssrc/store/– Redux slicespublic/assets/– static images and iconstailwind.config.js/postcss.config.js– styling pipeline
For deployment assistance or feature requests, contact the SecuredApp web team at hello@securedapp.in.