You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Neeraj Aggarwal Digital Twin
A production-ready personal portfolio with a server-side AI Digital Twin chat.
## Structure
```text
.
├── About_Me.pdf # Source biography, loaded by /api/about
├── public/
│ ├── index.html
│ ├── styles.css
│ └── app.js
├── server.js
├── package.json
├── .env
└── .env.example
```
## Run locally
1. Keep `About_Me.pdf` in the project root. The browser loads the exact extracted text through `GET /api/about`.
2. Ensure `.env` contains the requested variable:
```env
OPENAI_API_KEY=your_openrouter_api_key
OPENAI_BASE_URL=https://openrouter.ai/api/v1
OPENAI_MODEL=openai/gpt-4o-mini
PORT=3000
SITE_URL=http://localhost:3000
```
The server also accepts the legacy `OPENAI-API_KEY` spelling currently present in this workspace, but `OPENAI_API_KEY` is recommended.
3. Install and start:
```bash
npm install
npm start
```
Open `http://localhost:3000`.
## Deployment notes
- Keep `.env` out of version control; never expose the API key to browser JavaScript.
- Set environment variables in the hosting provider's secret/configuration panel.
- Set `SITE_URL` to the deployed origin so OpenRouter receives the correct HTTP referer.
- The app uses Node.js 18.17+ for native `fetch`.
- For a different OpenAI-compatible router, set `OPENAI_BASE_URL` to its `/v1` endpoint and update `OPENAI_MODEL`.
# ai_learning