Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# CIIMS environment configuration reference.
#
# config.py already ships with safe, working defaults for every setting
# below, so CIIMS runs without a .env file. Copy this file to `.env` and
# uncomment/edit only the values you need to override:
#
# cp .env.example .env
#
# See config.example.py for the full list of supported settings.

# ---- Database ----
# DB_HOST=localhost
# DB_USER=root
# DB_PASSWORD=your_password
# DB_DATABASE=campus_system
# DB_CHARSET=utf8mb4
# DB_POOL_SIZE=5

# ---- Face recognition (optional - module not bundled, see README) ----
# FACE_RECOGNITION_MODEL_PATH=model/trainer.yml
# FACE_RECOGNITION_HAAR_CASCADE_PATH=haarcascade_frontalface_default.xml
# FACE_RECOGNITION_CONFIDENCE_THRESHOLD=50
# FACE_RECOGNITION_PREDICTION_THRESHOLD=70
# FACE_RECOGNITION_TIMEOUT_SECONDS=30

# ---- AI Assistant (optional - leave unset to disable) ----
# OPENROUTER_API_KEY=your_api_key_here
# OPENROUTER_MODEL=deepseek/deepseek-chat
# OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
# CIIMS_PROXY_URL=http://127.0.0.1:7897

# ---- Application ----
# APP_NAME=CIIMS
# APP_VERSION=1.0.0
# DEBUG=False

# ---- Logging ----
# LOG_LEVEL=INFO
# LOG_DIR=logs
# LOG_MAX_BYTES=10485760
# LOG_BACKUP_COUNT=5

# ---- Security ----
# PASSWORD_HASH_ROUNDS=12
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Bryte

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ pip install -r requirements.txt
4. Configuration
```bash
# config.py already ships with safe, environment-driven defaults.
# Optionally create a .env file (see below) to override database and
# Optionally copy .env.example to .env to override database and
# API settings without editing config.py directly.
cp .env.example .env
```

5. Database setup
Expand Down Expand Up @@ -114,6 +115,7 @@ ciims/
├── scripts/ # Utility scripts (sample data generation, etc.)
├── config.py # Runtime configuration (env-driven, no secrets)
├── config.example.py # Reference/documentation for all config options
├── .env.example # Copy to .env to override config.py defaults
└── main.py # Application entry point
```

Expand All @@ -124,7 +126,7 @@ above.

### License

This project is licensed under the MIT License.
This project is licensed under the [MIT License](LICENSE).

---

Expand Down Expand Up @@ -178,8 +180,9 @@ pip install -r requirements.txt
4. 配置
```bash
# config.py 已内置基于环境变量的安全默认值,开箱即用。
# 如需覆盖数据库或 API 设置,可创建 .env 文件(变量说明参见英文部分的
# Configuration 小节,或直接查看 config.example.py)。
# 如需覆盖数据库或 API 设置,可复制 .env.example 为 .env(变量说明参见
# 英文部分的 Configuration 小节,或直接查看 config.example.py)。
cp .env.example .env
```

5. 数据库设置
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PySide6==6.10.3
mysql-connector-python==9.4.0
python-dotenv==1.1.1
PySide6==6.11.2
mysql-connector-python==9.7.0
python-dotenv==1.2.3
httpx==0.28.1