Skip to content

docs(showcase): CityPulse - AI-powered Geospatial Search with Sonar API #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions docs/showcase/citypulse-ai-search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: CityPulse - AI-Powered Geospatial Discovery Search
description: Real-time local discovery search using Perplexity AI for personalized location insights and recommendations
sidebar_position: 2
keywords: [perplexity, geospatial, location, real-time, maps, local-discovery, sonar]
---

# CityPulse - AI-Powered Geospatial Discovery

![CityPulse Main Interface](https://raw.githubusercontent.com/anevsky/CityPulse/main/assets/CityPulse-GeoSearch-App-1.jpg)

CityPulse is an intelligent location-based discovery search that helps users explore what's happening around them right now. It demonstrates how to create personalized, real-time local insights using Perplexity's Sonar models.

[![Demo Video](https://cdn.loom.com/sessions/thumbnails/6507fa27571442e680edf787b0f0690d-2fa2c36169822631-full-play.gif)](https://youtu.be/Y0UIhh3diJg)

## What CityPulse Does

- **Real-time local discovery** - Find current events, restaurants, and local alerts near any location
- **AI-powered search suggestions** - Get intelligent search recommendations as you type
- **Personalized insights** - Receive AI-generated advice on what to try, best times to visit, and pro tips
- **Interactive mapping** - Explore results on an interactive map with custom markers and detailed popups

![Search Interface](https://raw.githubusercontent.com/anevsky/CityPulse/main/assets/CityPulse-GeoSearch-App-2.jpg)

## How It Uses Perplexity Sonar

CityPulse leverages two key Perplexity models:

**Sonar for Real-Time Data**
```python
# Get current local information with geographic context
response = client.chat.completions.create(
model="sonar",
messages=[{
"role": "user",
"content": f"Find current events, restaurants, and alerts near {lat}, {lng}"
}],
response_format={"type": "json_schema", "json_schema": {"schema": LOCAL_INFO_SCHEMA}}
)
```

**Sonar Reasoning for Personalized Insights**
```python
# Generate AI-powered location recommendations
response = client.chat.completions.create(
model="sonar-reasoning",
messages=[{
"role": "user",
"content": f"Provide personalized insights for {location_name}: what to try, best times to visit, pro tips"
}]
)
```

The app uses structured JSON schemas to ensure consistent data formatting and includes citation tracking for source verification.

![AI Insights](https://raw.githubusercontent.com/anevsky/CityPulse/main/assets/CityPulse-GeoSearch-App-3.jpg)

## Links

- [GitHub Repository](https://github.com/anevsky/CityPulse)
- [Live Demo](https://citypulse-ppx.uc.r.appspot.com/)
- [Video Demo](https://youtu.be/Y0UIhh3diJg)
- **[Built with ❤️ by Alex Nevsky](https://alexnevsky.com)**
2 changes: 1 addition & 1 deletion docs/showcase/fact-dynamics.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Fact Dynamics | Real-time Fact-Checking Flutter App
description: Cross-platform app for real-time fact-checking of debates, speeches, and images using Perplexity's Sonar API
sidebar_position: 2
sidebar_position: 3
keywords: [Fact Dynamics, fact-checking, Flutter, Dart, real-time, speech-to-text, debate, image verification]
---

Expand Down
2 changes: 1 addition & 1 deletion docs/showcase/perplexity-flutter.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Perplexity Dart & Flutter SDKs
description: Lightweight, type-safe SDKs for seamless Perplexity API integration in Dart and Flutter applications
sidebar_position: 3
sidebar_position: 4
keywords: [Perplexity, Flutter, Dart, SDK, API, streaming, chat-completions, sonar, type-safe, widgets]
---

Expand Down