forky
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
index.ts
https://std--10a9511e640d4499a2ae16a9266877fa.web.val.run
A simple web application that allows you to fork Val Town projects with a clean user interface.
Forky is a utility that enables you to create copies (forks) of any public Val Town project. It provides a straightforward interface where you can enter a Val Town project URL and your API token to create your own copy of the project.
- Fork any public Val Town project with a single click
- Preserves the entire project structure, including all files and directories
- Maintains project metadata (descriptions, images, etc.)
- Clean, responsive UI built with React and TailwindCSS
- A Val Town account
- A Val Town API token with project read and write permissions
- Enter the URL of the Val Town project you want to fork (format:
https://www.val.town/x/username/projectname
) - Enter your Val Town API token with the proper
project:write
permissions - Click "Fork" and wait for the process to complete
- Once successful, you'll have a new copy of the project in your Val Town account under a new generated name
βββ backend
β βββ index.ts # Backend server and API endpoints
βββ frontend
β βββ components
β β βββ App.tsx # Main React component
β βββ index.html # HTML entry point
β βββ index.tsx # Frontend JavaScript entry point
βββ README.md # This file
Forky uses the Val Town SDK to:
- Retrieve information about the source project
- Create a new project in your account
- Copy all files from the source project to your new project
- Preserve the project structure and metadata
The application exposes the following API endpoint:
POST /fork?url={encoded-url}
- Forks the specified project- Requires an
Authorization
header with aBearer
token - Returns a JSON response with success or error information
- Requires an