A fully offline, privacy-first AI assistant powered by Llama 3 and Ollama.
No cloud. No telemetry. No compromise.
Features · Installation · Usage · Project Structure · Contributing
ASTERYX is a self-hosted AI chat application that runs entirely on your local machine. It connects to Ollama to serve large language models — meaning your conversations are never sent to any external server.
Built with a clean Node.js + Express backend and a polished multi-page frontend featuring dark/light mode, accent color theming, keyboard shortcuts, toast notifications, mobile responsiveness, and animated page transitions.
- Powered by Llama 3 via Ollama — runs 100% offline
- Multi-session chat with conversation history
- Typing animation for bot responses
- One-click copy on any message
- Delete individual conversations
- Dark / Light mode toggle — persists across all pages
- 8 accent color presets + custom color picker
- Animated page transitions — smooth fade between pages
- Toast notifications — for actions, errors, and confirmations
- Keyboard shortcuts —
Ctrl+K,Ctrl+D,Ctrl+/,Ctrl+P - Mobile responsive sidebar with hamburger menu
- Loading skeletons on form submissions
- Password strength meter on signup
- Session-based authentication with
express-session - Protected routes — chat is inaccessible without login
- HTML pages served only through server routes (never as static files)
- Signup → Login → Chat flow enforced server-side
| Layer | Technology |
|---|---|
| Runtime | Node.js 18+ |
| Web Framework | Express 5 |
| AI Backend | Ollama (Llama 3) |
| Auth | express-session |
| HTTP Client | Axios |
| Frontend | Vanilla HTML / CSS / JS |
| Data Store | JSON file (users.json) |
git clone https://github.com/your-username/asteryx-ai.git
cd asteryx-ainpm installollama pull llama3ollama serveOllama runs on
http://localhost:11434by default.
node server.jshttp://localhost:3000
asteryx-ai/
├── server.js # Express server — all routes & API
├── users.json # User accounts (auto-managed)
├── package.json
│
├── public/ # Static assets (served publicly)
│ ├── logo.png
│ ├── founder.jpg
│ └── ui.js # Shared UI library (toast, theme, shortcuts, etc.)
│
└── views/ # HTML pages (served only via server routes)
├── landing.html # Public landing page
├── login.html # Login form
├── signup.html # Signup form
└── index.html # Protected chat interface
⚠️ Theviews/folder is not exposed as static files. All HTML is served through authenticated routes inserver.js— so pages like/logincan't be bypassed by visitinglogin.htmldirectly.
/ (Landing)
↓
/signup or /login
↓
/chat ← requires active session
↓
/logout → back to /
- Visiting
/chatwithout a session → redirects to/ - Visiting any
.htmlfile directly → redirects to/ - Already logged in and visiting
/login→ skips to/chat
| Shortcut | Action |
|---|---|
Ctrl + K |
New conversation |
Ctrl + D |
Toggle dark / light mode |
Ctrl + P |
Open accent color picker |
Ctrl + / |
Show all keyboard shortcuts |
Enter |
Send message |
Shift + Enter |
New line in message |
Esc |
Close any open panel |
All configuration lives in server.js. Key values to update:
// Session secret — change to a long random string in production
secret: "astryx-secret"
// Ollama model — swap for any model you have pulled
model: "llama3"
// Ollama endpoint — change if running on a different host/port
"http://127.0.0.1:11434/api/generate"
// Server port
app.listen(3000, ...)Pull any model via Ollama and update server.js:
ollama pull mistral
ollama pull codellama
ollama pull phi3Then in server.js:
model: "mistral" // or codellama, phi3, gemma, etc.This project is designed for local / personal use. Before deploying publicly, consider these improvements:
- Hash passwords — currently stored as plain text. Use
bcrypt. - Use a real database — replace
users.jsonwith SQLite, PostgreSQL, or MongoDB. - Environment variables — move secrets to a
.envfile usingdotenv. - HTTPS — add SSL via a reverse proxy (Nginx + Let's Encrypt) for production.
- Rate limiting — add
express-rate-limitto protect/loginfrom brute force.
Contributions are welcome! Feel free to open issues or pull requests.
- Fork the repository
- Create your feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -m 'Add my feature' - Push to the branch:
git push origin feature/my-feature - Open a Pull Request
Ujjwal Manna
AI & Robotics Developer
Building offline-first intelligence tools.
This project is licensed under the MIT License — see the LICENSE file for details.