Skip to content

Commit 22d5649

Browse files
committed
Add initial version
1 parent 1d02c83 commit 22d5649

27 files changed

Lines changed: 5526 additions & 0 deletions

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change to 'master' if that's your default branch
7+
workflow_dispatch: # Allows manual triggering from GitHub Actions tab
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: './dist'
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

DEPLOYMENT.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# GitHub Pages Deployment for RowState
2+
3+
## Automatic Deployment Setup
4+
5+
This repository is configured to automatically deploy to GitHub Pages whenever you push to the `main` branch.
6+
7+
## Setup Instructions
8+
9+
### 1. Enable GitHub Pages
10+
11+
1. Go to your repository on GitHub
12+
2. Click **Settings****Pages** (in the left sidebar)
13+
3. Under **Source**, select **GitHub Actions**
14+
4. Save the settings
15+
16+
### 2. Push Your Code
17+
18+
```bash
19+
git add .
20+
git commit -m "Add GitHub Pages deployment"
21+
git push origin main
22+
```
23+
24+
The GitHub Action will automatically:
25+
- Build your app
26+
- Deploy to GitHub Pages
27+
- Make it available at: `https://[your-username].github.io/RowState/`
28+
29+
### 3. Access Your Deployed App
30+
31+
After the deployment completes (check the **Actions** tab), your app will be live at:
32+
33+
```
34+
https://[your-username].github.io/RowState/
35+
```
36+
37+
Replace `[your-username]` with your GitHub username.
38+
39+
## Important Notes
40+
41+
### Browser Compatibility for Bluetooth
42+
43+
⚠️ **Web Bluetooth API limitations:**
44+
-**Works:** Chrome/Edge on desktop and Android
45+
-**Doesn't work:** Firefox, Safari, iOS browsers
46+
47+
Your rowing monitor and heart rate monitor will only connect on supported browsers.
48+
49+
### Manual Deployment
50+
51+
You can also trigger deployment manually:
52+
1. Go to **Actions** tab in GitHub
53+
2. Select **Deploy to GitHub Pages** workflow
54+
3. Click **Run workflow**
55+
56+
### Local Testing
57+
58+
To test the production build locally:
59+
60+
```bash
61+
npm run build
62+
npm run preview
63+
```
64+
65+
## Troubleshooting
66+
67+
### If the base path is wrong:
68+
69+
Edit `vite.config.ts` and change the `base` value to match your repository name:
70+
71+
```typescript
72+
base: '/YourRepoName/',
73+
```
74+
75+
### If deployment fails:
76+
77+
1. Check the **Actions** tab for error logs
78+
2. Ensure GitHub Pages is enabled in repository settings
79+
3. Verify the workflow has proper permissions

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# RowState
2+
3+
RowState is a web application that connects your rowing machine to YouTube videos, automatically adjusting playback speed to match your rowing pace. Row faster, the video speeds up. Row slower, it slows down.
4+
5+
## Features
6+
7+
- **Smart Video Sync** - Video playback automatically adjusts to your stroke rate
8+
- **Bluetooth Rowing Monitor** - Connects to any FTMS-compatible rowing machine
9+
- **Heart Rate Monitoring** - Optional Bluetooth heart rate sensor support
10+
- **Real-time Metrics** - Live display of stroke rate, split time, distance, power, and heart rate
11+
- **YouTube Integration** - Row along to any YouTube video
12+
13+
## Getting Started
14+
15+
### Prerequisites
16+
17+
- A Bluetooth-enabled rowing machine (FTMS protocol)
18+
- Chrome or Edge browser (desktop or Android)
19+
- Optional: Bluetooth heart rate monitor
20+
21+
### Running Locally
22+
23+
```bash
24+
npm install
25+
npm run dev
26+
```
27+
28+
Open your browser to the local development server and click "Connect Rower" to pair your rowing machine.
29+
30+
### Deployment
31+
32+
This app can be deployed to GitHub Pages. See [DEPLOYMENT.md](DEPLOYMENT.md) for instructions.
33+
34+
## Browser Compatibility
35+
36+
The Bluetooth features require the Web Bluetooth API, which is currently supported in:
37+
- Chrome and Edge (desktop and Android)
38+
39+
Bluetooth connections will not work in Firefox, Safari, or iOS browsers.
40+
41+
## How It Works
42+
43+
1. Connect your Bluetooth rowing machine
44+
2. Optionally connect a heart rate monitor
45+
3. Load a YouTube video
46+
4. Set your baseline stroke rate (default: 22 SPM = 1.0x speed)
47+
5. Start rowing - the video speed adjusts automatically
48+
49+
## License
50+
51+
MIT

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { defineConfig, globalIgnores } from 'eslint/config'
7+
8+
export default defineConfig([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs.flat.recommended,
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])

index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="UTF-8" />
6+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8+
<title>RowState</title>
9+
</head>
10+
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
15+
16+
</html>

0 commit comments

Comments
 (0)