Requirements
- Node.js 20+
- PostgreSQL 15+ with pgvector extension
- pnpm package manager
Installation
1
Clone the repository
2
Install dependencies
3
Set up PostgreSQL
Create a database with pgvector:
4
Configure environment
.env:5
Run migrations
6
(Optional) Load sample data
7
Build for production
8
Start the server
CI / Automation
In CI pipelines, run migrations before tests/builds so the schema stays current:Process Management
Use a process manager like PM2 for production:Reverse Proxy
Nginx
Caddy
Database Maintenance
Backups
Migrations
Monitoring
Health Endpoint
Logs
Security Checklist
- Use HTTPS in production
- Set strong database password
- Use environment variables for secrets
- Enable rate limiting
- Set up firewall rules
- Configure database backups
- Monitor for security updates