This is a simple TypeScript application built with Fastify and Tailwind CSS, and using OpenAI's LLM to translate JavaScript code to TypeScript.
Type or paste your JavaScript code in the left editor, click Translate, and view the generated TypeScript on the right.
Before running the app, create a .env
file in the project root with your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser at:
http://localhost:3000
Type or paste your JavaScript code into the textarea, click "Translate", and view the generated TypeScript code.