PolicyEngine / PolicyEngine/policyengine-app-v2
Build an API v2 simulation console in app v2
Open
@SongmingFan123 is already working on this.
Since Aug 28, 2025.
- Dominant language
- HTML
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 50m
- Merged PRs (30d)
- 39
Description
The original request was to migrate the legacy API v1 simulation tool from https://legacy.policyengine.org/us/developer-tools/simulations. Do not port that API v1 implementation. Build the replacement after the API v2 simulation and calculation contract is stable.
Scope
- Add a country-scoped
/[countryId]/dev-tools/simulationsroute in the Next.js application. - Accept and edit a typed API v2 simulation or calculation request.
- Support the authentication required by the finalized API v2 endpoint.
- Submit asynchronous work, poll its status, and display the completed response or structured error.
- Show the request and response payloads in a format suitable for API debugging.
- Add the simulation console to
/[countryId]/dev-tools. - Redirect the former
/[countryId]/developer-tools/simulationspath to the replacement route. - Add tests for request validation, authentication errors, polling completion, API errors, and country-specific routing.
Timing
Defer implementation until the API v2 request, authentication, job-status, and response schemas are stable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.