Skip to content

Commit e6ad498

Browse files
authored
Merge pull request #1 from btbishop93/feat/ci-biome-tests
feat: add CI pipeline with Biome linting and Vitest tests
2 parents b22db39 + 9e0f2a1 commit e6ad498

54 files changed

Lines changed: 2962 additions & 5881 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Biome Check
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Bun
17+
uses: oven-sh/setup-bun@v2
18+
with:
19+
bun-version: latest
20+
21+
- name: Install dependencies
22+
run: bun install --frozen-lockfile
23+
24+
- name: Run Biome check
25+
run: bun run check
26+
27+
test:
28+
name: Tests
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Setup Bun
34+
uses: oven-sh/setup-bun@v2
35+
with:
36+
bun-version: latest
37+
38+
- name: Install dependencies
39+
run: bun install --frozen-lockfile
40+
41+
- name: Run tests
42+
run: bun run test:run
43+
44+
build:
45+
name: Build
46+
runs-on: ubuntu-latest
47+
needs: [lint, test]
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Setup Bun
52+
uses: oven-sh/setup-bun@v2
53+
with:
54+
bun-version: latest
55+
56+
- name: Install dependencies
57+
run: bun install --frozen-lockfile
58+
59+
- name: Build
60+
run: bun run build

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

README.md

Lines changed: 75 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,90 +2,131 @@
22

33
Convert your videos to the required format for macOS and iOS App Store app previews.
44

5+
**Why this exists:** When uploading MP4 app recordings to Apple's App Store Connect, uploads often fail silently without any indication why. Apple secretly checks for specific video formatting requirements. This tool applies those formats to your video so it can be properly uploaded.
6+
57
## Features
68

79
- Convert videos to macOS App Store format (1920×1080)
810
- Convert videos to iOS App Store format (886×1920)
9-
- Add silent audio track (fixes Apple upload issues)
10-
- Fast server-side processing with native FFmpeg
11-
- Progress tracking for upload and download
12-
- Instant preview of converted videos
11+
- Add silent audio track (fixes common Apple upload rejections)
12+
- Fast server-side processing with FFmpeg
13+
- Desktop-only (video processing requires desktop browser)
14+
15+
## Requirements
16+
17+
### System Requirements
18+
19+
- **Node.js** 18.x or higher
20+
- **FFmpeg** installed on the server (required for video processing)
21+
22+
### Video Requirements
23+
24+
- Format: MP4
25+
- Duration: 15-30 seconds
26+
- Max file size: 500MB
1327

1428
## Server Requirements
1529

16-
This application requires FFmpeg to be installed on the server. For optimal performance, follow these installation instructions:
30+
This application requires FFmpeg to be installed on the server.
1731

1832
### macOS
1933

2034
```bash
21-
# Using Homebrew
2235
brew install ffmpeg
23-
24-
# Verify installation
2536
ffmpeg -version
2637
```
2738

2839
### Ubuntu/Debian
2940

3041
```bash
31-
# Update package lists
3242
sudo apt update
33-
34-
# Install FFmpeg
3543
sudo apt install -y ffmpeg
36-
37-
# Verify installation
3844
ffmpeg -version
3945
```
4046

4147
### CentOS/RHEL/Fedora
4248

4349
```bash
44-
# For CentOS/RHEL 8 or newer and Fedora
4550
sudo dnf install -y ffmpeg ffmpeg-devel
46-
47-
# Verify installation
4851
ffmpeg -version
4952
```
5053

51-
### Windows Server
54+
### Windows
5255

53-
1. Download FFmpeg from the [official website](https://www.ffmpeg.org/download.html)
54-
2. Extract the files to a folder, e.g., `C:\ffmpeg`
55-
3. Add the `bin` folder to your system PATH
56-
4. Verify by running `ffmpeg -version` in the command prompt
56+
1. Download FFmpeg from [ffmpeg.org/download.html](https://www.ffmpeg.org/download.html)
57+
2. Extract to `C:\ffmpeg`
58+
3. Add `C:\ffmpeg\bin` to system PATH
59+
4. Verify: `ffmpeg -version`
5760

5861
## Development
5962

6063
```bash
6164
# Install dependencies
62-
pnpm install
65+
bun install
6366

6467
# Start the development server
65-
pnpm dev
68+
bun dev
69+
70+
# Run tests
71+
bun test
72+
73+
# Run tests with coverage
74+
bun test:coverage
75+
76+
# Lint
77+
bun lint
78+
79+
# Build for production
80+
bun run build
6681
```
6782

68-
## Building for Production
83+
## Tech Stack
6984

70-
```bash
71-
# Build the application
72-
pnpm build
85+
- **Framework:** Next.js 16
86+
- **Language:** TypeScript
87+
- **Styling:** Tailwind CSS
88+
- **UI Components:** shadcn/ui + Magic UI
89+
- **Animation:** Motion (Framer Motion)
90+
- **Testing:** Vitest + React Testing Library
91+
- **Video Processing:** FFmpeg (server-side)
92+
93+
## Project Structure
7394

74-
# Start the production server
75-
pnpm start
95+
```
96+
src/
97+
├── app/ # Next.js App Router
98+
│ ├── api/convert/ # Video conversion API endpoint
99+
│ └── page.tsx # Main page
100+
├── components/
101+
│ ├── magicui/ # Magic UI components
102+
│ ├── providers/ # React context providers
103+
│ ├── ui/ # shadcn/ui components
104+
│ └── video-convert/ # Video conversion flow
105+
├── hooks/ # Custom React hooks
106+
├── lib/ # Utility functions
107+
├── types/ # TypeScript types
108+
└── __tests__/ # Test files
76109
```
77110

78111
## Deployment
79112

80-
This application can be deployed to any Node.js hosting platforms that support Next.js, such as:
113+
Deploy to any Node.js platform that supports Next.js:
81114

82115
- Vercel
83-
- Netlify
84-
- AWS Amplify
116+
- Railway
117+
- Render
85118
- DigitalOcean App Platform
86-
- Heroku
119+
- AWS (EC2, ECS, Lambda)
120+
121+
**Important:** Ensure FFmpeg is installed on your deployment server. The app will return a 503 error if FFmpeg is not available.
122+
123+
### Environment Variables
87124

88-
**Important:** Ensure that FFmpeg is installed on your deployment server for the video conversion to work properly.
125+
No environment variables are required for basic operation. For production, consider:
126+
127+
```env
128+
NODE_ENV=production
129+
```
89130

90131
## License
91132

biome.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"includes": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.js", "./src/**/*.jsx"]
10+
},
11+
"formatter": {
12+
"enabled": true,
13+
"indentStyle": "space",
14+
"indentWidth": 2,
15+
"lineWidth": 100
16+
},
17+
"linter": {
18+
"enabled": true,
19+
"rules": {
20+
"recommended": true,
21+
"correctness": {
22+
"useExhaustiveDependencies": "warn",
23+
"useHookAtTopLevel": "error",
24+
"noUnusedImports": "error",
25+
"noUnusedVariables": "error"
26+
},
27+
"suspicious": {
28+
"noExplicitAny": "warn"
29+
},
30+
"style": {
31+
"noUnusedTemplateLiteral": "off"
32+
},
33+
"a11y": {
34+
"useSemanticElements": "off"
35+
}
36+
}
37+
},
38+
"javascript": {
39+
"formatter": {
40+
"quoteStyle": "double",
41+
"semicolons": "always",
42+
"trailingCommas": "all"
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)