Skip to content

Commit 2a2d1b6

Browse files
committed
Initial commit
0 parents  commit 2a2d1b6

120 files changed

Lines changed: 39990 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
USERNAME=""
2+
PASSWORD=""
3+
4+
# OPENAI_API_KEY and OPENAI_BASE_URL are optional. If provided, OpenAI API will be used for email content extraction; otherwise, Cloudflare AI will be used.
5+
# OPENAI_API_KEY=""
6+
# OPENAI_BASE_URL=""

.github/workflows/deploy.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 🚀 Deploy Alle to Cloudflare Workers
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
Deploy:
10+
name: Deploy Alle
11+
runs-on: ubuntu-latest
12+
env:
13+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
14+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
15+
D1_DATABASE_ID: ${{ secrets.D1_DATABASE_ID }}
16+
USERNAME: ${{ secrets.USERNAME }}
17+
PASSWORD: ${{ secrets.PASSWORD }}
18+
ENABLE_AI_EXTRACT: ${{ secrets.ENABLE_AI_EXTRACT }}
19+
EXTRACT_MODEL: ${{ secrets.EXTRACT_MODEL }}
20+
JWT_MIN_TTL: ${{ secrets.JWT_MIN_TTL }}
21+
JWT_MAX_TTL: ${{ secrets.JWT_MAX_TTL }}
22+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
23+
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
24+
25+
steps:
26+
- name: 检出代码仓库 - Checkout repository
27+
uses: actions/checkout@v4
28+
- name: 设置 Node.js - Setup Node.js
29+
uses: actions/setup-node@v4
30+
- name: 安装依赖 - Install dependencies
31+
run: npm install
32+
- name: 生成配置 - Generate config
33+
run: npm run gen-config
34+
- name: 部署 - Deploy
35+
run: npm run deploy
36+
- name: 设置密钥 - Set secrets
37+
run: npm run secret
38+
- name: 应用数据库迁移 - Apply database migrations
39+
run: npm run db:migrations:apply

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
37+
38+
# OpenNext
39+
/.open-next
40+
41+
# wrangler files
42+
.wrangler
43+
.dev.vars*
44+
!.dev.vars.example
45+
!.env.example
46+
47+
# pwa
48+
public/workbox-*.js
49+
public/sw.js
50+
.claude
51+
.serena

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"wrangler.json": "jsonc"
4+
}
5+
}

0 commit comments

Comments
 (0)