snaptail
v0.0.5
Published
Run single file application in an instant.
Downloads
3
Maintainers
Readme
Snaptail
A tool for building web apps with React based on Nextjs with single file.
Note that this is alpha version and things may change or break after upgrading.
npx snaptail init
npx snaptail starter.tsx
Shadcn UI starter:
# with shadcn support, every component installed
npx snaptail init --ui shadcn
npx snaptail starter.tsx --ui shadcn
Next step is to redesign the CLI so that the init step does all heavy lifting.
One file applications
Snaptail hides build system under .snaptail dir and allows you to prototype and experiment with single react file.
Includes:
- tailwindcss added
- allows you to define apis within the file
- auto-detects packages and installs them
- typescript support
- shadcn support (alpha)
Why
When you want to build something small or try an idea out and you don't want to setup entire project for that. Use this. You can deploy it too. It is nextjs app at the end.
Also it works great with LLMs, you can generate entire app and just paste it into the file and it will work.
And this project explores how far we can take the idea of single source file applications.
Usage
The single tsx or jsx file needs to export App component and may export api array that defines api routes and handlers.
The starter template is the best way to explore it. You can use npx snaptail init
and take a look.
When you use snaptail init, by default tsconfig is created to help your IDE support ts type hints.