Join the Agent Deck Discord Server!
Check out the Agent Deck community on Discord – hang out with 357 other members and enjoy free voice and text chat.
A web-based crime reporting and community alert platform built with Laravel, featuring incident reporting and location-based safety information.
SocialPHP · BladeGitHub @chi-trungOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
🚨 Crime Alert Web 🚨 Website cảnh báo tội phạm, truy nã, tin tức pháp luật - xây dựng với Laravel 👋 Giới thiệu Crime Alert Web là ứng dụng web giúp cảnh báo tội phạm, cập nhật tin tức pháp luật và danh sách truy nã mới nhất từ các nguồn uy tín (VnExpress, Bộ Công An).Read the full README ↗
Crime Alert Web là ứng dụng web giúp cảnh báo tội phạm, cập nhật tin tức pháp luật và danh sách truy nã mới nhất từ các nguồn uy tín (VnExpress, Bộ Công An).
| Tính năng | Mô tả |
|---|---|
| 🚨 Cảnh báo tội phạm | Gửi, duyệt, tìm kiếm, lọc, xem bản đồ, chỉnh sửa, xóa cảnh báo |
| 👮♂️ Truy nã | Hiển thị, tìm kiếm danh sách người bị truy nã |
| 💬 Bình luận & Like | Bình luận, like/unlike bài viết và bình luận |
| 📢 Chia sẻ trải nghiệm | Gửi, duyệt, xem, xóa bài chia sẻ |
| 📰 Tin tức | Crawl, hiển thị tin tức pháp luật |
| 🤖 Chatbot AI | Hỗ trợ AI với 4 provider (Gemini, OpenAI, DeepSeek, OpenRouter) |
| 💬 Hỗ trợ trực tuyến | Chat real-time giữa user và admin |
| 🔔 Thông báo | Hệ thống notification cho like, comment, hỗ trợ |
| 📊 Dashboard | Thống kê chi tiết cho admin và user |
| 🗺️ Bản đồ tương tác | Hiển thị cảnh báo trên bản đồ Leaflet |
| 👤 Tài khoản | Đăng ký, đăng nhập, xác thực email, đổi mật khẩu, xóa tài khoản |
public/css, public/js — không cần Node.js.env)pdo_mysql/pdo_sqlite, mbstring, fileinfo, curl, openssl)Không cần Node.js/npm — toàn bộ CSS/JS là file tĩnh, thư viện (Bootstrap, Leaflet, icons) nạp qua CDN.
git clone https://github.com/chi-trung/crime-alert.git
cd crime-alert
composer install
composer setup
Lệnh này tự động: copy .env.example → .env (nếu chưa có), generate APP_KEY, tạo symlink public/storage (để hiển thị ảnh cảnh báo đã upload), và chạy migrate.
Mặc định .env dùng SQLite (database/database.sqlite) — không cần làm gì thêm.
Dùng MySQL: sửa trong .env:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=crime_alert
DB_USERNAME=root
DB_PASSWORD=
sau đó php artisan migrate:fresh --seed.
php artisan migrate:fresh --seed
AdminUserSeeder tạo tài khoản admin (email/mật khẩu đọc từ ADMIN_EMAIL / ADMIN_PASSWORD trong .env, mặc định [email protected] / ChangeMe!123). Đổi mật khẩu ngay sau lần đăng nhập đầu. Từ issue #273, seeder từ chối (throw) nếu email cấu hình đã thuộc về tài khoản không phải admin — ai đó đăng ký trước email default thì deploy sẽ fail loudly, không âm thầm thăng cấp họ; hãy đặt ADMIN_EMAIL khác trước khi seed.
DatabaseSeeder còn tạo tài khoản demo [email protected] / password (đã xác thực email) cho môi trường dev/CI. Từ issue #277, tài khoản demo này không được seed trên production (APP_ENV=production) — credential của nó nằm công khai trong repo. Nếu database từng được seed ở môi trường khác rồi đưa lên production, hãy tự xóa row [email protected].
php artisan serve
Mở http://127.0.0.1:8000. Muốn server + crawl tin tức/truy nã tự động cùng lúc:
php artisan serve:all
Key không hardcode trong source — cấu hình hoàn toàn qua .env:
CHATBOT_PROVIDER=openrouter # gemini | openai | deepseek | openrouter
GEMINI_API_KEY=
***
DEEPSEEK_API_KEY=
***
# Tùy chọn: model + header giới thiệu với OpenRouter
#OPENROUTER_MODEL=
#OPENROUTER_REFERER=
# Tùy chọn: model cho Gemini (mặc định gemini-2.5-flash)
#GEMINI_MODEL=
Provider nào trống key thì chatbot trả lời lịch sự "không khả dụng" thay vì gọi API.
⚠️ Bảo mật: các key AI cũ từng bị commit vào lịch sử git của repo (đã xóa khỏi code hiện tại). Nếu bạn vận hành repo này, hãy rotate toàn bộ key cũ và chỉ dùng key mới đặt trong
.env(đã được.gitignore).
php artisan crawl:news # Crawl tin tức pháp luật
php artisan crawl:wanted-list # Crawl danh sách truy nã
Lệnh crawl đã được lên lịch tự động trong routes/console.php
(crawl:news mỗi 30 phút, crawl:wanted-list mỗi giờ, withoutOverlapping).
Để lịch chạy trên server, thêm cron entry theo hướng dẫn Laravel scheduler:
* * * * * cd /duong-dan/toi/crime-alert && php artisan schedule:run >> /dev/null 2>&1
composer test # = php artisan test (PHPUnit, chạy trên SQLite in-memory)
vendor/bin/pint # format code style (Laravel Pint)
vendor/bin/pint --test # kiểm tra style không sửa file
crime-alert/
├── app/
│ ├── Console/Commands/ # Artisan commands (crawl:news, crawl:wanted-list, serve:all)
│ ├── Http/Controllers/ # Controllers
│ ├── Http/Middleware/ # Middleware (admin, ...)
│ ├── Models/ # Eloquent models
│ ├── Notifications/ # Notification classes
│ └── Services/ # Logic dùng chung (DashboardStatsService, ...)
├── resources/views/ # Blade templates
├── routes/ # web.php, auth.php, console.php
├── database/migrations/ # Cấu trúc CSDL
├── database/seeders/ # Dữ liệu mẫu + admin
├── public/css|js # Asset tĩnh (không có build step)
├── config/services.php # Cấu hình provider AI
├── tests/ # Feature + Unit tests
└── composer.json
php artisan serve trong routes/console.php — dùng serve:all để chạy server kèm crawl.public/storage — composer setup đã tạo sẵn; nếu tự migrate thủ công thì chạy thêm php artisan storage:link.isAdmin trên bảng users (không phải Spatie Permission).composer test và vendor/bin/pint --test trước khi merge (CI kiểm tra trên cả SQLite lẫn MySQL).