Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ __pycache__/
*.db
.env
.DS_Store

# wrangler files
.wrangler
.dev.vars*
!.dev.vars.example
!.env.example
14 changes: 14 additions & 0 deletions wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "marksman",
"compatibility_date": "2026-04-15",
"observability": {
"enabled": true
},
"assets": {
"directory": "static"
},
"compatibility_flags": [
"nodejs_compat"
]
}
Comment on lines +4 to +14
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The wrangler.jsonc configures a static-only deployment, but the frontend requires a Python backend. The backend will not be deployed, causing all API calls to fail.
Severity: CRITICAL

Suggested Fix

Update wrangler.jsonc to support a Python Worker deployment. This includes adding the python_workers compatibility flag, defining a main module to run the FastAPI application, and ensuring a pyproject.toml or requirements.txt file is present to install Python dependencies. This will ensure the backend is deployed alongside the frontend assets.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: wrangler.jsonc#L1-L14

Potential issue: The `wrangler.jsonc` file is configured to deploy only static assets
from the `static` directory. However, the application's frontend (`index.html`) relies
on a Python FastAPI backend (`server.py`) for all its core functionality, making API
calls to relative paths like `/api/bookmarks`. The current Wrangler configuration lacks
the necessary settings to deploy a Python worker, such as the `python_workers`
compatibility flag. As a result, deploying with this configuration will only serve the
static frontend, and all backend API calls will fail with 404 errors, rendering the
application completely non-functional.

Did we get this right? 👍 / 👎 to inform future reviews.