Skip to content
Open
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
52 changes: 41 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,47 @@ These are more like model airplanes. They're dramatically simplified to make it
But the leanness makes these useful for agent-driven development. Use these as context to help your agent make better integration decisions about PostHog.

```
examples/
├── basics/
│ ├── next-app-router/ # Next.js 15 with App Router
│ ├── next-pages-router/ # Next.js 15 with Pages Router
│ ├── react-react-router/ # React with React Router
│ ├── react-tanstack-router-file-based/ # React with TanStack Router (file-based)
│ ├── react-tanstack-router-code-based/ # React with TanStack Router (code-based)
│ ├── tanstack-start/ # TanStack Start
│ └── django/ # Django
├── mcp-commands/ # MCP command prompts (`/command` in agents)
└── scripts/ # Build scripts
example-apps/
├── android/ # Android (Kotlin)
├── angular/ # Angular
├── astro-hybrid/ # Astro, hybrid rendering
├── astro-ssr/ # Astro, server-side rendering
├── astro-static/ # Astro, static output
├── astro-view-transitions/ # Astro with View Transitions
├── django/ # Django
├── elixir/ # Phoenix (Elixir)
├── expo/ # Expo (React Native)
├── fastapi/ # FastAPI
├── flask/ # Flask
├── flutter/ # Flutter
├── go/ # Go (net/http)
├── java-spring-boot/ # Spring Boot (Java)
├── javascript-node/ # Node.js (Express, server-side)
├── javascript-web/ # Plain JavaScript, browser
├── laravel/ # Laravel
├── next-app-router/ # Next.js 15 with App Router
├── next-pages-router/ # Next.js 15 with Pages Router
├── nuxt-3-6/ # Nuxt 3.6
├── nuxt-4/ # Nuxt 4
├── php/ # Plain PHP
├── python/ # Plain Python
├── react-native/ # React Native
├── react-react-router-6/ # React with React Router 6
├── react-react-router-7-data/ # React Router 7, data mode
├── react-react-router-7-declarative/ # React Router 7, declarative mode
├── react-react-router-7-framework/ # React Router 7, framework mode
├── react-tanstack-router-code-based/ # TanStack Router, code-based
├── react-tanstack-router-file-based/ # TanStack Router, file-based
├── react-vite/ # React with Vite
├── ruby/ # Plain Ruby
├── ruby-on-rails/ # Ruby on Rails
├── rust/ # Rust (Axum)
├── sveltekit/ # SvelteKit
├── swift/ # Swift (iOS)
├── swift-xcodegen/ # Swift with XcodeGen
├── tanstack-start/ # TanStack Start
├── vue-3/ # Vue 3
└── wordpress/ # WordPress
```

## Build outputs
Expand Down
4 changes: 2 additions & 2 deletions example-apps/expo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A React Native Expo app demonstrating PostHog product analytics integration with
## Project Structure

```
basics/expo/
example-apps/expo/
├── app/ # Expo Router screens (file-based routing)
│ ├── _layout.tsx # Root layout with PostHogProvider + AuthProvider
│ ├── index.tsx # Home screen (login/welcome)
Expand Down Expand Up @@ -68,7 +68,7 @@ Then run `source ~/.zshrc` to apply.

1. Install dependencies:
```bash
cd basics/expo
cd example-apps/expo
npm install
```

Expand Down
2 changes: 1 addition & 1 deletion example-apps/fastapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The `/api/test-error` endpoint demonstrates manual exception capture. Use `?capt
## Project Structure

```
basics/fastapi/
example-apps/fastapi/
├── app/
│ ├── __init__.py # Package marker
│ ├── config.py # Pydantic Settings configuration
Expand Down
2 changes: 1 addition & 1 deletion example-apps/flask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The `/api/test-error` endpoint demonstrates manual exception capture. Use `?capt
## Project Structure

```
basics/flask/
example-apps/flask/
├── app/
│ ├── __init__.py # Application factory
│ ├── config.py # Configuration classes
Expand Down
2 changes: 1 addition & 1 deletion example-apps/javascript-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The app tracks these events in PostHog:
## Code structure

```
basics/javascript-node/
example-apps/javascript-node/
├── todo.js # Express server with PostHog tracking
├── package.json # Node.js dependencies
├── .env.example # Environment variable template
Expand Down
2 changes: 1 addition & 1 deletion example-apps/javascript-web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The app tracks these custom events in PostHog (in addition to autocaptured click
## Code Structure

```
basics/javascript/
example-apps/javascript-web/
├── index.html # Entry HTML page
├── package.json # Dependencies (posthog-js, vite)
├── vite.config.js # Vite configuration
Expand Down
2 changes: 1 addition & 1 deletion example-apps/laravel/IMPLEMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This document summarizes the implementation of the Laravel PostHog example appli
## 📁 File Structure

```
basics/laravel/
example-apps/laravel/
├── app/
│ ├── Http/
│ │ ├── Controllers/
Expand Down
2 changes: 1 addition & 1 deletion example-apps/laravel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ The `/api/test-error` endpoint demonstrates manual exception capture. Use `?capt
## Project Structure

```
basics/laravel/
example-apps/laravel/
├── app/
│ ├── Http/
│ │ ├── Controllers/
Expand Down
2 changes: 1 addition & 1 deletion example-apps/php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The app tracks these events in PostHog:
## Code Structure

```
basics/php/
example-apps/php/
├── todo.php # Main CLI application
├── composer.json # PHP dependencies
├── .env.example # Environment variable template
Expand Down
2 changes: 1 addition & 1 deletion example-apps/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ The app tracks these events in PostHog:
## Code Structure

```
basics/python/
example-apps/python/
├── todo.py # Main CLI application
├── requirements.txt # Python dependencies
├── .env.example # Environment variable template
Expand Down
2 changes: 1 addition & 1 deletion example-apps/ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The app tracks these events in PostHog:
## Code Structure

```
basics/ruby/
example-apps/ruby/
├── todo.rb # Main CLI application
├── Gemfile # Ruby dependencies
├── .env.example # Environment variable template
Expand Down
Loading