A working Python web service was translated into a working TypeScript one by a pipeline, not by hand. You can run the translation yourself and then run a test suite nobody here wrote against the result. One command does both. New here? The companion paper Cross-Language Translation in the documentation section is the whole story; this use case is the executable half of it.
One archive with everything you need to run this use case:
p2t-pipeline.zip
(NOTICE, README.md, assembler/.gitignore, assembler/README.md, assembler/src/p2t_assembler/__init__.py, assembler/src/p2t_assembler/assemble.py, assembler/src/p2t_assembler/cli.py, assembler/src/p2t_assembler/targets.py, assembler/tests/golden/auth/policies.ts, assembler/tests/golden/boot/bootstrap.ts, assembler/tests/golden/config/settings.ts, assembler/tests/golden/errors/handling.ts, assembler/tests/golden/models/article.ts, assembler/tests/golden/models/comment.ts, assembler/tests/golden/models/profile.ts, assembler/tests/golden/models/user.ts, assembler/tests/golden/relationships/favorite.ts, assembler/tests/golden/relationships/follow.ts, assembler/tests/golden/repositories/comments.ts, assembler/tests/golden/repositories/tags.ts, assembler/tests/golden/repositories/users.ts, assembler/tests/golden/routes/login.ts, assembler/tests/golden/routes/register.ts, assembler/tests/golden/services/validation.ts, assembler/tests/roundtrip.sh, bodies/.gitignore, bodies/README.md, bodies/package.json, bodies/src/p2t_bodies/__init__.py, bodies/src/p2t_bodies/cli.py, bodies/src/p2t_bodies/fill.py, bodies/src/p2t_bodies/registry.py, bodies/static/globals.d.ts, bodies/tests/golden/auth/policies.ts, bodies/tests/golden/boot/bootstrap.ts, bodies/tests/golden/config/settings.ts, bodies/tests/golden/errors/handling.ts, bodies/tests/golden/globals.d.ts, bodies/tests/golden/models/article.ts, bodies/tests/golden/models/comment.ts, bodies/tests/golden/models/profile.ts, bodies/tests/golden/models/user.ts, bodies/tests/golden/relationships/favorite.ts, bodies/tests/golden/relationships/follow.ts, bodies/tests/golden/repositories/comments.ts, bodies/tests/golden/repositories/tags.ts, bodies/tests/golden/repositories/users.ts, bodies/tests/golden/routes/login.ts, bodies/tests/golden/routes/register.ts, bodies/tests/golden/services/validation.ts, bodies/tests/roundtrip.sh, bodies/tsconfig.full.json, bodies/tsconfig.tier1.json, decomposer/.gitignore, decomposer/README.md, decomposer/src/p2t_decomposer/__init__.py, decomposer/src/p2t_decomposer/ast_walk.py, decomposer/src/p2t_decomposer/cli.py, decomposer/src/p2t_decomposer/emit_dsl.py, decomposer/src/p2t_decomposer/extract_f1.py, decomposer/src/p2t_decomposer/extract_f10.py, decomposer/src/p2t_decomposer/extract_f11.py, decomposer/src/p2t_decomposer/extract_f12.py, decomposer/src/p2t_decomposer/extract_f2.py, decomposer/src/p2t_decomposer/extract_f3.py, decomposer/src/p2t_decomposer/extract_f4.py, decomposer/src/p2t_decomposer/extract_f5.py, decomposer/src/p2t_decomposer/extract_f7.py, decomposer/src/p2t_decomposer/extract_f8.py, decomposer/src/p2t_decomposer/orchestrator.py, decomposer/tests/.gitkeep, decomposer/tests/golden/F1/F1_article.dsl, decomposer/tests/golden/F1/F1_comment.dsl, decomposer/tests/golden/F1/F1_profile.dsl, decomposer/tests/golden/F1/F1_user.dsl, decomposer/tests/golden/F10_expected.dsl, decomposer/tests/golden/F11_expected.dsl, decomposer/tests/golden/F12_expected.dsl, decomposer/tests/golden/F2/F2_favorite.dsl, decomposer/tests/golden/F2/F2_follow.dsl, decomposer/tests/golden/F3/F3_login.dsl, decomposer/tests/golden/F3/F3_register.dsl, decomposer/tests/golden/F4/F4_login_handler.dsl, decomposer/tests/golden/F4/F4_register_handler.dsl, decomposer/tests/golden/F5/F5_create_comment_for_article.dsl, decomposer/tests/golden/F5/F5_create_tags_that_dont_exist.dsl, decomposer/tests/golden/F5/F5_create_user.dsl, decomposer/tests/golden/F5/F5_delete_comment.dsl, decomposer/tests/golden/F5/F5_get_all_tags.dsl, decomposer/tests/golden/F5/F5_get_comment_by_id.dsl, decomposer/tests/golden/F5/F5_get_comments_for_article.dsl, decomposer/tests/golden/F5/F5_get_user_by_email.dsl, decomposer/tests/golden/F5/F5_get_user_by_username.dsl, decomposer/tests/golden/F5/F5_update_user.dsl, decomposer/tests/golden/F7_expected.dsl, decomposer/tests/golden/F8/F8_check_article_exists.dsl, decomposer/tests/golden/F8/F8_check_email_is_taken.dsl, decomposer/tests/golden/F8/F8_check_user_can_modify_article.dsl, decomposer/tests/golden/F8/F8_check_user_can_modify_comment.dsl, decomposer/tests/golden/F8/F8_check_username_is_taken.dsl, decomposer/tests/golden/dag.golden.json, decomposer/tests/roundtrip.sh, docs/p2t_build_guide.md, docs/p2t_build_guide.pdf, emitter/.gitignore, emitter/README.md, emitter/src/p2t_emitter/__init__.py, emitter/src/p2t_emitter/cli.py, emitter/src/p2t_emitter/dsl_parser.py, emitter/src/p2t_emitter/emit_f1.py, emitter/src/p2t_emitter/emit_f10.py, emitter/src/p2t_emitter/emit_f11.py, emitter/src/p2t_emitter/emit_f12.py, emitter/src/p2t_emitter/emit_f2.py, emitter/src/p2t_emitter/emit_f3.py, emitter/src/p2t_emitter/emit_f4.py, emitter/src/p2t_emitter/emit_f5.py, emitter/src/p2t_emitter/emit_f7.py, emitter/src/p2t_emitter/emit_f8.py, emitter/src/p2t_emitter/parse_f1.py, emitter/src/p2t_emitter/parse_f10.py, emitter/src/p2t_emitter/parse_f11.py, emitter/src/p2t_emitter/parse_f12.py, emitter/src/p2t_emitter/parse_f2.py, emitter/src/p2t_emitter/parse_f3.py, emitter/src/p2t_emitter/parse_f4.py, emitter/src/p2t_emitter/parse_f5.py, emitter/src/p2t_emitter/parse_f8.py, emitter/src/p2t_emitter/sexpr.py, emitter/tests/.gitkeep, emitter/tests/golden/F1/F1_article.ts, emitter/tests/golden/F1/F1_comment.ts, emitter/tests/golden/F1/F1_profile.ts, emitter/tests/golden/F1/F1_user.ts, emitter/tests/golden/F10_errors.ts, emitter/tests/golden/F11_settings.ts, emitter/tests/golden/F12_bootstrap.ts, emitter/tests/golden/F2/F2_favorite.ts, emitter/tests/golden/F2/F2_follow.ts, emitter/tests/golden/F3/F3_login.ts, emitter/tests/golden/F3/F3_register.ts, emitter/tests/golden/F4/F4_login_handler.ts, emitter/tests/golden/F4/F4_register_handler.ts, emitter/tests/golden/F5/F5_create_comment_for_article.ts, emitter/tests/golden/F5/F5_create_tags_that_dont_exist.ts, emitter/tests/golden/F5/F5_create_user.ts, emitter/tests/golden/F5/F5_delete_comment.ts, emitter/tests/golden/F5/F5_get_all_tags.ts, emitter/tests/golden/F5/F5_get_comment_by_id.ts, emitter/tests/golden/F5/F5_get_comments_for_article.ts, emitter/tests/golden/F5/F5_get_user_by_email.ts, emitter/tests/golden/F5/F5_get_user_by_username.ts, emitter/tests/golden/F5/F5_update_user.ts, emitter/tests/golden/F7_auth.ts, emitter/tests/golden/F8/F8_check_article_exists.ts, emitter/tests/golden/F8/F8_check_email_is_taken.ts, emitter/tests/golden/F8/F8_check_user_can_modify_article.ts, emitter/tests/golden/F8/F8_check_user_can_modify_comment.ts, emitter/tests/golden/F8/F8_check_username_is_taken.ts, emitter/tests/roundtrip.sh, notes/fragment-mapping.md, notes/realworld-uml/README.md, notes/realworld-uml/auth-vertical.md, notes/realworld-uml/contracts.md, notes/realworld-uml/data-flow.md, notes/realworld-uml/entities.md, notes/realworld-uml/layered-architecture.md, notes/realworld-uml/routes.md, runtime/.gitignore, runtime/README.md, runtime/package.json, runtime/src/articles_repo_impl.ts, runtime/src/auth_middleware.ts, runtime/src/comments_repo_impl.ts, runtime/src/db.ts, runtime/src/globals_impl.ts, runtime/src/http_exception.ts, runtime/src/jwt_impl.ts, runtime/src/main.ts, runtime/src/repos_impl.ts, runtime/src/serve.ts, runtime/src/server.ts, runtime/src/strings.ts, runtime/tests/feed_follow.sh, runtime/tests/postman.sh, runtime/tests/smoke.sh, runtime/tsconfig.json, scripts/build_frontends.sh, scripts/convert_and_test.sh, scripts/install_postgres.sh, scripts/install_upstream.sh, scripts/start_postgres.sh, scripts/start_upstream.sh, scripts/stop_postgres.sh, scripts/stop_upstream.sh, sgdl/F10_ErrorHandling/.gitignore, sgdl/F10_ErrorHandling/README.md, sgdl/F10_ErrorHandling/bin/.gitkeep, sgdl/F10_ErrorHandling/bin/makeboot2, sgdl/F10_ErrorHandling/build/F10_ErrorHandling.sgr, sgdl/F10_ErrorHandling/build/makeall, sgdl/F10_ErrorHandling/incloc/.gitkeep, sgdl/F10_ErrorHandling/include/.gitkeep, sgdl/F10_ErrorHandling/lib/makeboot2, sgdl/F10_ErrorHandling/run/.gitkeep, sgdl/F10_ErrorHandling/run/F10_realworld_errors.dsl, sgdl/F10_ErrorHandling/src/.gitkeep, sgdl/F10_ErrorHandling/srcloc/.gitkeep, sgdl/F10_ErrorHandling/tests/.gitkeep, sgdl/F10_ErrorHandling/tests/roundtrip.sh, sgdl/F11_Configuration/.gitignore, sgdl/F11_Configuration/README.md, sgdl/F11_Configuration/bin/.gitkeep, sgdl/F11_Configuration/bin/makeboot2, sgdl/F11_Configuration/build/F11_Configuration.sgr, sgdl/F11_Configuration/build/makeall, sgdl/F11_Configuration/incloc/.gitkeep, sgdl/F11_Configuration/include/.gitkeep, sgdl/F11_Configuration/lib/makeboot2, sgdl/F11_Configuration/run/.gitkeep, sgdl/F11_Configuration/run/F11_realworld_settings.dsl, sgdl/F11_Configuration/src/.gitkeep, sgdl/F11_Configuration/srcloc/.gitkeep, sgdl/F11_Configuration/tests/.gitkeep, sgdl/F11_Configuration/tests/roundtrip.sh, sgdl/F12_ApplicationBootstrap/.gitignore, sgdl/F12_ApplicationBootstrap/README.md, sgdl/F12_ApplicationBootstrap/bin/.gitkeep, sgdl/F12_ApplicationBootstrap/bin/makeboot2, sgdl/F12_ApplicationBootstrap/build/F12_ApplicationBootstrap.sgr, sgdl/F12_ApplicationBootstrap/build/makeall, sgdl/F12_ApplicationBootstrap/incloc/.gitkeep, sgdl/F12_ApplicationBootstrap/include/.gitkeep, sgdl/F12_ApplicationBootstrap/lib/makeboot2, sgdl/F12_ApplicationBootstrap/run/.gitkeep, sgdl/F12_ApplicationBootstrap/run/F12_realworld_bootstrap.dsl, sgdl/F12_ApplicationBootstrap/src/.gitkeep, sgdl/F12_ApplicationBootstrap/srcloc/.gitkeep, sgdl/F12_ApplicationBootstrap/tests/.gitkeep, sgdl/F12_ApplicationBootstrap/tests/roundtrip.sh, sgdl/F1_DataModelEntity/.gitignore, sgdl/F1_DataModelEntity/README.md, sgdl/F1_DataModelEntity/bin/.gitkeep, sgdl/F1_DataModelEntity/bin/makeboot2, sgdl/F1_DataModelEntity/build/F1_DataModelEntity.sgr, sgdl/F1_DataModelEntity/build/makeall, sgdl/F1_DataModelEntity/incloc/.gitkeep, sgdl/F1_DataModelEntity/include/.gitkeep, sgdl/F1_DataModelEntity/lib/makeboot2, sgdl/F1_DataModelEntity/run/.gitkeep, sgdl/F1_DataModelEntity/run/F1_article.dsl, sgdl/F1_DataModelEntity/run/F1_comment.dsl, sgdl/F1_DataModelEntity/run/F1_demo_full.dsl, sgdl/F1_DataModelEntity/run/F1_profile.dsl, sgdl/F1_DataModelEntity/run/F1_user.dsl, sgdl/F1_DataModelEntity/src/.gitkeep, sgdl/F1_DataModelEntity/srcloc/.gitkeep, sgdl/F1_DataModelEntity/tests/.gitkeep, sgdl/F1_DataModelEntity/tests/roundtrip.sh, sgdl/F2_DataModelRelationship/.gitignore, sgdl/F2_DataModelRelationship/README.md, sgdl/F2_DataModelRelationship/bin/.gitkeep, sgdl/F2_DataModelRelationship/bin/makeboot2, sgdl/F2_DataModelRelationship/build/F2_DataModelRelationship.sgr, sgdl/F2_DataModelRelationship/build/makeall, sgdl/F2_DataModelRelationship/incloc/.gitkeep, sgdl/F2_DataModelRelationship/include/.gitkeep, sgdl/F2_DataModelRelationship/lib/makeboot2, sgdl/F2_DataModelRelationship/run/.gitkeep, sgdl/F2_DataModelRelationship/run/F2_demo_sql.dsl, sgdl/F2_DataModelRelationship/run/F2_favorite.dsl, sgdl/F2_DataModelRelationship/run/F2_follow.dsl, sgdl/F2_DataModelRelationship/src/.gitkeep, sgdl/F2_DataModelRelationship/srcloc/.gitkeep, sgdl/F2_DataModelRelationship/tests/.gitkeep, sgdl/F2_DataModelRelationship/tests/roundtrip.sh, sgdl/F3_RouteContract/.gitignore, sgdl/F3_RouteContract/README.md, sgdl/F3_RouteContract/bin/.gitkeep, sgdl/F3_RouteContract/bin/makeboot2, sgdl/F3_RouteContract/build/F3_RouteContract.sgr, sgdl/F3_RouteContract/build/makeall, sgdl/F3_RouteContract/incloc/.gitkeep, sgdl/F3_RouteContract/include/.gitkeep, sgdl/F3_RouteContract/lib/makeboot2, sgdl/F3_RouteContract/run/.gitkeep, sgdl/F3_RouteContract/run/F3_demo_full.dsl, sgdl/F3_RouteContract/run/F3_login.dsl, sgdl/F3_RouteContract/run/F3_register.dsl, sgdl/F3_RouteContract/src/.gitkeep, sgdl/F3_RouteContract/srcloc/.gitkeep, sgdl/F3_RouteContract/tests/.gitkeep, sgdl/F3_RouteContract/tests/roundtrip.sh, sgdl/F4_RouteHandler/.gitignore, sgdl/F4_RouteHandler/README.md, sgdl/F4_RouteHandler/bin/.gitkeep, sgdl/F4_RouteHandler/bin/makeboot2, sgdl/F4_RouteHandler/build/F4_RouteHandler.sgr, sgdl/F4_RouteHandler/build/makeall, sgdl/F4_RouteHandler/incloc/.gitkeep, sgdl/F4_RouteHandler/include/.gitkeep, sgdl/F4_RouteHandler/lib/makeboot2, sgdl/F4_RouteHandler/run/.gitkeep, sgdl/F4_RouteHandler/run/F4_demo_steps.dsl, sgdl/F4_RouteHandler/run/F4_login_handler.dsl, sgdl/F4_RouteHandler/run/F4_register_handler.dsl, sgdl/F4_RouteHandler/src/.gitkeep, sgdl/F4_RouteHandler/srcloc/.gitkeep, sgdl/F4_RouteHandler/tests/.gitkeep, sgdl/F4_RouteHandler/tests/roundtrip.sh, sgdl/F5_RepositoryQuery/.gitignore, sgdl/F5_RepositoryQuery/README.md, sgdl/F5_RepositoryQuery/bin/.gitkeep, sgdl/F5_RepositoryQuery/bin/makeboot2, sgdl/F5_RepositoryQuery/build/F5_RepositoryQuery.sgr, sgdl/F5_RepositoryQuery/build/makeall, sgdl/F5_RepositoryQuery/incloc/.gitkeep, sgdl/F5_RepositoryQuery/include/.gitkeep, sgdl/F5_RepositoryQuery/lib/makeboot2, sgdl/F5_RepositoryQuery/run/.gitkeep, sgdl/F5_RepositoryQuery/run/F5_create_comment_for_article.dsl, sgdl/F5_RepositoryQuery/run/F5_create_tags_that_dont_exist.dsl, sgdl/F5_RepositoryQuery/run/F5_create_user.dsl, sgdl/F5_RepositoryQuery/run/F5_delete_comment.dsl, sgdl/F5_RepositoryQuery/run/F5_demo_sql.dsl, sgdl/F5_RepositoryQuery/run/F5_get_all_tags.dsl, sgdl/F5_RepositoryQuery/run/F5_get_comment_by_id.dsl, sgdl/F5_RepositoryQuery/run/F5_get_comments_for_article.dsl, sgdl/F5_RepositoryQuery/run/F5_get_user_by_email.dsl, sgdl/F5_RepositoryQuery/run/F5_get_user_by_username.dsl, sgdl/F5_RepositoryQuery/run/F5_update_user.dsl, sgdl/F5_RepositoryQuery/src/.gitkeep, sgdl/F5_RepositoryQuery/srcloc/.gitkeep, sgdl/F5_RepositoryQuery/tests/.gitkeep, sgdl/F5_RepositoryQuery/tests/roundtrip.sh, sgdl/F7_AuthPolicy/.gitignore, sgdl/F7_AuthPolicy/README.md, sgdl/F7_AuthPolicy/bin/.gitkeep, sgdl/F7_AuthPolicy/bin/makeboot2, sgdl/F7_AuthPolicy/build/F7_AuthPolicy.sgr, sgdl/F7_AuthPolicy/build/makeall, sgdl/F7_AuthPolicy/incloc/.gitkeep, sgdl/F7_AuthPolicy/include/.gitkeep, sgdl/F7_AuthPolicy/lib/makeboot2, sgdl/F7_AuthPolicy/run/.gitkeep, sgdl/F7_AuthPolicy/run/F7_realworld_auth.dsl, sgdl/F7_AuthPolicy/src/.gitkeep, sgdl/F7_AuthPolicy/srcloc/.gitkeep, sgdl/F7_AuthPolicy/tests/.gitkeep, sgdl/F7_AuthPolicy/tests/roundtrip.sh, sgdl/F8_ValidationRule/.gitignore, sgdl/F8_ValidationRule/README.md, sgdl/F8_ValidationRule/bin/.gitkeep, sgdl/F8_ValidationRule/bin/makeboot2, sgdl/F8_ValidationRule/build/F8_ValidationRule.sgr, sgdl/F8_ValidationRule/build/makeall, sgdl/F8_ValidationRule/incloc/.gitkeep, sgdl/F8_ValidationRule/include/.gitkeep, sgdl/F8_ValidationRule/lib/makeboot2, sgdl/F8_ValidationRule/run/.gitkeep, sgdl/F8_ValidationRule/run/F8_check_article_exists.dsl, sgdl/F8_ValidationRule/run/F8_check_email_is_taken.dsl, sgdl/F8_ValidationRule/run/F8_check_user_can_modify_article.dsl, sgdl/F8_ValidationRule/run/F8_check_user_can_modify_comment.dsl, sgdl/F8_ValidationRule/run/F8_check_username_is_taken.dsl, sgdl/F8_ValidationRule/run/F8_demo_predicate.dsl, sgdl/F8_ValidationRule/src/.gitkeep, sgdl/F8_ValidationRule/srcloc/.gitkeep, sgdl/F8_ValidationRule/tests/.gitkeep, sgdl/F8_ValidationRule/tests/roundtrip.sh, sgdl/families.md, source/PINNED_COMMIT.txt, tests/baseline.txt, tests/compare_to_upstream.sh, tests/package-lock.json, tests/package.json, tests/postgres/postgres.env, tests/postman/Conduit.postman_collection.json, tests/run_tests.sh).
| file | |
|---|---|
docs/p2t_build_guide.pdf |
open |
scripts/build_frontends.sh |
open |
scripts/convert_and_test.sh |
open |
Development and evaluation use under your
subscription (Terms §5.3); production use of generated
components requires a separate agreement —
[email protected] (§5.4).