chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:08:41 +08:00
commit bcc7968ff6
9988 changed files with 1016778 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# These are supported funding model platforms
github: [presenton] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+141
View File
@@ -0,0 +1,141 @@
name: Bug report
description: Report crashes, regressions, or incorrect behavior in Presenton.
title: "[Bug]: "
labels:
- bug
body:
- type: markdown
attributes:
value: |
Thanks for reporting a bug in **Presenton** 🚀
Please provide clear steps so we can reproduce and fix the issue quickly.
- type: dropdown
id: bug_type
attributes:
label: Bug type
description: Select the category that best matches the issue.
options:
- Regression (worked before, now fails)
- Crash (app exits or freezes)
- UI bug
- Generation bug (slides/content incorrect)
- Export bug (PPTX/PDF issues)
validations:
required: true
- type: textarea
id: summary
attributes:
label: Summary
description: One sentence describing the issue.
placeholder: Exporting a generated presentation as PPTX fails after slide generation.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Steps to reproduce
description: Provide the shortest reproducible steps.
placeholder: |
1. Start Presenton Electron app
2. Generate presentation with 5 slides
3. Click "Export PPTX"
4. Error occurs
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What should happen.
placeholder: The presentation should export successfully as a PPTX file.
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior
description: What happened instead.
placeholder: Export fails and the app shows an error message.
validations:
required: true
- type: input
id: version
attributes:
label: Presenton version
description: Version of Presenton you are using.
placeholder: 0.6.2-beta
validations:
required: true
- type: input
id: os
attributes:
label: Operating system
description: OS and version.
placeholder: macOS 14 / Ubuntu 24.04 / Windows 11
validations:
required: true
- type: dropdown
id: run_method
attributes:
label: How are you running Presenton?
options:
- Electron Desktop App
- Docker
- Local Development
- API Only
validations:
required: true
- type: dropdown
id: llm_provider
attributes:
label: LLM provider
description: AI model provider used for generation.
options:
- OpenAI
- Google Gemini
- Anthropic
- Ollama
- Custom OpenAI-compatible API
- Not relevant
- type: textarea
id: logs
attributes:
label: Logs / screenshots
description: Include logs, console output, or screenshots.
render: shell
- type: textarea
id: impact
attributes:
label: Impact
description: |
Explain how this bug affects usage.
Include:
- Who is affected
- Severity
- Frequency
- Consequence
placeholder: |
Affected: Users generating AI presentations
Severity: High
Frequency: Always
Consequence: Presentations cannot be exported.
- type: textarea
id: additional_information
attributes:
label: Additional information
description: Any extra context that might help debug the issue.
placeholder: Logs from Electron console, template used, or related issues.
@@ -0,0 +1,88 @@
name: Feature request
description: Suggest a new capability or improvement for Presenton.
title: "[Feature]: "
labels:
- enhancement
body:
- type: markdown
attributes:
value: |
Thanks for suggesting an improvement to **Presenton** 🚀
Please describe the feature clearly so we can understand the problem and evaluate the idea.
- type: textarea
id: summary
attributes:
label: Summary
description: One-line description of the feature request.
placeholder: Add support for exporting presentations as Google Slides.
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem to solve
description: What problem are you trying to solve? Why is the current behavior insufficient?
placeholder: |
Currently Presenton exports presentations only as PPTX or PDF.
Our team collaborates primarily in Google Slides, so we must manually convert files.
validations:
required: true
- type: textarea
id: proposed_solution
attributes:
label: Proposed solution
description: Describe the feature you'd like to see and how it should work.
placeholder: |
Add a new export option for Google Slides.
When generating a presentation, users could select:
- PPTX
- PDF
- Google Slides
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Have you considered other solutions or workarounds?
placeholder: |
Currently we export PPTX and manually upload to Google Slides, which adds extra steps.
- type: textarea
id: use_case
attributes:
label: Use case
description: Describe how this feature would be used in real workflows.
placeholder: |
Teams generating AI presentations for meetings could directly open them in Google Slides
for collaborative editing.
- type: textarea
id: impact
attributes:
label: Impact
description: |
Explain the importance of this feature.
Include:
- Who would benefit from it
- Severity of the current limitation
- Frequency of the issue
- Workflow impact
placeholder: |
Affected users: Teams using Presenton for collaborative presentations
Severity: Medium
Frequency: Frequent
Impact: Saves time and removes manual conversion steps.
- type: textarea
id: additional_information
attributes:
label: Additional information
description: Any extra context, screenshots, references, or examples.
placeholder: Links to similar features in Gamma, Beautiful AI, or other presentation tools.
+63
View File
@@ -0,0 +1,63 @@
# GitHub Actions workflows
## Test All Applications (`test-all.yml`)
The test workflow runs on pushes and pull requests to `main`, and can also be
started manually. It enforces the checks that exist in the current repository:
- repository tooling: template-converter tests and bundled export verification;
- FastAPI: every pytest test using the Python version and locked dependencies
declared in `servers/fastapi`;
- Next.js: all Node.js unit tests, ESLint, a production build, and Cypress
component tests.
No test step is allowed to fail silently.
## Run the CI checks locally
Install Node.js 20+, npm, Python 3.11, and `uv`, then run:
```bash
./test-local.sh
```
The script installs locked dependencies and runs the same commands as the
GitHub Actions workflow.
## Run one test group
### FastAPI
```bash
cd servers/fastapi
uv sync --locked --dev
mkdir -p /tmp/presenton-tests/app-data /tmp/presenton-tests/temp
APP_DATA_DIRECTORY=/tmp/presenton-tests/app-data \
TEMP_DIRECTORY=/tmp/presenton-tests/temp \
DATABASE_URL=sqlite+aiosqlite:////tmp/presenton-tests/test.db \
DISABLE_ANONYMOUS_TRACKING=true \
DISABLE_IMAGE_GENERATION=true \
uv run --locked python -m pytest --verbose --tb=short
```
### Next.js
```bash
cd servers/nextjs
npm ci
npm test
npm run lint
NEXT_PUBLIC_FAST_API=http://localhost:8000 \
NEXT_PUBLIC_URL=http://localhost:3000 \
npm run build
npx cypress run --component --browser electron
```
### Repository tooling
```bash
npm ci
npm test
npm run sync:presentation-export
npm run check:presentation-export
```
+77
View File
@@ -0,0 +1,77 @@
name: Docker Release
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: read
packages: write
concurrency:
group: docker-release-${{ github.event.release.tag_name || github.ref_name || github.run_id }}
cancel-in-progress: false
env:
IMAGE_NAME: ghcr.io/presenton/presenton
MOVING_TAG: dev
jobs:
build-and-push:
name: Build and push multi-architecture image
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || github.ref }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Docker tags
id: docker-tags
shell: bash
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
IMAGE_TAG="${{ github.event.release.tag_name }}"
else
IMAGE_TAG="${MOVING_TAG}"
fi
{
echo "tags<<EOF"
echo "${IMAGE_NAME}:${IMAGE_TAG}"
echo "EOF"
echo "verify_tag=${IMAGE_TAG}"
} >> "${GITHUB_OUTPUT}"
- name: Build and push multi-architecture image
uses: docker/build-push-action@v7
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker-tags.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Verify image
env:
VERIFY_TAG: ${{ steps.docker-tags.outputs.verify_tag }}
run: |
docker buildx imagetools inspect "${IMAGE_NAME}:${VERIFY_TAG}" | tee image-inspect.txt
grep -q "linux/amd64" image-inspect.txt
grep -q "linux/arm64" image-inspect.txt
+53
View File
@@ -0,0 +1,53 @@
name: Upload Release to R2
on:
release:
types: [published]
jobs:
upload:
runs-on: ubuntu-latest
environment: sync_r2
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download release assets
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir assets
gh release download "${{ github.event.release.tag_name }}" --dir assets --pattern '*.deb' --pattern '*.dmg' --pattern '*.exe'
echo "Downloaded files:"
ls -lh assets/
- name: Extract version from filename
run: |
FILE=$(ls assets/ | head -n 1)
VERSION=$(echo "$FILE" | sed -E 's/^Presenton-(.+)\.(deb|dmg|exe)$/\1/')
echo "Extracted version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
# 4. Install rclone
- name: Install rclone
run: |
curl https://rclone.org/install.sh | sudo bash
# 5. Configure R2
- name: Configure R2
run: |
mkdir -p ~/.config/rclone
cat <<EOF > ~/.config/rclone/rclone.conf
[r2]
type = s3
provider = Cloudflare
access_key_id = ${{ secrets.R2_ACCESS_KEY }}
secret_access_key = ${{ secrets.R2_SECRET_KEY }}
endpoint = https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com
EOF
# 6. Upload to R2 (FINAL STEP)
- name: Upload files to R2
run: |
rclone copy assets r2:presenton-desktop/${{ env.VERSION }} --progress --transfers=8
+111
View File
@@ -0,0 +1,111 @@
name: Test All Applications
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test-repository-tools:
name: Test repository tooling
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- name: Install dependencies
run: npm ci
- name: Run repository tests
run: npm test
- name: Install presentation export runtime
run: npm run sync:presentation-export
- name: Verify presentation export runtime
run: npm run check:presentation-export
test-fastapi:
name: Test FastAPI
runs-on: ubuntu-latest
defaults:
run:
working-directory: servers/fastapi
env:
APP_DATA_DIRECTORY: /tmp/presenton-app-data
TEMP_DIRECTORY: /tmp/presenton-temp
DATABASE_URL: sqlite+aiosqlite:////tmp/presenton-test.db
DISABLE_ANONYMOUS_TRACKING: "true"
DISABLE_IMAGE_GENERATION: "true"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: servers/fastapi/uv.lock
- name: Install locked dependencies
run: uv sync --locked --dev
- name: Create test directories
run: mkdir -p "$APP_DATA_DIRECTORY" "$TEMP_DIRECTORY"
- name: Run all pytest tests
run: uv run --locked python -m pytest --verbose --tb=short
test-nextjs:
name: Test Next.js
runs-on: ubuntu-latest
defaults:
run:
working-directory: servers/nextjs
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: servers/nextjs/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run Node.js tests
run: npm test
- name: Run ESLint
run: npm run lint
- name: Build application
env:
NEXT_PUBLIC_FAST_API: http://localhost:8000
NEXT_PUBLIC_URL: http://localhost:3000
run: npm run build
- name: Run Cypress component tests
run: npx cypress run --component --browser electron