Survival LLM
A free AI assistant and survival library (1.5 million offline articles) that runs on your own computer, with no internet. Shows the source of every answer. Mac and Windows.
Ota-onalar va maktablar uchun xavf xaritasi, xavfsiz yo'nalish va favqulodda yordam.
Translation pending
OtherTypeScript · PythonGitHub @mvhda571OnlineOwner 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
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Ota-onalar va maktablar uchun xavf xaritasi: xavf qo'shish, "+1 Men ham ko'rdim", xavfsiz yo'nalish, 500 m radar, favqulodda raqamlar, moderator paneli va Telegram xabarnomalari. UZ / RU / EN, dark/light.
npm install
cp .env.example .env.local # MONGODB_URI ni to'ldiring (oxirida /safeway)
npm run seed # demo foydalanuvchilar + Toshkent bo'ylab 14 ta demo xavf
npm run dev # http://localhost:3000
npm run seed -- --reset — xavflar, rasmlar va Telegram jurnalini tozalab, demo ma'lumotlarni qayta yozadi.
Demo hisoblar (login sahifasida faqat DEMO_MODE=true bo'lsa ko'rinadi):
| Rol | Parol | |
|---|---|---|
| Parent | [email protected] | parent123 |
| School Admin | [email protected] | school123 |
| Super Admin | [email protected] | admin123 |
app/
page.tsx, landing.tsx Bosh sahifa (hero, statistika, so'nggi xabarlar)
map/ Xarita + filtrlar + "Atrofimdagi xavflar" (500 m, GPS kuzatuvi)
hazards/[id]/ Xavf sahifasi: holat kuzatuvi (Mavjud → O'rganilmoqda → Bartaraf etildi)
route/ Xavfsiz yo'nalish (Uy → Maktab)
login/ Kirish / Ro'yxatdan o'tish
admin/ Moderator paneli: KPI, grafiklar, jadval, Telegram log
api/
auth/{login,signup,logout,me}
hazards/ GET (filtr: category, status, lat/lng/radius), POST (6 ta / 10 daqiqa)
hazards/[id] GET; PATCH (status/severity/category), DELETE — faqat admin (aks holda 403)
hazards/[id]/confirm POST — "+1", har foydalanuvchi bir marta (takror → 409)
upload, uploads/[id] Rasm MongoDB'da (klientda ≤ 1280 px, ≤ 2 MB)
route-plan OSRM + xavf bo'yicha baholash + aylanma yo'l
geocode Nominatim manzil qidiruvi (server orqali)
admin/stats Dashboard statistikasi
components/ App shell, bottom nav, SOS panel, report modal, xarita, kartochkalar
lib/
db.ts MongoDB ulanishi (global kesh) + Mongoose modellari
store.ts Ma'lumotlar qatlami (API javob shakli shu yerda)
auth.ts JWT (jose) + httpOnly cookie, rollar
routing.ts Xavfsiz yo'nalish algoritmi
telegram.ts Telegram xabar shabloni va yuborish
i18n.ts UZ / RU / EN lug'atlar
proxy.ts /admin uchun optimistik himoya (API har so'rovda rolni qayta tekshiradi)
scripts/seed.ts Demo ma'lumotlar
BOT_TOKEN va TELEGRAM_CHANNEL_ID (masalan @safeway_parents yoki -100…) ni kiriting, botni kanalga admin qiling.
Har bir yangi 🔴 yuqori xavf kanalga yuboriladi: tur, manzil, izoh, Google Maps va saytdagi xavf sahifasi havolasi.
Telegram xato bersa ham xavf saqlanadi; natija admin panelidagi jurnalda ko'rinadi. O'zgaruvchilar bo'sh bo'lsa — simulyatsiya.
bot/)Python (aiogram) bot sayt bilan bitta bazada ishlaydi (bot/.env: BOT_TOKEN, MONGODB_URI, MONGODB_DB=safeway, ADMIN_IDS).
cd bot && pip install -r requirements.txt && python bot.py
users kolleksiyasida, sayt hisoblari webusersda.voters + upvotes; bot rasmlari hazardimagesda (saytda ham ko'rinadi).botNotifiedAt bilan bir marta).npm run migrate (qayta ishga tushirish xavfsiz)./stats — hammaga ochiq, faqat o'qish uchun (GET /api/stats). Admin amallari (status, o'chirish) faqat /adminda.
Site settings → Environment variables: MONGODB_URI, AUTH_SECRET, BOT_TOKEN, TELEGRAM_CHANNEL_ID,
NEXT_PUBLIC_INSPECTOR_PHONE, DEMO_MODE. NEXT_PUBLIC_* va DEMO_MODE build vaqtida o'qiladi — o'zgartirgandan keyin
qayta deploy qiling. MongoDB Atlas → Network Access: 0.0.0.0/0 (Netlify funksiyalari IP manzili o'zgarib turadi).
Barcha ma'lumotlar (xavflar, ovozlar, statuslar, rasmlar) Atlas'da — qayta deploy yoki funksiya qayta ishga tushishi ularga ta'sir qilmaydi.