A futuristic, neon-styled single-page application powered by local AI agents for advanced problem solving and content generation.
-
Install Dependencies:
npm install
-
Start the Backend:
node server/server.mjs
-
Launch the Frontend: Serve the
publicdirectory using a static file server (e.g.,serve,http-server, or Vite).npx serve public
Open
http://localhost:3000(or the port provided by your static server) in your browser.
- CORS Restriction: Restrict
Access-Control-Allow-Originto your specific production domain instead of*. - Content-Security-Policy (CSP): Implement strict CSP headers to prevent XSS.
- HTTPS: Serve all traffic over HTTPS (using a reverse proxy like Nginx or Caddy).
- Rate Limiting: Implement rate limiting on
/api/prompt(e.g., usingexpress-rate-limit) to prevent abuse. - Authentication: Add API key or JWT authentication for sensitive endpoints.
- Environment Variables: Load secrets (
OLLAMA_HOST,NEXUS_CREDENTIALS, etc.) from a.envfile (do not commit.env!). - Logging: Use a structured logger like
pinoorwinstonfor production logs. - Graceful Shutdown: Handle
SIGTERM/SIGINTsignals to close server connections cleanly. - Accessibility: Ensure
prefers-reduced-motionand focus visibility styles are maintained.
project-root/
├─ public/
│ ├─ index.html # Main UI
│ ├─ css/
│ │ └─ style.css # Neon styling
│ └─ js/
│ └─ app.js # Frontend logic (SSE, API calls)
├─ server/
│ ├─ api.mjs # Ollama & Nexus API Bridge
│ └─ server.mjs # Express Server & SSE
├─ .env # Environment config (git-ignored)
├─ package.json
└─ README.md