Your AI-powered digital twin. Fork it, add your profile, deploy to Vercel — let anyone chat with your AI clone.
A personal portfolio page with an AI chatbot that role-plays as you. It uses your profile data, experience, and training Q&A to answer questions about your background — like having a 24/7 version of yourself available for recruiters, colleagues, or anyone curious about your work.
Live demo: digital-me-test.vercel.app
git clone https://github.com/YOUR_USERNAME/digital-me.git
cd digital-me
npm install- Go to openrouter.ai and create an account
- Generate an API key at openrouter.ai/keys
- (Recommended) Set a spending limit in the OpenRouter dashboard to prevent unexpected costs
cp .env.example .env.local
# Edit .env.local and add your OPENROUTER_API_KEYEdit 4 files in the config/ directory:
| File | What to edit |
|---|---|
config/profile.json |
Your name, experience, skills, education, links |
config/training-qa.json |
Q&A pairs that teach the AI how you'd answer specific questions |
config/system-prompt.md |
The AI's persona instructions (usually fine as-is) |
config/settings.json |
AI model, rate limits, welcome message |
npm run devOpen http://localhost:3000 to see your digital twin.
Click the Deploy with Vercel button above, or:
npm install -g vercel
vercelSet OPENROUTER_API_KEY as an environment variable in your Vercel project settings.
{
"name": "Your Name",
"headline": "Your professional headline",
"location": "City, Country",
"experience": [
{
"company": "Company Name",
"role": "Your Role",
"duration": "2020 - Present",
"description": "What you did",
"achievements": ["Achievement 1", "Achievement 2"]
}
],
"skills": {
"technical": ["TypeScript", "React"],
"soft": ["Leadership", "Communication"]
},
"education": [
{
"institution": "University Name",
"degree": "Degree",
"year": "2020"
}
],
"links": {
"github": "https://github.com/you",
"linkedin": "https://linkedin.com/in/you"
}
}These Q&A pairs teach the AI how you'd answer specific questions. The more you add, the more authentic the responses:
[
{
"question": "What is your greatest achievement?",
"answer": "Your detailed answer here..."
}
]| Setting | Default | Description |
|---|---|---|
ai.model |
google/gemini-2.0-flash-lite-001 |
OpenRouter model ID |
ai.temperature |
0.7 |
Response creativity (0-1) |
ai.maxTokens |
1024 |
Max response length |
rateLimit.maxRequestsPerMinute |
10 |
Per-IP rate limit |
rateLimit.maxRequestsPerHour |
60 |
Per-IP hourly limit |
chat.welcomeMessage |
"Hi! I'm..." |
Initial chat placeholder |
Browse available models at openrouter.ai/models.
- Jailbreak detection — blocks attempts to override the AI's role or extract system prompts
- Rate limiting — per-IP request limits to prevent abuse (in-memory, best-effort on serverless)
- OpenRouter spending limit — set a hard cost cap in your OpenRouter dashboard (recommended)
- Next.js (App Router)
- Tailwind CSS + shadcn/ui
- OpenRouter (multi-model LLM gateway)
- Vercel (deployment)
config/ -> Your profile data (JSON + Markdown)
src/app/page.tsx -> Profile page (Server Component)
src/app/api/chat/ -> Chat endpoint (Serverless Function)
src/lib/ -> AI client, prompt builder, safety checks
src/components/ -> UI components
The chat flow:
- User sends message to
/api/chat - Rate limit check (IP-based)
- Jailbreak detection (regex patterns)
- System prompt assembled from template + profile + Q&A
- OpenRouter API call with conversation history
- Response returned with word-by-word typing animation
MIT
