Skip to content

Commit 3f40032

Browse files
authored
Merge branch 'main' into fact-dynamics
2 parents 994045f + c17d4f5 commit 3f40032

File tree

6 files changed

+2075
-0
lines changed

6 files changed

+2075
-0
lines changed

.github/workflows/pr-validation.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: MDX Validation
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/**'
9+
10+
jobs:
11+
mdx-validation:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
cache: 'npm'
22+
23+
- name: MDX validation dependencies
24+
run: npm install --save-dev @mdx-js/mdx @mdx-js/loader glob
25+
26+
- name: Validate MDX files
27+
run: node scripts/validate-mdx.js
28+
29+
- name: Check for broken links
30+
run: |
31+
# Simple check for common broken link patterns
32+
echo "Checking for potential broken links..."
33+
if grep -r "http://localhost\|http://127.0.0.1" docs/; then
34+
echo "❌ Found localhost links that should be removed"
35+
exit 1
36+
fi
37+
echo "✅ No obvious broken links found"
38+
39+
- name: Validate frontmatter
40+
run: |
41+
# Check that all MDX files have required frontmatter
42+
find docs -name "*.mdx" -type f | while read file; do
43+
if ! head -n 10 "$file" | grep -q "^---$"; then
44+
echo "❌ $file - Missing frontmatter (no --- markers)"
45+
exit 1
46+
fi
47+
echo "✅ $file - Has frontmatter"
48+
done

docs/showcase/briefo.mdx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Briefo | Perplexity Powered News & Finance Social App
3+
description: AI curated newsfeed, social discussion, and deep research reports built on the Sonar API
4+
sidebar_position: 1
5+
keywords: [Briefo, finance, news, social media, React Native, Supabase]
6+
---
7+
8+
# Briefo | Perplexity Powered News & Finance Social App
9+
10+
**Briefo** delivers a personalized, AI generated newsfeed and company deep dives. Readers can follow breaking stories, request on demand financial analyses, and discuss insights with friends, all in one mobile experience powered by Perplexity’s Sonar API.
11+
12+
## Features
13+
14+
* Personalized newsfeed across 17 categories with AI summaries and source links
15+
* Private and public threads for article discussion and sharing
16+
* Watch list with real time market snapshots and optional AI analyses
17+
* Deep research reports generated on 12 selectable criteria such as management, competitors, and valuation
18+
* General purpose chat assistant that remembers each user’s preferred topics
19+
20+
## Prerequisites
21+
22+
* Node 18 LTS or newer
23+
* npm, Yarn, or pnpm
24+
* Expo CLI (`npm i -g expo-cli`)
25+
* Supabase CLI 1.0 or newer for local emulation and Edge Function deploys
26+
27+
## Installation
28+
29+
git clone https://github.com/adamblackman/briefo-public.git
30+
cd briefo-public
31+
npm install
32+
### Environment variables
33+
34+
# .env (project root)
35+
MY_SUPABASE_URL=https://<project>.supabase.co
36+
MY_SUPABASE_SERVICE_ROLE_KEY=...
37+
PERPLEXITY_API_KEY=...
38+
LINKPREVIEW_API_KEY=...
39+
ALPACA_API_KEY=...
40+
ALPACA_SECRET_KEY=...
41+
42+
# .env.local (inside supabase/)
43+
# duplicate or override any secrets needed by Edge Functions
44+
45+
## Usage
46+
Run the Expo development server:
47+
48+
npx expo start
49+
50+
Deploy Edge Functions when you are ready:
51+
52+
supabase functions deploy perplexity-news perplexity-chat perplexity-research portfolio-tab-data
53+
54+
## Code Explanation
55+
56+
* Frontend: React Native with Expo Router (TypeScript) targeting iOS, Android, and Web
57+
* Backend: Supabase (PostgreSQL, Row Level Security, Realtime) for data and authentication
58+
* Edge Functions: TypeScript on Deno calling Perplexity, Alpaca, Alpha Vantage, and LinkPreview APIs
59+
* Hooks: Reusable React Query style data hooks live in lib/ and hooks/
60+
* Testing and Linting: ESLint, Prettier, and Expo Lint maintain code quality
61+
62+
## Links
63+
https://github.com/adamblackman/briefo-public
64+
https://www.briefo.fun/

docs/showcase/perplexity-flutter.mdx

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Perplexity Dart & Flutter SDKs
3+
description: Lightweight, type-safe SDKs for seamless Perplexity API integration in Dart and Flutter applications
4+
sidebar_position: 3
5+
keywords: [Perplexity, Flutter, Dart, SDK, API, streaming, chat-completions, sonar, type-safe, widgets]
6+
---
7+
8+
# Perplexity Dart & Flutter SDKs
9+
10+
**Perplexity Dart & Flutter SDKs** provide comprehensive toolkit for integrating Perplexity's AI capabilities into Dart and Flutter applications. Built specifically for the Flutter community, these packages include a lightweight core API client and ready-to-use Flutter widgets with BLoC state management.
11+
12+
## Features
13+
14+
* Type-safe API client with fully typed models and compile-time safety
15+
* Streaming and non-streaming chat completions with real-time response handling
16+
* Support for all Perplexity models (Sonar, Sonar Pro, Deep Research, Reasoning variants)
17+
* Multi-image processing with base64, data URI, and HTTPS URL support
18+
* Ready-to-use Flutter widgets with BLoC state management integration
19+
* Advanced configuration options (temperature, top-p, search filters, domain restrictions)
20+
* Cross-platform support for iOS, Android, Web, and Desktop
21+
* Future-proof design with custom model string support for new Perplexity releases
22+
23+
## Prerequisites
24+
25+
* Dart SDK 2.17.0 or newer
26+
* Flutter SDK 3.0.0 or newer (for Flutter-specific features)
27+
* Perplexity API key from Perplexity API Console
28+
* Basic knowledge of Flutter BLoC pattern for widget integration
29+
30+
## Installation
31+
32+
### For Dart Projects (Core API Only)
33+
34+
```bash
35+
dart pub add perplexity_dart
36+
```
37+
38+
### For Flutter Projects (Full Widget Support)
39+
40+
```bash
41+
flutter pub add perplexity_flutter
42+
```
43+
44+
### Environment variables
45+
46+
```dart
47+
// Add to your app's configuration
48+
const String perplexityApiKey = 'your_perplexity_api_key_here';
49+
```
50+
51+
## Usage
52+
53+
**Core API Integration:**
54+
- Type-safe client with all Perplexity models (Sonar, Sonar Pro, Deep Research, Reasoning)
55+
- Streaming and non-streaming chat completions
56+
- Multimodal processing with flexible MessagePart system for text + images
57+
58+
**Flutter Widget Layer:**
59+
- `ChatWrapperWidget` for BLoC state management
60+
- `PerplexityChatView` for real-time message display
61+
- `PerplexityChatInput` for user interaction handling
62+
63+
## Code Explanation
64+
65+
* Core Layer: Pure Dart API client (`perplexity_dart`) for cross-platform Perplexity API integration
66+
* UI Layer: Flutter widgets (`perplexity_flutter`) with BLoC state management for rapid development
67+
* Type Safety: Fully typed models and responses prevent runtime errors and provide IntelliSense
68+
* Multimodal: Flexible MessagePart system for combining text and images in single requests
69+
* Streaming: Built-in support for real-time chat completions with proper chunk handling
70+
* Architecture: Two-layer design allows lightweight API usage or full Flutter widget integration
71+
72+
## Architecture
73+
74+
**Two-layer design:**
75+
- **Core (`perplexity_dart`)** - Pure Dart API client for all platforms
76+
- **UI (`perplexity_flutter`)** - Flutter widgets + BLoC state management
77+
78+
Uses flexible MessagePart system for multimodal content combining text and images.
79+
## Links
80+
81+
**Packages:**
82+
- [perplexity_dart on pub.dev](https://pub.dev/packages/perplexity_dart) | [GitHub](https://github.com/vishnu32510/perplexity_dart)
83+
- [perplexity_flutter on pub.dev](https://pub.dev/packages/perplexity_flutter) | [GitHub](https://github.com/vishnu32510/perplexity_flutter)
84+
85+
**Examples:**
86+
- [Flutter Example App](https://github.com/vishnu32510/perplexity_dart/tree/main/example_flutter_app)
87+
- [Dart Examples](https://github.com/vishnu32510/perplexity_dart/tree/main/example)
88+
89+
**Contributing:** Issues and PRs welcome on both repositories.

0 commit comments

Comments
 (0)