Skip to content

Connect backend and frontend for Social Golfers Problem#1

Open
Roiqk7 wants to merge 3 commits intomainfrom
web-app-integration-1418628949968445824
Open

Connect backend and frontend for Social Golfers Problem#1
Roiqk7 wants to merge 3 commits intomainfrom
web-app-integration-1418628949968445824

Conversation

@Roiqk7
Copy link
Copy Markdown
Owner

@Roiqk7 Roiqk7 commented Feb 10, 2026

This PR connects the existing Python SAT solver backend to the HTML/JS frontend using a FastAPI server.

Changes:

  1. Backend (src/core/server.py): Implements a FastAPI application that serves static files from src/wwwroot and provides a POST endpoint /api/solve. The endpoint wraps the existing ProblemInstance, SolverHandler, and Encapsulator logic, using a global lock to ensure safe serial execution due to file-based dependencies.
  2. Frontend (src/wwwroot/js/showOutput.js): Modifies the event listener to send user input to the /api/solve endpoint and display the returned schedule or error message.
  3. Documentation (README.md): Adds instructions for installing dependencies and running the web server.
  4. Verification (tests/verify_frontend.py): Adds a Playwright script to verify the end-to-end functionality.

Dependencies added: fastapi, uvicorn. The glucose solver must be compiled as per existing instructions.


PR created automatically by Jules for task 1418628949968445824 started by @Roiqk7

- Create `src/core/server.py` to serve the frontend and expose `/api/solve`.
- Update `src/wwwroot/js/showOutput.js` to fetch results from the API.
- Add instructions to `README.md`.
- Add `tests/verify_frontend.py` for verification.

Co-authored-by: Roiqk7 <112021405+Roiqk7@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits February 10, 2026 08:59
- Create `src/core/server.py` using FastAPI to serve the frontend and expose `/api/solve`.
- Update `src/wwwroot/js/showOutput.js` to communicate with the API.
- Add `Dockerfile` to build the environment, compile the solver, and run the app.
- Add `docker-compose.yml` to orchestrate the container on port 4200.
- Update `README.md` with Docker usage instructions.
- Add `tests/verify_frontend.py` for verification.
- Configure `.gitignore` to exclude runtime data and binary artifacts.

Co-authored-by: Roiqk7 <112021405+Roiqk7@users.noreply.github.com>
- Create `src/core/server.py` using FastAPI to serve the frontend and expose `/api/solve`.
- Update `src/wwwroot/js/showOutput.js` to communicate with the API.
- Add `Dockerfile` to build the environment, patch and compile the solver, and run the app.
- Add `docker-compose.yml` to orchestrate the container on port 4200.
- Update `README.md` with Docker usage instructions.
- Add `tests/verify_frontend.py` for verification.
- Configure `.gitignore` to exclude runtime data and binary artifacts.

Co-authored-by: Roiqk7 <112021405+Roiqk7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant