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
40 changes: 40 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
89 changes: 89 additions & 0 deletions .vale/Bnbairbooking.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>BnbAirBooking | Cheapest Global Hotel & Vacation Rentals</title>
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; color: #333; background-color: #f8f9fa; }
header { background: linear-gradient(135deg, #ff385c 0%, #e61e4d 100%); color: white; text-align: center; padding: 40px 20px; }
header h1 { margin: 0; font-size: 2.5em; }
header p { font-size: 1.2em; margin-top: 10px; opacity: 0.9; }
.search-container { background: white; max-width: 800px; margin: -30px auto 40px auto; padding: 30px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); text-align: center; }
.search-container h2 { color: #ff385c; margin-top: 0; }
/* REPLACE THE DIV BELOW WITH YOUR TRAVELPAYOUTS/BOOKING.COM WIDGET CODE */
.widget-placeholder { background: #f1f1f1; border: 2px dashed #ccc; padding: 40px; border-radius: 8px; color: #666; font-weight: bold; }
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; max-width: 1000px; margin: 0 auto 40px auto; padding: 0 20px; }
.feature-card { background: white; padding: 20px; border-radius: 10px; flex: 1 1 250px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; }
.feature-card h3 { color: #ff385c; }
.video-support { text-align: center; margin: 40px auto; max-width: 600px; padding: 0 20px;}
.video-support iframe { width: 100%; aspect-ratio: 16/9; border-radius: 10px; border: none; }
footer { background: #222; color: #aaa; text-align: center; padding: 30px 20px; font-size: 0.9em; }
footer a { color: #ff385c; text-decoration: none; margin: 0 10px; }
.legal-text { display: none; text-align: left; max-width: 800px; margin: 20px auto; background: white; padding: 20px; border-radius: 8px; }
.legal-text:target { display: block; }
</style>
</head>
<body>

<header>
<h1>BnbAirBooking</h1>
<p>Undercutting the market. The cheapest hotel & vacation rentals worldwide.</p>
</header>

<div class="search-container">
<h2>Find Your Perfect Stay</h2>
<p>Search millions of hotels and vacation rentals. We guarantee the lowest rates.</p>
<br>
<!-- INSTRUCTION: Paste your Travelpayouts or Booking.com Affiliate Search Widget code right here -->
<div class="widget-placeholder">
[ YOUR FREE AFFILIATE BOOKING WIDGET CODE GOES HERE ]
</div>
</div>

<div class="features">
<div class="feature-card">
<h3>💰 Cashback Rewards</h3>
<p>Get up to 10% cash back on every booking. We pass our commission directly to you.</p>
</div>
<div class="feature-card">
<h3>🤖 24/7 AI Support</h3>
<p>Our adaptive AI problem-solving system resolves booking issues instantly, day or night.</p>
</div>
<div class="feature-card">
<h3>🌍 Global Inventory</h3>
<p>From boutique vacation rentals to 5-star hotels, access the world's largest inventory.</p>
</div>
</div>

<div class="video-support">
<h2>24/7 Video Customer Service</h2>
<p>Watch our quick guide or speak with our AI support agent below.</p>
<!-- INSTRUCTION: Replace the src below with your actual YouTube Video URL -->
<iframe src="https://www.youtube.com/embed/dQw4w9WgXcQ" allowfullscreen></iframe>
</div>

<footer>
<p>&copy; 2026 BnbAirBooking. Owned and Operated by Jeremy C. Shirley.</p>
<p>
<a href="#tos">Terms of Service</a> |
<a href="#privacy">Privacy Policy</a>
</p>

<div id="tos" class="legal-text">
<h2>Terms of Service</h2>
<p><strong>Last Updated:</strong> July 10, 2026</p>
<p>Welcome to BnbAirBooking. By accessing our platform, you agree to these terms. BnbAirBooking, owned by Jeremy C. Shirley, acts solely as an intermediary and booking agent connecting Guests with independent Hosts. We do not own the listed properties. All bookings are subject to Host availability. All sales are final unless specified in the Host's cancellation policy. To the maximum extent permitted by law, BnbAirBooking and Jeremy C. Shirley shall not be liable for any indirect damages arising from your use of the Platform.</p>
</div>

<div id="privacy" class="legal-text">
<h2>Privacy Policy</h2>
<p><strong>Last Updated:</strong> July 10, 2026</p>
<p>BnbAirBooking collects necessary personal and payment data to facilitate bookings. Payment data is processed securely via encrypted third-party gateways; we do not store full credit card numbers. We share necessary booking information with your specific Host to fulfill your reservation. We do not sell your personal data. For privacy concerns or data deletion requests, contact Jeremy C. Shirley at support@bnbairbooking.com.</p>
</div>
</footer>

<!-- INSTRUCTION: Paste your free Tidio or Crisp Chat Widget script here for 24/7 AI Chat -->

</body>
</html>
1 change: 1 addition & 0 deletions .vale/Google analytics.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Binary file not shown.
47 changes: 23 additions & 24 deletions .vale/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
# Openverse Vale configuration
## Together streaming integration

Openverse runs Vale using
[Vale's PyPI distribution](https://pypi.org/project/vale/). This allows our Vale
version to be tracked in this directory's `pyproject.toml`, meaning tools like
Renovate will be aware of and update it automatically.
This repo includes a streaming AI assistant that uses the Together Python client as a backend model provider.

This approach to running Vale is intended specifically for running inside `ov`,
and will likely not work outside `ov`. Synced styles are kept in `ov`'s `opt`
directory, which prevents downloaded styles from appearing within the project
files on a contributor's computer.
How it works
- server/ai_stream.py calls Together's Python client in streaming mode and prints one JSON line per token.
- server/index.js spawns that Python script and proxies its stdout as Server-Sent Events (SSE) to /api/ai-chat-stream.
- The frontend (index.html) opens an EventSource to /api/ai-chat-stream and renders tokens as they arrive.

For more information about this motivation to avoid lists of sensitive terms in
the Openverse monorepo, refer to the README at
[WordPress/openverse-sensitive-terms](https://github.com/WordPress/openverse-sensitive-terms).
Required secrets (add these to GitHub Secrets or your host environment):
- TOGETHER_API_KEY — API key for Together (used by ai_stream.py)
- MONGO_URI — MongoDB Atlas connection string
- STRIPE_SECRET_KEY — Stripe secret key (test & live as needed)
- STRIPE_PUBLISHABLE_KEY
- STRIPE_WEBHOOK_SECRET
- TRAVELPAYOUTS_TOKEN — TravelPayouts API token

To run Vale with Openverse's configuration, use the just recipe:
Docker notes
- The server Dockerfile now installs Python and the Together Python client. Build may take a bit longer on first run.

```bash
ov just .vale/run
```
Local testing
1. Add TOGETHER_API_KEY and other required env vars locally.
2. Start the server (recommended via Docker Compose):
docker-compose up --build
3. Visit http://localhost:3000 and use the AI Autopilot panel.

Typically, it is unnecessary to run Vale directly, as pre-commit automatically
runs Vale on each commit. You only need to run Vale directly when iterating on
changes to Openverse's Vale configuration.

Refer to the `_files` recipe [in the `justfile`](./justfile) to identify which
files we currently check with Vale. A comment on the recipe explains the
rationale for that choice. The list of files will ideally expand in the future
to include all textual content in the repository.
Security notes
- Never expose TOGETHER_API_KEY or other secrets in client-side code.
- The SSE endpoint should be protected/rate-limited in production to avoid abuse and cost spikes.
Binary file added .vale/Repreeze--main.zip
Binary file not shown.
Loading
Loading