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.
44 changes: 15 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CIIMS is a desktop application for campus inventory management with an optional

### Features

- 🔐 **Secure Authentication**: Password-based login with optional face recognition
- 🔐 **Secure Authentication**: Password-based login, with optional face-recognition enrollment during registration/profile updates
- 📦 **Inventory Management**: Add, edit, and track items with stock monitoring
- 🔄 **Borrow/Return Operations**: Complete borrowing lifecycle with overdue tracking
- 👥 **User Management**: Admin controls for user accounts and permissions
Expand All @@ -32,8 +32,8 @@ CIIMS is a desktop application for campus inventory management with an optional

1. Clone the repository
```bash
git clone https://github.com/your-username/ciims.git
cd ciims
git clone https://github.com/HelloBryte/CIIMS.git
cd CIIMS
```

2. Create virtual environment
Expand Down Expand Up @@ -75,31 +75,17 @@ 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):
```env
# Database
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_password
DB_DATABASE=campus_system

# Face recognition configuration (optional - module not bundled, see note below)
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

# AI Assistant configuration (optional)
OPENROUTER_API_KEY=your_api_key_here
OPENROUTER_MODEL=deepseek/deepseek-chat
CIIMS_PROXY_URL=http://127.0.0.1:7897
copy `.env.example` to `.env` and edit what you need (see `config.example.py`
for the full list of supported variables):
```bash
cp .env.example .env
```

**Note**: The face recognition capture/training module (`face_recognition/`)
is not bundled in this repository. The login, registration, and profile
screens detect its absence automatically and disable the face-recognition
UI elements; password-based authentication always works normally.
is not bundled in this repository. The registration and profile screens
detect its absence automatically and disable the face-recognition UI
elements. Face recognition is only used to enroll/update a face for an
account; login itself is always password-based.

### Project Structure

Expand Down Expand Up @@ -134,7 +120,7 @@ CIIMS 是一个校园物资智能管理系统桌面应用,可选内置 AI 助

### 功能特点

- 🔐 **安全认证**:密码登录,可选人脸识别
- 🔐 **安全认证**:密码登录,注册/更新资料时可选录入人脸识别
- 📦 **物资管理**:添加、编辑、追踪物资,库存监控
- 🔄 **借还操作**:完整的借还流程,逾期追踪
- 👥 **用户管理**:管理员控制用户账户和权限
Expand All @@ -160,8 +146,8 @@ CIIMS 是一个校园物资智能管理系统桌面应用,可选内置 AI 助

1. 克隆仓库
```bash
git clone https://github.com/your-username/ciims.git
cd ciims
git clone https://github.com/HelloBryte/CIIMS.git
cd CIIMS
```

2. 创建虚拟环境
Expand Down Expand Up @@ -201,7 +187,7 @@ python main.py

### 使用说明

1. **登录**:使用密码或人脸识别进行认证
1. **登录**:使用用户名和密码进行认证
2. **仪表盘**:根据用户角色(管理员/用户)访问主要功能
3. **物资管理**:添加、编辑或删除库存物资
4. **借还**:借用和归还物资,自动追踪
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