{"id":20407391,"url":"https://github.com/nathanbrodin/chat","last_synced_at":"2025-09-06T05:39:03.354Z","repository":{"id":248112888,"uuid":"827794657","full_name":"NathanBrodin/Chat","owner":"NathanBrodin","description":"It’s my portfolio, reimagined as a chat conversation, answered by AI.","archived":false,"fork":false,"pushed_at":"2025-03-31T06:18:34.000Z","size":16777,"stargazers_count":14,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T08:11:12.324Z","etag":null,"topics":["ai","chatbot","claude","nextjs","portfolio","vercel-ai-sdk"],"latest_commit_sha":null,"homepage":"https://chat.brodin.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NathanBrodin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-12T11:44:35.000Z","updated_at":"2025-03-31T06:18:38.000Z","dependencies_parsed_at":"2024-08-12T11:04:24.829Z","dependency_job_id":"288d7353-8240-4067-ba77-57c65709bbde","html_url":"https://github.com/NathanBrodin/Chat","commit_stats":null,"previous_names":["nathanbrodin/chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NathanBrodin/Chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanBrodin%2FChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanBrodin%2FChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanBrodin%2FChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanBrodin%2FChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NathanBrodin","download_url":"https://codeload.github.com/NathanBrodin/Chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NathanBrodin%2FChat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273860261,"owners_count":25181084,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatbot","claude","nextjs","portfolio","vercel-ai-sdk"],"created_at":"2024-11-15T05:23:42.108Z","updated_at":"2025-09-06T05:39:03.343Z","avatar_url":"https://github.com/NathanBrodin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://chat.brodin.dev\"\u003e\n  \u003cimg alt=\"Nathan's AI demo\" src=\"./.github/nathan-s-ai.gif\" align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eNathan's AI\u003c/h1\u003e\n\u003c/a\u003e\n\n\u003cp align=\"center\"\u003e\nIt’s my portfolio, reimagined as a chat conversation, answered by AI.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#tech-stack\"\u003e\u003cstrong\u003eTech Stack\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#sources-of-inspiration\"\u003e\u003cstrong\u003eSources of Inspiration\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#deploy-your-own\"\u003e\u003cstrong\u003eDeploy Your Own\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#running-locally\"\u003e\u003cstrong\u003eRunning locally\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\nNathan's AI is a unique twist on the traditional portfolio. Instead of scrolling through pages of information, visitors can simply ask questions to learn about my career, skills, projects, and experiences. Built with Next.js, Tailwind CSS, and Vercel’s AI SDK, this chatbot acts as an interactive resume, letting you explore my journey in a conversational way.\n\n## Tech Stack\n\n- [Next.js](https://nextjs.org) App Router\n  - Advanced routing for seamless navigation and performance\n  - React Server Components (RSCs) and Server Actions for server-side rendering and increased performance\n- [AI SDK](https://sdk.vercel.ai/docs)\n  - Unified API for generating text, structured objects, and tool calls with LLMs\n  - Supports Anthropic (default), OpenAI, Cohere, and other model providers\n- [shadcn/ui](https://ui.shadcn.com)\n  - Styling with [Tailwind CSS](https://tailwindcss.com)\n  - Component primitives from [Radix UI](https://radix-ui.com) for accessibility and flexibility\n- Data Persistence\n  - [Vercel Postgres powered by Neon](https://vercel.com/storage/postgres) for saving chat history\n- [@upstash/ratelimit](https://upstash.com/docs/oss/sdks/ts/ratelimit/overview)\n  - Preventing excessive usage of the chat\n- [motion](https://motion.dev)\n  - A modern animation library for JavaScript and React\n  - Clean and easy to use animations\n\n## Sources of Inspiration\n\nI am proud of my designs, but it doesn't came from the pure source of my imagination. Here you can find links of website I used to create my own design.\n\n- Empty Screen messages: [Cal.com](https://cal.com/)\n- Messages animation: [Build UI](https://buildui.com/recipes/animated-list)\n- Title animation: [@jh3yy](https://x.com/jh3yy/status/1849062440773820747)\n- Themes: [ui/jln](https://ui.jln.dev/)\n\n## Deploy Your Own\n\nYou can deploy your own version of Nathan's AI Chatbot to Vercel with one click:\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fnathanbrodin%2Fchat\u0026env=ANTHROPIC_API_KEY,KV_URL,KV_REST_API_URL,KV_REST_API_TOKEN,KV_REST_API_READ_ONLY_TOKEN\u0026demo-title=Nathan's%20AI\u0026demo-description=Curious%20about%20Nathan%20Brodin%3F%20Ask%20his%20AI%20anything!\u0026demo-url=https%3A%2F%2Fchat.brodin.dev)\n\n### Setting up the chat's services\n\nNathan's AI depends on multiple services to function properly, and as you saw by deploying to Vercel, you need a few environment variables to make it work. Follow these steps to configure the necessary environment variables.\n\n#### 1. AI Provider (Anthropic API)\n\nGrab your [Anthropic API Key](https://console.anthropic.com/settings/keys) and paste it into your `.env.local` file:\n\n```\nANTHROPIC_API_KEY=\"your-api-key-here\"\n```\n\nNathan's AI currently uses Anthropic, but you can switch to another provider by updating the model inside `streamText()` in [lib/chat/actions.tsx](./lib/chat/actions.tsx). For more details, check out the [AI SDK documentation](https://sdk.vercel.ai/docs/foundations/providers-and-models). If you switch providers, remember to update the relevant environment variables accordingly.\n\n#### 2. Rate Limiting (Upstash)\n\nTo prevent users (or bots) from consuming all your AI credits in a caffeine-fueled chat spree, we use Upstash for rate limiting.\n\n1. Create a Redis database on [Upstash](https://upstash.com/docs/redis/overall/getstarted).\n2. Add these variables to your `.env.local` file:\n\n```\nKV_URL=\"your-kv-url\"\nKV_REST_API_URL=\"your-rest-api-url\"\nKV_REST_API_TOKEN=\"your-api-token\"\nKV_REST_API_READ_ONLY_TOKEN=\"your-read-only-token\"\n```\n\n#### 3. Chat Storage (Neon Postgres)\n\nIf you want to save chat logs for fine-tuning responses (definitely not because you're nosy), you'll need a Postgres database.\n\n1. Create a Postgres database on [Neon](https://neon.tech/).\n2. Add your connection string to `.env.local`:\n\n```\nPOSTGRES_URL=\"your-database-url\"\n```\n\n\n### Updating the AI Content\n\nCustomize the AI’s responses by replacing all content inside the [./content/\\*\\*](./content/) directory with your own experiences, education, or whatever makes your AI unique.\n\nThe content structure is defined in:\n\n- [contentlayer.config.ts](./contentlayer.config.ts)\n- [lib/chat/types.ts](lib/chat/types.ts)\n\nAdapt these files as needed to fit your requirements.\n\n### Renaming Nathan's AI\n\nIf your name happens to be Nathan, congratulations! The chatbot is already personalized for you. No changes needed.\n\nFor everyone else, you'll need to update all occurrences of its current name.\n\n#### VIM Users:\n\nRun a simple:\n\n```\ng/Nathan's AI/\n```\n\nThis will show all occurrences so you can update them efficiently.\n\n#### Non-VIM Users:\n\nThat's not my problem sorry, find your way's to replace it.\n\n## Running locally\n\nYou will need to use the environment variables [defined in `.env.example`](.env.example) to run Nathan's AI locally. It's recommended you use [Vercel Environment Variables](https://vercel.com/docs/projects/environment-variables) for this, but a `.env` file is all that is necessary.\n\n\u003e Note: You should not commit your `.env` file or it will expose secrets that will allow others to control access to your various authentication provider accounts.\n\n1. Install Vercel CLI: `npm i -g vercel`\n2. Link local instance with Vercel and GitHub accounts (creates `.vercel` directory): `vercel link`\n3. Download your environment variables: `vercel env pull`\n\n```bash\nbun install\n```\n\n```bash\nbun run dev\n```\n\nThat's it, you are all set!\nIf you run into any problems or have any questions, please hesitate to ask me.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanbrodin%2Fchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanbrodin%2Fchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanbrodin%2Fchat/lists"}