Skip to content

Comments

feat: Free IP lookup tool#463

Merged
Blaumaus merged 1 commit intomainfrom
feature/ip-geolocation-free-tool
Jan 21, 2026
Merged

feat: Free IP lookup tool#463
Blaumaus merged 1 commit intomainfrom
feature/ip-geolocation-free-tool

Conversation

@Blaumaus
Copy link
Member

@Blaumaus Blaumaus commented Jan 21, 2026

Changes

If applicable, please describe what changes were made in this pull request.

Community Edition support

  • Your feature is implemented for the Swetrix Community Edition
  • This PR only updates the Cloud (Enterprise) Edition code (e.g. Paddle webhooks, blog, payouts, etc.)

Database migrations

  • Clickhouse / MySQL migrations added for this PR
  • No table schemas changed in this PR

Documentation

  • You have updated the documentation according to your PR
  • This PR did not change any publicly documented endpoints

Summary by CodeRabbit

  • New Features

    • Added IP Lookup tool for geolocation analysis with server-driven lookups and client-side form interaction
    • Features: IP detection/validation, country & city, timezone, coordinates, IP version, EU status, country flag, JSON‑LD FAQ for SEO, and a lazily loaded interactive map
  • Navigation

    • Tool added to Tools menu, routes, and Footer navigation
  • Style

    • Minor UI formatting refinements

✏️ Tip: You can customize this high-level summary in your review settings.

@Blaumaus Blaumaus self-assigned this Jan 21, 2026
@Blaumaus
Copy link
Member Author

@coderabbitai please review

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Adds a new IP Lookup tool: backend ToolsModule with controller/service for geolocation lookups (MaxMind), extended geo utilities and DTOs; frontend route, API helpers, navigation, and a full IP Lookup page with lazy-loaded map, results UI, and FAQ/SEO markup.

Changes

Cohort / File(s) Summary
Backend: Tools feature
backend/apps/cloud/src/app.module.ts, backend/apps/cloud/src/tools/tools.module.ts, backend/apps/cloud/src/tools/tools.controller.ts, backend/apps/cloud/src/tools/tools.service.ts
New ToolsModule registered in AppModule; ToolsController exposes GET endpoint for IP lookups with validation, rate-limiting, analytics; ToolsService performs IP version detection, EU membership check, and returns IpLookupResponseDto.
Backend: Utilities & DTOs
backend/apps/cloud/src/common/utils.ts, backend/apps/cloud/src/tools/dto/ip-lookup.dto.ts
Adds ExtendedGeoDetails and getExtendedGeoDetails() mapping MaxMind data; adds IpLookupQueryDto and IpLookupResponseDto with comprehensive geo/IP fields.
Frontend: API & server helpers
web/app/api/api.server.ts
Exports getClientIP, adds IpLookupResponse interface and getIpLookupServer() server fetch helper; consolidated SSO type export formatting.
Frontend: IP Lookup page & route
web/app/routes/tools.ip-lookup.tsx, web/app/routes/tools._index.tsx, web/app/utils/routes.ts
New route /tools/ip-lookup with loader/action, client form, result panel, lazy Leaflet map, FAQ (JSON‑LD), and TOOLS grid entry; route added to routes map.
Frontend: Navigation / Footer
web/app/components/Footer/index.tsx
Adds IP Lookup link(s) to footer navigation lists and updates rendering to accept optional name fields.
Frontend: Minor formatting changes
web/app/pages/Project/View/ViewProject.helpers.tsx, web/app/pages/Project/View/ViewProject.tsx
Stylistic/formatting adjustments only; no behavioral changes.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant Browser as Browser (UI)
    participant Frontend as Frontend Server
    participant Backend as Backend API
    participant GeoIP as GeoIP DB

    User->>Browser: enter IP / submit form
    Browser->>Frontend: POST /tools/ip-lookup (or loader GET)
    Frontend->>Backend: GET /tools/ip-lookup?ip=...
    Backend->>GeoIP: query MaxMind (lookup)
    GeoIP-->>Backend: geo data (country, city, region, coords, tz...)
    Backend->>Backend: determine IP version, EU status
    Backend-->>Frontend: IpLookupResponseDto (geo + metadata)
    Frontend-->>Browser: render results, map (lazy load)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through bytes and packets bright,
Searched the globe by IP light,
Map unfurls and flags appear,
Timezones, cities—everything near. ✨

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

@Blaumaus: I'll review the changes in this PR now.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Blaumaus Blaumaus merged commit 7cc80cf into main Jan 21, 2026
5 of 7 checks passed
This was referenced Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant