Skip to content

Conversation

@Noobzik
Copy link

@Noobzik Noobzik commented Jan 16, 2026

List of modification :

  • Switched the API call to the backend from the client (browser) to server side. (Eliminating cors issue)
  • Frontend and backend have their own image for best practice in production code
  • Fixed the issue with communicating with a distant Ollama that is not at the same docker
  • The port are no longer hard coded, they may be set through a env setting.

Things that do not work:

  • Return line on skill page with the keyboard "Enter"
    • Workaround : place a letter, move the cursor to the right (1 character) then press enter to make a new line
  • CV tailor due to JSON malformatted issue (not related to DGX Spark)

Needs to be done :

  • Switch to UV for faster build
  • Review the entire code base since this is vide-coded by copilot claude saunet 4.5 and may have security flaws
  • Allow token to be used with Ollama (with/without Open View)
  • Clean up any residual code that is no longer needed

Pull Request Title

Related Issue

Description

copilot:summary

Type

  • [x ] Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other (please specify): See above

Proposed Changes

Screenshots / Code Snippets (if applicable)

How to Test

Checklist

  • The code compiles successfully without any errors or warnings
  • The changes have been tested and verified
  • The documentation has been updated (if applicable)
  • The changes follow the project's coding guidelines and best practices
  • The commit messages are descriptive and follow the project's guidelines
  • All tests (if applicable) pass successfully
  • This pull request has been linked to the related issue (if applicable)

Additional Information

copilot:walkthrough


Summary by cubic

Prepares a production-ready Docker Compose setup for DGX Spark with a server-side API proxy that removes CORS and supports remote Ollama. Splits frontend and backend into separate images with env-based configuration for ports and URLs.

  • New Features

    • Added Next.js server-side proxy (/api/*) to forward requests to the backend, removing CORS issues across hosts and Tailscale. Configurable via BACKEND_URL.
    • Split Docker build into frontend and backend images with docker-compose; env-driven ports (FRONTEND_PORT) and CORS_ORIGINS (supports “*”). Runtime config injected via entrypoint.
    • Backend reads CORS_ORIGINS from env (including wildcard); no hard-coded ports.
    • Ollama integration hardened: remote server support, 8k context window, simplified JSON-only prompts, JSON auto-repair, and schema validators for stable parsing.
    • API client reworked to use the proxy (getApiBase); print routes updated. Added upload handling in proxy and test scripts (test-proxy.sh, docker variant). Extensive docs included.
  • Bug Fixes

    • Fixed TypeScript union and incorrect API export causing builds to fail.
    • Resolved backend data permission issue in Docker by creating/chowning data dirs.
    • Fixed 502 on PDF uploads by removing conflicting content headers in the proxy.
    • Reduced JSON parse failures with repair heuristics and Pydantic validators (e.g., empty string → []).

Written for commit 71655ec. Summary will update on new commits.

- Switched the call to the backend from client to server side. (Eleminating cors issue)
- Frontend and backend have their own image for best practice in production code
- Fixed the issue with communicating with a distant Ollama that is not at the same docker
- The port are no longer hard coded, they may be set through a env setting.

Things that do not work:
- Return line on skill page with the keyboard "Enter"
  - Workaround : place a letter, move the cursor to the right (1 character) then press enter to make a new line
- CV tailor due to JSON malformatted issue (not related to DGX Spark)

Needs to be done :
- Switch to UV for faster build
- Review the entire code base since this is vide-coded by copilot claude saunet 4.5 and may have security flaws
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