Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
phantom/.env.example at techccy · techccy/phantom · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
techccy
phantom
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
techccy
Breadcrumbs
phantom
/
.env.example
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
98 lines (90 loc) · 4.38 KB
techccy
Breadcrumbs
phantom
/
.env.example
Copy path
Top
File metadata and controls
Code
Blame
98 lines (90 loc) · 4.38 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#
Docker Compose 全栈部署的环境变量示例。
#
复制为 .env 后修改,docker compose up 会自动读取。
#
注意:.env 不入库(见 .gitignore)。
#
#
规则速览:
#
- 画布尺寸改 PHANTOM_CANVAS_*_PC / *_MOBILE(后端生成路径 + 前端渲染单一来源)。
#
PHANTOM_CANVAS_W/H 仅作 PC 兜底默认(向后兼容),改 PC 尺寸请直接改 _PC 变量。
#
⚠️ 改画布尺寸属【前端 build 时注入】,必须 `docker compose up -d --build` 重 build
#
前端镜像,否则前端仍在旧尺寸画布上采集 → 与后端坐标系错位 → 验证恒失败。
#
- 后端 PHANTOM_*(非画布类):改完重启 backend 容器即生效(docker compose up -d)。
#
- 前端 VITE_PARTICLE_* / VITE_PREVIEW_SECONDS:同属构建时注入,改后必须加 --build。
#
============ 基础 / 安全 ============
#
允许的前端来源(逗号分隔)。
#
接入方网站的源都要加进来,否则浏览器 CORS 会拦截。
#
官方 demo 走同源 http://localhost;接入 demo 走 http://localhost:8088
PHANTOM_CORS_ORIGINS
=
http://localhost,http://localhost:8088
#
Token HMAC 签名密钥:生产【必须】注入稳定随机值(>=32 字节)。
#
留空则进程级随机生成(多 worker/多实例间 token 不可校验,仅适合本地试用)。
#
生成示例:openssl rand -hex 32
PHANTOM_TOKEN_SECRET
=
#
调试模式:设为 1/true/yes/on 后,后端会在日志里打印每次 /verify 的全部采集轨迹
#
与原分属明细(综合分、DTW/Bio 子分、各生理特征与子项)。仅用于排查,生产务必关闭。
PHANTOM_DEBUG
=
#
============ Challenge / 画布 / 时长 ============
#
画布 PC/Mobile 分别配置(docs/issue3.md §2/§4):前端按视口传 device,
#
后端据此选对应尺寸。PHANTOM_CANVAS_W/H 为 PC 兜底默认(向后兼容)。
PHANTOM_CANVAS_W
=
480
PHANTOM_CANVAS_H
=
480
PHANTOM_CANVAS_W_PC
=
480
PHANTOM_CANVAS_H_PC
=
480
PHANTOM_CANVAS_W_MOBILE
=
360
PHANTOM_CANVAS_H_MOBILE
=
360
PHANTOM_CHALLENGE_DURATION
=
6.0
PHANTOM_TARGET_HALF
=
22
PHANTOM_TARGET_HALF_PC
=
22
PHANTOM_TARGET_HALF_MOBILE
=
30
PHANTOM_FPS
=
60
#
============ 评分权重 ============
#
Composite = W_DTW·S_DTW + W_BIO·S_Bio;S_Bio = W_JERK·e + W_ZC·zc + W_PSD·tremor
PHANTOM_PASS_THRESHOLD
=
0.8
PHANTOM_W_JERK
=
0.4
PHANTOM_W_ZC
=
0.3
PHANTOM_W_PSD
=
0.3
PHANTOM_W_DTW
=
0.6
PHANTOM_W_BIO
=
0.4
PHANTOM_DTW_D_REF_RATIO
=
0.15
#
============ DSP / 生理特征阈值 ============
#
震颤频段(Hz)
PHANTOM_TREMOR_LO_HZ
=
8.0
PHANTOM_TREMOR_HI_HZ
=
12.0
#
残差能量边界(px)
PHANTOM_ENERGY_MIN
=
0.1
PHANTOM_ENERGY_LOW
=
0.3
PHANTOM_ENERGY_HIGH
=
8.0
PHANTOM_ENERGY_MAX
=
20.0
#
加速度零交叉率(次/秒)
PHANTOM_ZC_FLOOR
=
1.0
PHANTOM_ZC_RISE
=
1.67
PHANTOM_ZC_PLATEAU
=
15.0
PHANTOM_ZC_DROP
=
40.0
#
震颤振幅(px)
PHANTOM_TREMOR_AMP_MIN
=
0.05
PHANTOM_TREMOR_AMP_LOW
=
0.3
PHANTOM_TREMOR_AMP_HIGH
=
8.0
PHANTOM_TREMOR_AMP_MAX
=
20.0
#
震颤 PSD 占比 + tremor 子分内部权重
PHANTOM_TREMOR_PSD_MIN
=
0.02
PHANTOM_TREMOR_PSD_LOW
=
0.4
PHANTOM_TREMOR_PSD_MID
=
0.13
PHANTOM_W_TREMOR_AMP
=
0.5
PHANTOM_W_TREMOR_PSD
=
0.5
#
============ 前端渲染参数(Vite 构建时注入,改后需 --build)============
#
雪花密度/亮度:越大越密/越亮,过大易被密度分析抠图
VITE_PARTICLE_DENSITY
=
0.6
VITE_PARTICLE_DROP_RATE
=
0.05
#
目标方块亮度增益(0~1):
#
0 = 目标粒子灰度与背景【同分布】(均匀 [0,255])→ 单帧上目标区与背景无任何亮度
#
差异,机器逐帧密度/亮度分析完全失效;人眼仅靠"共同命运"位移整合看见方块。
#
(持久化粒子整体平移 + 沿贝塞尔路径推进 → 保障运动一致性,人眼可见。)
#
>0 = 在固有灰度上线性提亮 → 方块更亮、更易看,但也更易被机器识别(生产建议 0 或极小值)。
#
⚠️ 仅作用于正式动态渲染;不影响预热脉冲的呼吸显影(预热始终明显可见,不受此值影响)。
VITE_PARTICLE_TARGET_GAIN
=
0
VITE_PARTICLE_BRIGHTNESS
=
0.55
VITE_PARTICLE_BRIGHTNESS_VAR
=
0.45
#
预热脉冲时长(秒):按住按钮后,方块先在起点原地显影这段时间再出发,
#
让用户先熟悉方块位置。改后需 docker compose up -d --build 重 build 前端镜像。
VITE_PREVIEW_SECONDS
=
2
#
后端 API 地址:默认同源 /api,由 nginx 反代到 backend:8000。
#
生产若用独立域名,把它填进来即可。
VITE_API_BASE
=
/api
You can’t perform that action at this time.