Skip to content

thatbeautifuldream/playground

Repository files navigation

TypeScript Playground

A modern, browser-based TypeScript and JavaScript playground with real-time execution and console output.

Overview

TypeScript Playground is an interactive development environment that enables developers to write, execute, and experiment with TypeScript and JavaScript code directly in the browser. Built with Next.js and Monaco Editor, it provides a seamless coding experience with instant feedback.

Features

  • Real-time Code Execution: Run TypeScript and JavaScript code instantly with keyboard shortcuts
  • Monaco Editor Integration: Full-featured code editor with syntax highlighting, IntelliSense, and error detection
  • Console Output: View logs and errors in a dedicated console panel
  • Theme Support: Switch between light and dark themes
  • Code Formatting: Format your code with a single command
  • Persistent State: Code is automatically saved to local storage
  • Split Panel Layout: Resizable editor and console views

Getting Started

Prerequisites

  • Node.js 18.x or later
  • pnpm (recommended), npm, or yarn

Installation

# Clone the repository
git clone https://github.com/thatbeautifuldream/playground.git

# Navigate to the project directory
cd playground

# Install dependencies
pnpm install

# Start the development server
pnpm dev

Open http://localhost:3000 to access the playground.

Keyboard Shortcuts

  • Cmd/Ctrl + Enter: Run code
  • Cmd/Ctrl + S: Format code

Technology Stack

  • Framework: Next.js App Router
  • Editor: Monaco Editor
  • Styling: Tailwind CSS
  • State Management: Zustand
  • UI Components: Radix UI
  • Theme: next-themes

Contributing

Contributions are welcome. Please feel free to submit a Pull Request.

License

This project is open source and available under the MIT License.

Acknowledgments

Built with modern web technologies to provide a lightweight and efficient TypeScript playground experience.

Releases

No releases published

Packages

 
 
 

Contributors