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
41 changes: 41 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copy this file to .env and adjust values as needed.
# config.py already ships with safe, environment-driven defaults, so every
# variable below is optional; only set what you need to override.
# See config.example.py for the full documented default for each setting.

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

# --- Face recognition (optional; module not bundled in this repo) ---
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

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

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

# --- AI assistant (optional; leave OPENROUTER_API_KEY empty to disable) ---
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_API_KEY=your_api_key_here
OPENROUTER_MODEL=deepseek/deepseek-chat
OPENROUTER_REFERER=
OPENROUTER_TITLE=CIIMS In-App Assistant
CIIMS_PROXY_URL=

# --- 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) 2026 HelloBryte

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.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ python main.py

`config.py` already reads every setting from an environment variable with a
sensible default, so the app runs out of the box. To override any value,
create a `.env` file in the project root (see `config.example.py` for the
full list of supported variables):
copy `.env.example` to `.env` and adjust as needed (see `config.example.py`
for the full documented default of every supported variable):
```env
# Database
DB_HOST=localhost
Expand Down Expand Up @@ -114,6 +114,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 # Template for local .env overrides
└── main.py # Application entry point
```

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

### License

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

---

Expand Down Expand Up @@ -210,4 +211,4 @@ python main.py

### 许可证

本项目采用 MIT 许可证。
本项目采用 [MIT 许可证](LICENSE)
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