feat: improve header responsiveness and update seed initialization

- Add text truncation for title on mobile screens
- Hide user info section on mobile, show simplified icons only
- Update seed.ts to create admin and demo users with proper password hashing
- Add bcryptjs for password hashing in seed script
- Update QWEN.md documentation with seed command and default users

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-02-19 10:14:21 +08:00
parent 6c3e7c86b6
commit 5801eb4596
39 changed files with 3335 additions and 1834 deletions

12
QWEN.md
View File

@@ -51,11 +51,13 @@ bun install
```bash
cp .env.example .env
# Fill in your DATABASE_URL and BETTER_AUTH_SECRET
# Optional: Set ADMIN_EMAIL and ADMIN_PASSWORD for admin user
```
### Database Initialization
```bash
bun x prisma migrate dev
bun run seed
```
### Start Development
@@ -109,4 +111,12 @@ bun run dev
- `test:e2e`: Runs end-to-end tests
- `build`: Builds the application for production
- `start`: Starts the production server
- `seed`: Seeds the database with initial data
- `seed`: Seeds the database with admin and demo users
## Default Users (after running `bun run seed`)
- **Admin**: `ADMIN_EMAIL` (from env) / `ADMIN_PASSWORD` (default: `admin123`)
- **Demo Users**:
- `demo1@example.com` / `demo123` (role: user)
- `demo2@example.com` / `demo123` (role: user)
- `moderator@example.com` / `demo123` (role: moderator)