Files
gooseek/services/geo-device-svc
home 06fe57c765 feat: Go backend, enhanced search, new widgets, Docker deploy
Major changes:
- Add Go backend (backend/) with microservices architecture
- Enhanced master-agents-svc: reranker, content-classifier, stealth-crawler,
  proxy-manager, media-search, fastClassifier, language detection
- New web-svc widgets: KnowledgeCard, ProductCard, ProfileCard, VideoCard,
  UnifiedCard, CardGallery, InlineImageGallery, SourcesPanel, RelatedQuestions
- Improved discover-svc with discover-db integration
- Docker deployment improvements (Caddyfile, vendor.sh, BUILD.md)
- Library-svc: project_id schema migration
- Remove deprecated finance-svc and travel-svc
- Localization improvements across services

Made-with: Cursor
2026-02-27 04:15:32 +03:00
..

Geo Device Service

Сервис определения геопозиции, устройства и браузера пользователя.

Возможности

  • Геолокация по IP — offline lookup через geoip-lite (MaxMind GeoLite)
  • Device — тип (desktop/mobile/tablet), vendor, model
  • Browser — имя, версия
  • OS — операционная система и версия
  • Client context — при POST с body: screen size, timezone, language, hardwareConcurrency, deviceMemory, doNotTrack

API

GET /api/context

Возвращает контекст на основе IP и заголовков запроса.

POST /api/context

Принимает дополнительные данные от клиента (geo из Geolocation API, размер экрана, timezone и т.д.) и объединяет с серверными данными.

Body:

{
  "geo": {
    "latitude": 55.7558,
    "longitude": 37.6173,
    "city": "Moscow",
    "country": "Russia",
    "timezone": "Europe/Moscow"
  },
  "client": {
    "screenWidth": 1920,
    "screenHeight": 1080,
    "viewportWidth": 1920,
    "viewportHeight": 969,
    "devicePixelRatio": 2,
    "timezone": "Europe/Moscow",
    "language": "en",
    "languages": ["en", "ru"],
    "platform": "MacIntel",
    "hardwareConcurrency": 8,
    "deviceMemory": 8,
    "cookieEnabled": true,
    "doNotTrack": null
  }
}

Запуск

Deploy via ./deploy/k3s/deploy.sh (K8s)
# или
PORT=4002 npm start