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
8 changes: 8 additions & 0 deletions findyo/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Example environment variables for Findyo - Pet Travel Assistant
# Copy this file to .env and replace with your actual values

# Google Maps API Key - Get this from Google Cloud Console
# Required APIs: Maps JavaScript API, Places API, Geocoding API
# Get your API key from: https://developers.google.com/maps/documentation/javascript/get-api-key
# IMPORTANT: Never commit your actual API key to the repository!
REACT_APP_GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
59 changes: 59 additions & 0 deletions findyo/.github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy Findyo to GitHub Pages

on:
push:
branches: [ main, master ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci

- name: Debug environment variables
run: |
echo "Checking environment variables..."
echo "REACT_APP_GOOGLE_MAPS_API_KEY is: ${{ secrets.REACT_APP_GOOGLE_MAPS != '' && 'SET' || 'NOT SET' }}"

- name: Build
run: npm run build
env:
CI: false
REACT_APP_GOOGLE_MAPS_API_KEY: ${{ secrets.REACT_APP_GOOGLE_MAPS }}

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
30 changes: 30 additions & 0 deletions findyo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Dependencies
/node_modules
/.pnp
.pnp.js

# Testing
/coverage

# Production
/build

# Misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# IDE
.vscode/
.idea/

# OS
Thumbs.db
54 changes: 54 additions & 0 deletions findyo/DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Findyo Deployment Guide

## Quick Start for GitHub Deployment

### 1. Create a New Repository on GitHub
1. Go to GitHub.com and create a new repository named `findyo`
2. **Do NOT initialize with README, .gitignore, or license** (we already have these)

### 2. Update Configuration
1. Open `package.json` and replace `yourusername` in the homepage field with your actual GitHub username:
```json
"homepage": "https://YOUR_GITHUB_USERNAME.github.io/findyo"
```

### 3. Add Your Google Maps API Key to GitHub Secrets
1. Go to your repository on GitHub
2. Click Settings → Secrets and variables → Actions
3. Click "New repository secret"
4. Name: `REACT_APP_GOOGLE_MAPS_API_KEY`
5. Value: Your Google Maps API key from the `.env` file

### 4. Push to GitHub
```bash
git remote add origin https://github.com/YOUR_GITHUB_USERNAME/findyo.git
git branch -M main
git push -u origin main
```

### 5. Enable GitHub Pages
1. Go to repository Settings → Pages
2. Source: Deploy from a branch
3. Branch: Select `gh-pages` (will be created automatically after first deployment)
4. Click Save

### 6. Wait for Deployment
- The GitHub Action will automatically build and deploy your app
- Check the Actions tab to see deployment progress
- Your app will be live at: `https://YOUR_GITHUB_USERNAME.github.io/findyo`

## Manual Deployment (Alternative)
If you prefer manual deployment:
```bash
npm run deploy
```

## Environment Variables
- The app works without Google Maps API key (shows placeholder)
- For full functionality, add your API key to GitHub Secrets
- Local development: copy `.env.example` to `.env` and add your key

## Troubleshooting
- If deployment fails, check the Actions tab for error logs
- Ensure your API key is correctly set in GitHub Secrets
- Make sure the homepage URL in package.json matches your repository
106 changes: 106 additions & 0 deletions findyo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Findyo 🐾

Findyo is a pet-friendly travel assistant that helps pet owners find accommodations, veterinary services, and travel resources for seamless adventures with their furry companions.

## Purpose

- **Pet Travel Planning**: Find pet-friendly hotels, restaurants, and activities
- **Emergency Veterinary Services**: Locate nearby vets and pet hospitals during travel
- **Travel Tips & Guidance**: Get expert advice for traveling with pets
- **Interactive Chat Support**: AI-powered assistance for all your pet travel questions

## Tech Stack

- **Frontend**: React + TypeScript
- **Styling**: Modern CSS with CSS Variables, Custom Components
- **Mapping**: Google Maps JavaScript API
- **Fonts**: Plus Jakarta Sans, Inter
- **Deployment**: GitHub Pages via GitHub Actions

## Features

- **AI Chat Interface**: Intelligent pet travel assistant with quick action buttons
- **Interactive Map**: Find pet-friendly services with color-coded markers
- **Travel Tips Library**: Comprehensive tips organized by categories
- **Responsive Design**: Works seamlessly on desktop and mobile devices
- **Responsive Design**: The application is designed to be mobile-friendly and accessible.

## Installation

To get started with the HopeFinder project, follow these steps:

## Installation & Development

1. Clone the repository:
```bash
git clone <repository-url>
cd findyo
```

2. Install dependencies:
```bash
npm install
```

3. Set up environment variables:
```bash
cp .env.example .env
# Edit .env and add your Google Maps API key
```

4. Start the development server:
```bash
npm start
```

## Deployment to GitHub Pages

This project is configured for automatic deployment to GitHub Pages using GitHub Actions.

### Setup Steps:

1. **Fork/Clone** this repository to your GitHub account

2. **Add your Google Maps API Key** as a GitHub Secret:
- Go to your repository → Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name: `REACT_APP_GOOGLE_MAPS_API_KEY`
- Value: Your actual Google Maps API key

3. **Update package.json homepage**:
- Replace `yourusername` in the homepage URL with your GitHub username
- `"homepage": "https://yourusername.github.io/findyo"`

4. **Enable GitHub Pages**:
- Go to repository Settings → Pages
- Source: Deploy from a branch
- Branch: `gh-pages` (this will be created automatically by the action)

5. **Push to main/master branch** - the deployment will happen automatically!

### Local Development with Environment Variables

1. Copy `.env.example` to `.env`
2. Add your Google Maps API key
3. The app will work fully with maps integration

### Production Deployment

- The app gracefully handles missing API keys by showing a placeholder
- All sensitive information is kept in GitHub Secrets
- Automatic builds and deployments via GitHub Actions

## Usage

- **Chat with Findyo**: Get personalized pet travel assistance
- **Find Services**: Use quick buttons to find hotels, vets, or get travel tips
- **Interactive Map**: Explore pet-friendly locations (requires API key)
- **Travel Tips**: Browse categorized travel advice for pets

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is a non-commercial public-good prototype. Please respect the purpose and intent of the application when using or modifying the code.
32 changes: 32 additions & 0 deletions findyo/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 🔒 SECURITY NOTICE

## API Key Security

This repository has been configured to handle Google Maps API keys securely:

### ✅ What's Protected
- `.env` files are in `.gitignore` and never committed
- Build folder is excluded from repository
- API keys are only loaded from environment variables
- Graceful fallback when API key is missing

### 🚨 If You Expose an API Key
1. **Immediately regenerate** your Google Maps API key in Google Cloud Console
2. **Delete the exposed key** to prevent unauthorized usage
3. **Add domain restrictions** to your new API key
4. **Never commit** `.env` files or build folders

### 🛡️ Best Practices
- Always use GitHub Secrets for deployment
- Test locally with `.env` file (not committed)
- Monitor your Google Cloud Console for unusual API usage
- Set up billing alerts and quotas

### 📞 Need Help?
If you accidentally expose an API key:
1. Go to [Google Cloud Console](https://console.cloud.google.com/apis/credentials)
2. Delete or regenerate the compromised key immediately
3. Create a new key with proper restrictions
4. Update your GitHub Secrets

**Remember: Security is a shared responsibility!**
Loading