docs: update README and add env.example for API key configuration

This commit is contained in:
dayuan.jiang
2025-11-10 19:52:08 +09:00
parent 61aa0937d6
commit 34de984fb8
2 changed files with 16 additions and 6 deletions

View File

@@ -2,10 +2,8 @@
A next.js web application that integrates AI capabilities with draw.io diagrams. This app allows you to create, modify, and enhance diagrams through natural language commands and AI-assisted visualization. A next.js web application that integrates AI capabilities with draw.io diagrams. This app allows you to create, modify, and enhance diagrams through natural language commands and AI-assisted visualization.
https://github.com/user-attachments/assets/b2eef5f3-b335-4e71-a755-dc2e80931979 https://github.com/user-attachments/assets/b2eef5f3-b335-4e71-a755-dc2e80931979
Demo site: [https://next-ai-draw-io.vercel.app/](https://next-ai-draw-io.vercel.app/) Demo site: [https://next-ai-draw-io.vercel.app/](https://next-ai-draw-io.vercel.app/)
## Features ## Features
@@ -47,12 +45,15 @@ npm install
yarn install yarn install
``` ```
3. Create a `.env.local` file in the root directory with the following variables: 3. Create a `.env.local` file in the root directory. You can use `env.example` as a template:
```bash
cp env.example .env.local
``` ```
OPENAI_API_KEY=your_openai_api_key_here
# Add any other required environment variables Then update `.env.local` with your actual API keys:
```
Note: Not all variables are required. At minimum, you'll need at least one AI provider API key (OpenAI, Google, or OpenRouter).
4. Run the development server: 4. Run the development server:

9
env.example Normal file
View File

@@ -0,0 +1,9 @@
# add the needed api
GOOGLE_GENERATIVE_AI_API_KEY="your-google-api-key-here"
OPENAI_API_KEY="your-openai-api-key-here"
PERSONAL_ACCESS_TOKEN="your-github-personal-access-token-here"
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
AWS_REGION=your-region
OPENROUTER_API_KEY="your-openrouter-api-key-here"