A minimal 2-page AI chat site with automated GitHub integration for community summaries.
npm installSet environment variables:
export GITHUB_TOKEN="your_github_token_here"
export REPO_OWNER="your-github-username"
export REPO_NAME="your-repository-name"
export OPENAI_API_KEY="your_openai_api_key_here"Set these environment variables in your Vercel dashboard:
GITHUB_TOKEN: Your GitHub personal access tokenREPO_OWNER: Your GitHub username (e.g., "zanynik")REPO_NAME: Your repository name (e.g., "collabai")OPENAI_API_KEY: Your OpenAI API key
To get a GitHub token:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate a new token with
repopermissions - Copy and use the token in the environment variable above
To get an OpenAI API key:
- Go to https://platform.openai.com/api-keys
- Create a new secret key
- Copy and use the key in the environment variable above
Call the update script with a new summary:
node updateSummary.js "Your new summary content here"npm run updateRun without arguments to test with mock data:
node updateSummary.jsmy-ai-site/
├── api/
│ └── update-summary.js # Vercel serverless function for GitHub updates
├── public/
│ ├── index.html # Chat interface with real OpenAI integration
│ └── info.md # Community summary page (auto-updated)
├── updateSummary.js # GitHub integration script (for local use)
├── package.json # Dependencies: @octokit/rest, openai
├── vercel.json # Vercel deployment configuration
└── README.md # This file
- Real AI Chat:
public/index.htmluses OpenAI API for real chat conversations - Smart Summarization: Chat conversations are summarized using OpenAI and combined with existing summaries
- GitHub Integration:
api/update-summary.jsserverless function updatespublic/info.mdon GitHub - Auto-Deploy: Changes pushed to GitHub trigger automatic Vercel redeployment
- ✅ Real OpenAI chat integration
- ✅ Intelligent chat summarization
- ✅ Incremental summary updates (doesn't overwrite, but combines intelligently)
- ✅ Automatic GitHub commits and deployment
- ✅ Serverless architecture (no database needed)
- ✅ CORS-enabled API endpoints
- Set up environment variables in Vercel dashboard
- Test the full flow: chat → summarize → GitHub update → redeploy
- Consider adding authentication for production use
- Node.js 14.0.0 or higher
- GitHub personal access token with repo permissions