Repository navigation
Deploy to Vercel as a Flask upload app - #3
Merged
Merged
Conversation
Vercel detected pyproject.toml and built the repo as a Python web app, failing with PYTHON_ENTRYPOINT_NOT_FOUND. vercel.json now sets the framework to "Other", installs the tool into .deps, generates the HTML report from the sample workbook into public/, and serves it as index.html. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gtNTGbmvq2DdoGC4air5K
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replaces the static vercel.json build. app.py is a Flask app that Vercel deploys with zero config: upload an .xlsx (up to 4 MB) and get the HTML dashboard back, or open /sample. Uploads go to a temp file that is deleted right after parsing; nothing is stored. Names stay masked unless the user ticks "Show full passenger names". Adds flask to the dependencies and tests for the upload, sample, error and size-limit paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gtNTGbmvq2DdoGC4air5K
royalpriest
added a commit
that referenced
this pull request
Nov 19, 2026
Deploy to Vercel as a Flask upload app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Royal · project thread
Problem
The Vercel build failed with
PYTHON_ENTRYPOINT_NOT_FOUND. The project uses the Python preset, which needs a web app entrypoint, and the repo only had a command-line tool.Fix
The first commit was a static-page workaround. Royal chose to make it a real Python web app instead, so the second commit replaces that workaround:
app.pyis a Flask app that Vercel deploys with no extra configuration.GET /is an upload page with drag-and-drop and a "Show full passenger names" option.POST /reporttakes an.xlsxand returns the HTML dashboard fromreport_tool.GET /sampleshows the sample workbook's report.Cache-Control: no-store, and names stay masked unless the box is ticked..xlsxfile, an unreadable file, no valid rows, or a file over the limit all return the upload page with a clear message. Temp paths never appear in those messages.flaskis added to the dependencies.vercel.jsonis removed. pytest getspythonpath = ["."]so CI can importapp. The README section is updated.How I checked
pytest: 49 passed, including 5 new app tests (upload page, sample, upload with and without name masking, bad inputs, file too large).ruff check .andruff format --check .are clean.vercel build(CLI 65.11.0, the same version as the failing log) completed with both thepythonandflaskpresets. It produced oneflaskfunction, and the bundle includesreport_tool/templates,templates/upload.htmland the sample workbook.🤖 Generated with Claude Code
https://claude.ai/code/session_016gtNTGbmvq2DdoGC4air5K