-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
91 lines (77 loc) Β· 3.3 KB
/
Copy path.env.example
File metadata and controls
91 lines (77 loc) Β· 3.3 KB
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
# ============================================================
# ClassOS Environment Configuration
# Copy this file to .env and update values for your environment
# ============================================================
# ----- Application -----
APP_NAME=ClassOS
APP_ENV=development
DEBUG=true
SECRET_KEY=change-me-to-a-random-64-char-string
# ----- Database -----
DATABASE_URL=postgresql+asyncpg://classos:classos_secret@localhost:5432/classos_db
DB_POOL_SIZE=5
DB_MAX_OVERFLOW=10
# ----- JWT Authentication -----
JWT_SECRET_KEY=change-me-to-a-random-jwt-secret
JWT_ALGORITHM=HS256
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=60
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
# ----- CORS -----
CORS_ORIGINS=*
# ----- Camera 0 β Entry / Face Recognition -----
# When using an IMX519 CSI camera, the v4l2loopback bridge creates /dev/video10.
# For a USB webcam plugged directly in, change this to the actual /dev/videoX index.
CAMERA_RESOLUTION_WIDTH=1280
CAMERA_RESOLUTION_HEIGHT=720
CAMERA_FPS=30
CAMERA_DEVICE_INDEX=42
# ----- Camera 1 β Classroom Overhead / Head Count (CAM/DISP 1 connector on RPi5) -----
# Used exclusively for YOLOv8 head counting in Verify Head Count mode.
# Raspberry Pi Camera Module on CAM 1 / DISP 1 appears as /dev/video2 by default.
# Set to the appropriate /dev/videoX index for your hardware.
# If this camera is unavailable, the system falls back to single-camera mode.
CAMERA_1_DEVICE_INDEX=43
# ----- USB Webcam Fallback (Camera 0 and Camera 1) -----
# Shared fallback list β used by both cameras unless per-camera overrides are set below.
# The system tries each index in order and uses the first that opens.
# Example: a single USB webcam on /dev/video1 β CAMERA_USB_FALLBACK_INDICES=1
CAMERA_USB_FALLBACK_INDICES=1,3,4
# Per-camera overrides (optional) β set only when Camera 0 and Camera 1 should
# fall back to DIFFERENT USB devices (e.g., two separate USB webcams).
# Leave commented out / empty to use the shared list above.
#
# Example (Camera 0 β USB webcam A on /dev/video1,
# Camera 1 β USB webcam B on /dev/video3):
# CAMERA_0_USB_FALLBACK_INDICES=1
# CAMERA_1_USB_FALLBACK_INDICES=3
# ----- Fingerprint Sensor (R307) -----
FINGERPRINT_UART_PORT=/dev/ttyAMA0
FINGERPRINT_BAUD_RATE=57600
FINGERPRINT_MOCK_MODE=false
# ----- AI Engine -----
# Recognition thresholds (as decimals):
# FACE_CONFIDENCE_AUTO=0.70 -> >= 70% = auto-mark present
# FACE_CONFIDENCE_FINGERPRINT=0.30 -> 30%-69% = prompt fingerprint verification
# < 30% = unknown / ignored
# No face detected at all -> direct fingerprint scan always available
FACE_CONFIDENCE_AUTO=0.70
FACE_CONFIDENCE_FINGERPRINT=0.30
YOLO_MODEL_PATH=models/yolov8n.pt
YOLO_CONFIDENCE=0.5
HEAD_COUNT_INTERVAL=5
# ----- LCD Display (20x4 I2C Character LCD β HD44780 + PCF8574 backpack) -----
# Run `i2cdetect -y 1` on the Raspberry Pi to find your LCD's I2C address.
# Most PCF8574 backpacks use 0x27 (some use 0x3F).
# Set LCD_ENABLED=false to disable the LCD on non-Pi development machines.
LCD_ENABLED=true
LCD_I2C_ADDRESS=0x27
LCD_I2C_BUS=1
# ----- File Storage -----
FACE_IMAGES_DIR=data/faces
FACE_SAMPLES_PER_STUDENT=20
# ----- Redis (optional, for future scaling) -----
# REDIS_URL=redis://localhost:6379/0
# ----- Docker -----
POSTGRES_USER=classos
POSTGRES_PASSWORD=classos_secret
POSTGRES_DB=classos_db