Project Info
Universal Program Translator (UPT)
UPT is a working compiler-style project translation pipeline. It understands a complete source project, represents it as a Universal Project Representation (UPR), verifies that representation, generates a target project, compiles it, repairs affected files, and validates observable behavior.
For a human walkthrough and navigation map, start with PROJECT_GUIDE.md, then use CODEMAP.md for the deeper phase-by-phase map.
For the hackathon demo, MVP scope, and a ready-to-use Devpost description, see HACKATHON_SUBMISSION.md.
The implementation now includes deterministic discovery, parsing, analysis, capability/behavior extraction, UPR construction and verification, target planning, evidence-backed AI generation, compiler diagnostics, targeted repair, and generated-project validation. See PROJECT_GUIDE.md for supported scope and current MVP boundaries.
Built with Codex and GPT-5.6
Codex with GPT-5.6 helped build and test UPT's analysis, UPR, planning,
generation, compliance, compiler, repair, validation, and dashboard pipeline
during a seven-day build sprint. UPT's compiler frontend remains deterministic;
runtime AI access is isolated behind the provider-independent AIService.
Quick start
From the repository root:
git clone https://github.com/fabulousman12/universal_program_translator.git
cd universal_program_translator
npm install
npm run build
npm start
Open http://localhost:8787.
Frontend dependencies are checked automatically and installed only when missing.
For live generation, create .env.local from .env.example, select one
configured AI provider, and keep API keys
out of source control. For example:
AI_PROVIDER=gemini
GEMINI_API_KEY=your_key
GEMINI_BASE_URL=https://generativelanguage.googleapis.com/v1beta
GEMINI_MODEL=gemini-3.1-flash-lite
Java targets require JDK 17+ and Maven 3.9+ on PATH. The Hono backend serves the production React
build and all /api/* routes from this single process. Use npm run dev for
the backend plus Vite development servers.
To inspect a successful result without an API key, open
demo-output/express-rest-mvp. It includes
the generated Spring project and saved compiler/runtime reports.
Supported environment
- Tested on Windows 11
- Node.js 22
- JDK 17 or newer
- Maven 3.9 or newer
- Git
Other platforms may work, but they are outside the verified submission claim.
Choose a target shape
Java is a language target; Spring Boot is an optional backend framework target. Choose the target according to the source project's observable role:
- Java + Spring Boot (
framework: "spring-boot") for HTTP APIs, backend services, persistence, security, and realtime server applications. - Plain Java (
framework: "none") for command-line tools, libraries, and ordinary framework-free programs. This path creates a minimal Maven/JDK project and does not invent controllers, Spring annotations, or server configuration.
The dashboard exposes both choices. The CLI uses Spring Boot by default for
backward compatibility; pass --framework none for language-only translation:
npm run cli -- prepare example\javascript-basic --id plain-java-demo --framework none
npm run cli -- translate example\javascript-basic --id plain-java-demo --framework none --through compile
Verified MVP translation
The submission fixture is documented in example/README.md. Run its complete JavaScript-to-Spring pipeline with:
npm run cli -- translate example\express-rest-basic --id express-rest-mvp --through validate
Submission claim: Express/JavaScript backend to Spring Boot. The generated project compiles, starts, and passes its UPR-derived HTTP scenarios. Plain Java generation is available as an experimental language-only path; compilation is reported separately from behavioral equivalence until a deterministic CLI/library validation harness is implemented.
Run repository validation with:
npm run typecheck
npm test -- --run
npm run build
Current pipeline usage
Place an already-cloned or extracted project at workspace/sandbox/<project-id>/, then call:
POST /projects/<project-id>/discovery
Content-Type: application/json
{ "target": { "language": "java", "framework": "spring-boot" } }
For a language-only Java target, send:
{ "target": { "language": "java", "framework": "none" } }
The service writes Discovery artifacts to workspace/analysis/<project-id>/. Then call the parser and analysis endpoints:
POST /projects/<project-id>/parser
POST /projects/<project-id>/analysis
POST /projects/<project-id>/behavior
POST /projects/<project-id>/upr
POST /projects/<project-id>/verification
POST /projects/<project-id>/generation-plan
POST /projects/<project-id>/context
POST /projects/<project-id>/prompts
POST /projects/<project-id>/generate
POST /projects/<project-id>/compile
POST /projects/<project-id>/repair
POST /projects/<project-id>/validate
The Parser writes UAST artifacts. The Analysis Engine writes the execution graph, semantic index, resource graph, statistics, and diagnostics. The backend reads metadata and syntax only; it never runs uploaded code or package-manager commands.
Architectural rules
shared/contains domain-neutral contracts and models.engines/contains pipeline-stage ports and future implementations.api/contains transport concerns only.config/,utils/, andworkspace/provide infrastructure services.- Engine code must not depend on Hono or HTTP types.
License
UPT is available under the MIT License.
Analysis
View
Metric
- 10
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- FastAPIIn code
- HTMLIn code
- JavaIn code
- JavaScriptIn code
- MongoDBIn code
- OpenAIIn code
- PostgreSQLIn code
- PythonIn code
- ReactIn code
- RedisIn code
- RustIn code
- TypeScriptIn code
- Node.jsClaimed
14 of 15 appear in the indexed code. 1 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
1.0 MB
Source files
253
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
fabulousman12/universal_program_translator
382 files · 21.4 MB · @ ae0d021
Structure
Interface
11 files · 3%Screens, components and styles rendered to the user.
API & routing
4 files · 1%Request entry points: routes, handlers and controllers.
Application logic
127 files · 33%Domain rules, services and shared utilities.
+11 moreData & schema
15 files · 4%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript86%
- Markdown8%
- XML1%
- Java1%
- JavaScript1%
- Rust1%
- Other (4)1%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 11- @monaco-editor/react
- @tanstack/react-query
- lucide-react
- react
- react-dom
- react-router-dom
- +5 more
package.json
npm · 10- @hono/node-server
- hono
- openai
- pino
- zod
- +5 more
tests/fixtures/express/package.json
npm · 7- express
- pg
- prisma
- typescript
- +3 more
tools/rust-parser/Cargo.toml
cargo · 5- proc-macro2
- quote
- serde
- serde_json
- syn
tests/fixtures/capability-node/package.json
npm · 3- axios
- bcrypt
- jsonwebtoken
tests/fixtures/express-native-websocket/package.json
npm · 2- express
- ws
tests/fixtures/express-redis-boundary/package.json
npm · 2- express
- redis
tests/fixtures/express-socket/package.json
npm · 2- express
- socket.io
tests/fixtures/express-websocket-shape/package.json
npm · 2- express
- ws
tests/fixtures/fastapi/requirements.txt
pypi · 2- fastapi
- uvicorn
tests/fixtures/hono/package.json
npm · 2- hono
- typescript
tests/fixtures/mongoose-schema/package.json
npm · 2- express
- mongoose
tests/fixtures/python-production/requirements.txt
pypi · 2- fastapi
- uvicorn
example/express-rest-basic/package.json
npm · 1- express
tests/fixtures/express-alias/package.json
npm · 1- express
tests/fixtures/express-memory-boundary/package.json
npm · 1- express
tests/fixtures/rust-actix/Cargo.toml
cargo · 1- actix-web
tests/fixtures/rust-axum/Cargo.toml
cargo · 1- axum
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.