dành cho phòng chăm sóc khách hàng bệnh viện hiếm muộn, trải nghiệm mới
  • TypeScript 99%
  • CSS 0.7%
  • HTML 0.1%
Find a file
tant 8c4e444dcc
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m29s
fix(tour): update CTA with real contact info
- Remove fake testimonial about 50+ hospitals
- Remove urgency bait message
- Update contact to Tú (+84 799 364 466)
- Change primary CTA to click-to-call button
- Add secondary option for contact form

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:09:12 +07:00
.claude fix(ci): use GitHub URLs for actions due to code.forgejo.org connectivity issues 2026-01-24 15:38:15 +07:00
.forgejo/workflows fix(ci): use GitHub URLs for actions due to code.forgejo.org connectivity issues 2026-01-24 15:38:15 +07:00
_bmad chore: add BMad Method workflow artifacts 2026-01-21 14:11:56 +07:00
_bmad-output fix(epic-9): apply code review fixes for Story 9.15 2026-01-24 13:35:42 +07:00
docs ci: update deployment workflow and upgrade to Node 24 2026-01-23 06:42:13 +07:00
public refactor(ui): improve header and settings layout for mobile/tablet 2026-01-23 06:57:21 +07:00
src fix(tour): update CTA with real contact info 2026-01-24 16:09:12 +07:00
.dockerignore ci: add Forgejo Actions workflow for Docker build 2026-01-22 11:36:06 +07:00
.env.example feat(epic-9): implement Story 9.0 - Guided Product Tour 2026-01-24 11:22:28 +07:00
.gitignore chore: update .gitignore to exclude demo assets and proposals 2026-01-23 20:45:29 +07:00
.prettierignore feat(story-1.1): initialize Next.js 16 project with Tailwind CSS 4 2026-01-21 14:10:51 +07:00
.prettierrc feat(story-1.1): initialize Next.js 16 project with Tailwind CSS 4 2026-01-21 14:10:51 +07:00
components.json feat(story-1.1): initialize Next.js 16 project with Tailwind CSS 4 2026-01-21 14:10:51 +07:00
docker-compose.dokploy.yml ci: update deployment workflow and upgrade to Node 24 2026-01-23 06:42:13 +07:00
Dockerfile ci: update deployment workflow and upgrade to Node 24 2026-01-23 06:42:13 +07:00
eslint.config.mjs feat(story-1.1): initialize Next.js 16 project with Tailwind CSS 4 2026-01-21 14:10:51 +07:00
next.config.ts ci: add Forgejo Actions workflow for Docker build 2026-01-22 11:36:06 +07:00
package-lock.json feat(epic-9): implement Story 9.0 - Guided Product Tour 2026-01-24 11:22:28 +07:00
package.json feat(epic-9): implement Story 9.0 - Guided Product Tour 2026-01-24 11:22:28 +07:00
postcss.config.mjs fix: add missing postcss.config.mjs for Tailwind CSS v4 2026-01-21 19:12:36 +07:00
project-context.md docs: add project documentation 2026-01-21 14:11:49 +07:00
README.md feat(story-5.5): implement global polish and accessibility with code review fixes 2026-01-22 12:02:46 +07:00
tsconfig.json feat(story-1.1): initialize Next.js 16 project with Tailwind CSS 4 2026-01-21 14:10:51 +07:00
vitest.config.ts feat(story-3.1): implement mock templates data store with tests 2026-01-21 20:27:36 +07:00
vitest.setup.ts fix(team): update mock avatars and team utils 2026-01-22 20:41:43 +07:00

CRM Bệnh Viện

Hệ thống quản lý quan hệ khách hàng cho bệnh viện - MVP giai đoạn 1.

Tech Stack

  • Framework: Next.js 16 (App Router, RSC, Turbopack)
  • Language: TypeScript 5.x (strict mode)
  • Styling: Tailwind CSS 4 + shadcn/ui (new-york style)
  • State Management: Zustand (client UI state)
  • Forms: react-hook-form + Zod validation
  • Date: date-fns với Vietnamese locale
  • Icons: Lucide React

Cài đặt

# Clone repo
git clone <repo-url>
cd crm-benhvien

# Cài dependencies
npm install

# Chạy dev server
npm run dev

Mở http://localhost:3000 để xem app.

Demo Accounts

Tên Email Password Role
Hương huong@hospital.vn demo123 Staff
Quản lý Minh manager@hospital.vn demo123 Manager

Hoặc sử dụng Quick Login buttons trên trang /login.

Cấu trúc Project

src/
├── app/
│   ├── (auth)/           # Public auth routes (/login)
│   ├── (dashboard)/      # Protected routes (/tasks, /templates, etc.)
│   └── globals.css       # Tailwind CSS config
├── components/
│   ├── ui/               # shadcn/ui components
│   ├── features/         # Feature-specific components
│   │   ├── tasks/        # Task board components
│   │   └── ...
│   └── shared/           # Shared components (Sidebar, Header)
├── stores/               # Zustand stores
│   ├── auth.ts           # Authentication state
│   ├── tasks.ts          # Task data & actions
│   └── task-filters.ts   # Filter state
├── types/                # TypeScript types
├── lib/                  # Utilities
└── hooks/                # Custom hooks

Features (Epic 2 - Completed)

Task Board

  • Kanban board với 4 columns: Chờ xử lý, Đang làm, Hoàn thành, Không liên lạc được
  • Task cards với patient info, priority, status
  • Drag & drop status changes (via dropdown)
  • Task detail side panel

Task Actions

  • Claim task (nhận việc)
  • Status updates với toast feedback
  • Task notes system
  • Follow-up scheduling với date/time picker
  • Search by patient name/phone
  • Filter by task type, status, assignee
  • "Của tôi" quick filter

Scripts

npm run dev       # Start dev server
npm run build     # Production build
npm run lint      # ESLint check
npm run typecheck # TypeScript check
npm test          # Run tests in watch mode
npm run test:run  # Run tests once
npm run ci        # ⭐ Chạy full CI pipeline (lint + typecheck + test + build)

Thêm shadcn/ui Components

npx shadcn@latest add <component-name>

Ví dụ:

npx shadcn@latest add table
npx shadcn@latest add textarea

Environment Variables

Tạo file .env.local:

# Không cần config gì cho MVP (mock data)

Development Notes

  • Không có database - Sử dụng mock data trong Zustand stores
  • Không có API - Tất cả operations là client-side
  • Auth là mock - Không có real authentication

CI/CD với Forgejo

Quy trình tự động

Khi push code lên branch main, Forgejo Actions sẽ tự động:

  1. Checkout source code
  2. Build Docker image với multi-stage build (deps → builder → runner)
  3. Tag image: crm-benhvien:latestcrm-benhvien:<commit-sha>
  4. Dọn dẹp các image cũ

Chạy CI tại Local (Bắt buộc trước khi push)

Để đảm bảo code pass CI trên Forgejo, BẮT BUỘC chạy lệnh sau trước khi push:

npm run ci

Lệnh này sẽ chạy tuần tự:

  1. npm run lint - Kiểm tra code style với ESLint
  2. npm run typecheck - Kiểm tra lỗi TypeScript
  3. npm run test:run - Chạy tất cả tests
  4. npm run build - Build production

Tất cả các bước phải PASS thì mới push code.

Chạy từng bước riêng lẻ (khi debug)

# Chỉ lint
npm run lint

# Chỉ typecheck
npm run typecheck

# Chỉ test (watch mode để debug)
npm test

# Chỉ build
npm run build

Quy tắc commit

  • KHÔNG push code nếu npm run ci thất bại
  • Viết commit message theo format: <type>(<scope>): <description>
    • Ví dụ: feat(tasks): add drag-and-drop support
    • Types: feat, fix, docs, style, refactor, test, chore

Khi CI trên Forgejo thất bại

  1. Kiểm tra logs trên Forgejo Actions để xem lỗi cụ thể
  2. Chạy npm run ci tại local để reproduce lỗi
  3. Fix lỗi và chạy lại npm run ci cho đến khi pass
  4. Push commit fix

Cấu trúc Docker

Dockerfile
├── deps stage     # Cài đặt dependencies
├── builder stage  # Build Next.js app (chạy lint + typecheck + build)
└── runner stage   # Production image (~150MB)

Image production sử dụng Next.js standalone output, chạy trên port 3000.