Skip to content

Commit 97cffbb

Browse files
committed
feat: initial commit — Acoustic Data Link FSK transmitter/receiver app
0 parents  commit 97cffbb

37 files changed

Lines changed: 6658 additions & 0 deletions

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Rename this file to .env for local development
2+
# NEVER commit the actual .env file to version control.
3+
4+
VITE_API_KEY=your_google_gemini_api_key_here
5+
VITE_APP_MODE=development

.github/workflows/deploy.yml

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

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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?
25+
26+
# Dev scratch / build output files
27+
build_output.txt
28+
ts_errors.txt
29+
tsc_errors.log
30+
prd.md.resolved

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Acoustic Data Link
2+
3+
A browser-based acoustic data transmission app that enables devices to transmit data to each other using only sound (speakers and microphones).
4+
5+
**Visual Metaphor**: "Deep Space Digital Radio". The interface borrows elements from high-frequency radio dashboards and cryptography terminals, employing an immersive animated aurora background with dark, glass-morphic hardware telemetry panels, a fixed primary green accent for optimal visual contrast, and decrypted text animations.
6+
7+
*Developed by Asmith — asmyth@duck.com*
8+
9+
## Features (Phase 1: Frontend Architecture)
10+
- **Role Selection:** Toggle instantly between Transmitter and Receiver dashboards.
11+
- **Transmitter Dashboard:** Mock configurations for FSK encoding profiles, bitrate targets, and redundancy levels, with full aesthetic waveform telemetry.
12+
- **Receiver Dashboard:** Mock listening states, ambient audio spectrum visualization, and signal decoding console logs.
13+
- **Kinetic UI:** Smooth transitions and reactive elements via Framer Motion.
14+
- **Anti-Gravity Architecture:** Full `prefers-reduced-motion` accessibility support, API fallback override mockups, and strict React state separation.
15+
16+
## Setup Instructions
17+
18+
### Prerequisites
19+
- Node.js (v18+)
20+
- npm or yarn
21+
22+
### Installation
23+
1. Clone the repository
24+
2. Install dependencies:
25+
\`\`\`bash
26+
npm install
27+
\`\`\`
28+
3. Start the development server:
29+
\`\`\`bash
30+
npm run dev
31+
\`\`\`
32+
33+
## Deployment Guide
34+
35+
### GitHub Pages (Automated)
36+
This repository includes a GitHub Action for deploying natively to GitHub Pages.
37+
1. Push your code to the \`main\` branch.
38+
2. In your repository settings:
39+
- Go to **Settings** > **Pages**.
40+
- Set the source to **GitHub Actions**.
41+
3. *Phase 2 Only:* Add \`VITE_API_KEY\` to your Repository Secrets if the AI summarization fallback is necessary.
42+
43+
### Netlify Deployment
44+
1. Connect your repository to Netlify.
45+
2. The included \`netlify.toml\` handles the build command (\`npm run build\`) and SPA routing redirects automatically.
46+
3. *Phase 2 Only:* Add the \`VITE_API_KEY\` environment variable in the Netlify site settings.
47+
48+
## API Override System
49+
To protect production stability and reduce quota exhaustion, an Override System is implemented. If the backend services experience rate-limiting (`429`) or a key expiration, the UI intercepts the error and displays a modal.
50+
Users can input their own Google SDK API keys dynamically to bypass the server limitations and continue transmitting data.
51+
52+
---
53+
> Note: Replace the default Vite favicon in `public/` to match the radio/acoustic transmission metaphor.

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

netlify.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[build]
2+
publish = "dist"
3+
command = "npm run build"
4+
5+
# CRITICAL: Fix for Single Page Application (SPA) Routing
6+
[[redirects]]
7+
from = "/*"
8+
to = "/index.html"
9+
status = 200

0 commit comments

Comments
 (0)