Getting Started
Prerequisites
- Node.js 20+
- MongoDB instance (local or Atlas)
- OpenAI API key
Installation
git clone https://github.com/ShellTechnology/norman-engine.git
cd norman-engine
npm installConfiguration
Copy the example env file and fill in your values:
cp .env.example .envRequired environment variables:
# LLM Provider
LLM_PROVIDER=openai
OPENAI_API_KEY=sk-...
# Server
PORT=3001
# MongoDB
MONGODB_URI=mongodb://localhost:27017/norman-engine
# Auth
AUTH_SECRET=your-auth-secretDevelopment
npm run devThe server starts on http://localhost:3001.
Verify It Works
# List models
curl http://localhost:3001/api/models
# Non-streaming chat
curl -X POST http://localhost:3001/api/complete \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Hello!"}],
"model": "gpt-4o"
}'
# Streaming chat
curl -N -X POST http://localhost:3001/api/chat \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Hello!"}],
"model": "gpt-4o",
"stream": true
}'Building for Production
npm run build
npm startDocker
docker build -t norman-engine .
docker run -p 3001:3001 --env-file .env norman-engine