webtrans
[!WARNING]
This is the source code repository of a student practical. The project is not maintained and there are no future plans of maintaining it. The project is not finished! While this prototype worked and the docker files built at some point, there is no guarantee that they'll continue doing so.
webtrans
WebTrans 2023 project
WebTrans is a webservice for transcompiling between programming languages.
IN DEVELOPMENT! NOT FOR PRODUCTION!
Usage
Quick Start
For now, you need an nvidea gpu.
git clone https://github.com/WyvernIXTL/webtrans.git
cd webtrans/src
docker compose build
docker compose up
Should result in the website running on 127.0.0.1:8085
Configure
Before deployment you should configure some env variables in the docker compose file:
SECRET_KEY_BASEAPP_DOMAIN
The API
Create Token with Login
curl example.com/api/sign_ins -X POST -d "user:email=user@example.com" -d "user:password=changeme"
returns
{"token":"your-token"}
Create Token through Signup
curl example.com/api/sign_ups -X POST -d "user:email=user@example.com" -d "user:password=changeme" -d "user:password_confirmation=changeme"
returns
{"token":"your-token"}
Create Transcompilation Task
curl example.com/api/createtask -X POST -H "Content-Type: application/json" -d '{
"auth_token": "your-token",
"transcompile_task": {
"inp_lang": "inp-lang",
"outp_lang": "outp-lang",
"input_code": "your-encoded-code"
}
}'
returns
{"id":"task-id"}
Check Transcompilation Task
curl example.com/api/checktask/task-id -X GET -d "auth_token=your-token"
returns on success if finished (200)
{"id": "task-id", "completed": "true", "output_code": "output_code"}
if not finished (200)
{"id": "task-id", "completed": "false"}
Documentation
For handcrafted development documentation head to docs/DOCUMENTATION.
Auto generated and always current webui documentation can be found on https://wyvernixtl.github.io/webtrans/.
MISC
Use the Facebookresearch Transcoder Standalone
git clone https://github.com/WyvernIXTL/webtrans.git
cd ./webtrans/src
docker compose build
docker --it --rm --gpus all src-transcoder
python3 translate.py --src_lang <<cpp|python|java>> --tgt_lang <<cpp|python|java>> --model_path /opt/models/model_<<1|2>>.pth < inputfile
Troubleshooting
- Make sure to have enough RAM (wsl might crash with just 3GB)
License
The project is under MPL 2.0
Screenshots

webtrans
- 0
- 0
- 0
- 0
- 0
- 6 days ago
- April 24, 2023
Mozilla Public License 2.0
Sat, 01 Nov 2025 23:43:46 GMT