MCPcopy
hub / github.com/guaguaguaxia/weekly_report

github.com/guaguaguaxia/weekly_report @main sqlite

repository ↗ · DeepWiki ↗
72 symbols 146 edges 19 files 0 documented · 0%
README

Weekly Report

This project generate weekly report with simple sentence for you using AI.

Weekly Report

How it works

This project uses the OpenAI GPT-3 API (specifically, text-davinci-003) and Vercel Edge functions with streaming. It constructs a prompt based on the form and user input, sends it to the GPT-3 API via a Vercel Edge function, then streams the response back to the application.

Running Locally

After cloning the repo, go to OpenAI to make an account and put your API key in a file called .env.

Then, run the application in the command line and it will be available at http://localhost:3000.

npm run dev

One-Click Deploy

Deploy the example using Vercel:

Deploy with Vercel

NEXT_PUBLIC_USE_USER_KEY = false

Docker Deployment

docker run -d -p 3000:3000 --name weekly_report-docker -e OPENAI_API_KEY=sk-xxxxx ihxrainbow/weekly_report-docker

docker-compose.yml

services:
  weekly_report-docker:
    container_name: weekly_report-docker
    ports:
      - '3000:3000'
    image: ihxrainbow/weekly_report-docker
    environment:
      # API key
      - OPENAI_API_KEY=sk-xxxxx

Credits

Inspired by TwtterBio and zhengbangbo.

Extension points exported contracts — how you extend this code

TemplateManagerProps (Interface)
(no doc)
components/TemplateManager.tsx
DropDownProps (Interface)
(no doc)
components/DropDown.tsx
TemplateSelectProps (Interface)
(no doc)
components/TemplateSelect.tsx
HistoryPanelProps (Interface)
(no doc)
components/HistoryPanel.tsx
ChatGPTMessage (Interface)
(no doc)
utils/OpenAIStream.ts
Template (Interface)
(no doc)
utils/templateStorage.ts
HistoryRecord (Interface)
(no doc)
utils/historyStorage.ts
OpenAIStreamPayload (Interface)
(no doc)
utils/OpenAIStream.ts

Core symbols most depended-on inside this repo

getAllTemplates
called by 5
utils/templateStorage.ts
getHistory
called by 5
utils/historyStorage.ts
loadHistory
called by 4
components/HistoryPanel.tsx
loadTemplates
called by 3
components/TemplateManager.tsx
getCustomTemplates
called by 3
utils/templateStorage.ts
getTotalRecords
called by 2
components/HistoryPanel.tsx
getTemplateStats
called by 2
utils/templateStorage.ts
updateHistoryCount
called by 2
pages/index.tsx

Shape

Function 38
Method 19
Interface 9
Class 6

Languages

TypeScript100%

Modules by API surface

utils/templateStorage.ts15 symbols
utils/historyStorage.ts10 symbols
pages/index.tsx8 symbols
utils/OpenAIStream.ts7 symbols
components/TemplateManager.tsx7 symbols
components/HistoryPanel.tsx7 symbols
components/TemplateSelect.tsx5 symbols
pages/_document.tsx3 symbols
components/DropDown.tsx3 symbols
pages/api/generate.ts1 symbols
pages/_app.tsx1 symbols
components/ResizablePanel.tsx1 symbols

Dependencies from manifests, versioned

@headlessui/react1.7.7 · 1×
@headlessui/tailwindcss0.1.2 · 1×
@heroicons/react2.0.13 · 1×
@tailwindcss/forms0.5.3 · 1×
@types/marked4.0.8 · 1×
@types/node18.11.3 · 1×
@types/react18.0.21 · 1×
@types/react-dom18.0.6 · 1×
@vercel/analytics0.1.8 · 1×
autoprefixer10.4.12 · 1×
dotenv16.0.3 · 1×
eventsource-parser0.0.5 · 1×

For agents

$ claude mcp add weekly_report \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact