A collection of developer utilities built with Bun, React, TanStack, and shadcn/ui.
Features β’ Quick Start β’ Available Utilities β’ Development
- π Dark/Light Mode - Toggle between themes, respects system preference
- π± Responsive Design - Works on desktop, tablet, and mobile
- π URL State Sharing - Share your utility configurations via URL
- π Search & Filter - Quickly find utilities or font styles
- β‘ Hot Reload - Instant development feedback with Bun's HMR
- π 320+ ASCII Fonts - View text in every available figlet style
- π’ Sort Options - Default or alphabetical font ordering
# Install dependencies
bun install
# Start development server
bun run dev
# Build for production
bun run build
# Start production server
bun startVisit http://localhost:3000
staticfish-utils/
βββ src/
β βββ routes/ # TanStack Router file-based routes
β β βββ __root.tsx # Root layout with sidebar
β β βββ index.tsx # Homepage
β β βββ ascii-art.tsx # ASCII Art generator utility
β βββ components/
β β βββ ui/ # shadcn/ui components
β β βββ Sidebar.tsx # Navigation sidebar
β β βββ ThemeToggle.tsx # Dark/light mode toggle
β β βββ ThemeProvider.tsx # Theme context provider
β βββ stores/
β β βββ utilities.ts # App state management
β βββ hooks/
β β βββ use-url-state.ts # URL state sharing hook
β βββ lib/
β βββ ascii-art.ts # ASCII art conversion logic
β βββ utils.ts # Utility functions
βββ styles/
β βββ globals.css # Global styles with CSS variables
βββ public/ # Static assets
βββ src/index.ts # Bun server with API routes
Convert any text into ASCII art with 320+ font styles displayed simultaneously.
Features:
- View all fonts at once (no need to click through each one)
- Real-time search to find specific fonts
- Sort by default order or alphabetically (A-Z)
- Copy individual font outputs to clipboard
- Download any font as a .txt file
- Share configurations via URL
- Debounced generation for performance
URL Parameters:
text- Input text to convertsort- Sort order:defaultoralphabetical
Example URLs:
/ascii-art?text=Hello&sort=alphabetical
Create a new file in src/routes/your-utility.tsx:
import { createFileRoute } from '@tanstack/react-router';
export const Route = createFileRoute('/your-utility')({
component: YourUtility,
});
function YourUtility() {
return (
<div>
<h1>Your Utility</h1>
{/* Your utility content */}
</div>
);
}Add to src/stores/utilities.ts:
export const utilitiesStore = createStore<UtilitiesState>({
utilities: [
// ... existing utilities
{
id: 'your-utility',
name: 'Your Utility',
path: '/your-utility',
description: 'Brief description of what your utility does',
icon: 'IconName', // From lucide-react
category: 'Category',
featured: true, // Shows on homepage
},
],
recentlyUsed: [],
searchQuery: '',
sidebarOpen: true,
});Add to your utility component:
import { utilitiesActions } from '@/stores/utilities';
function YourUtility() {
useEffect(() => {
utilitiesActions.addToRecentlyUsed('your-utility');
}, []);
// ... component code
}The use-url-state hook synchronizes state with URL query parameters for easy sharing.
import {
useURLStringState,
useURLNumberState,
useURLBooleanState,
useURLObjectState,
} from '@/hooks/use-url-state';// String state
const [text, setText] = useURLStringState('text', 'Hello');
// Number state
const [count, setCount] = useURLNumberState('count', 10);
// Boolean state
const [enabled, setEnabled] = useURLBooleanState('enabled', false);
// Object state (JSON)
const [config, setConfig] = useURLObjectState('config', { key: 'value' });Create custom URL state hooks:
export function useURLCustomState() {
return useURLStringState('custom', 'default-value', 500); // 500ms debounce
}Themes are managed via next-themes:
import { useTheme } from 'next-themes';
function MyComponent() {
const { theme, setTheme } = useTheme();
return (
<button onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}>
Toggle Theme
</button>
);
}Colors are defined in styles/globals.css with CSS variables:
:root {
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--primary: oklch(0.205 0 0);
/* ... more colors */
}
.dark {
--background: oklch(0.145 0 0);
--foreground: oklch(0.985 0 0);
/* ... dark mode colors */
}POST /api/ascii-art
Content-Type: application/json
{
"text": "Hello",
"font": "Standard",
"horizontalLayout": "default",
"verticalLayout": "default"
}Response:
{
"ascii": " _ _ \n | | | | ___ \n ..."
}POST /api/ascii-art/all
Content-Type: application/json
{
"text": "Test"
}Response:
{
"results": {
"Standard": "ASCII art...",
"Big": "ASCII art...",
"...": "..."
},
"total": 323
}GET /api/ascii-artResponse:
{
"fonts": [
"BlurVision ASCII",
"Stacey",
"DOS Rebel",
"...",
"Standard"
]
}bun install # Install dependencies
bun run dev # Start dev server with HMR
bun run build # Build for production
bun start # Start production server
bunx tsc --noEmit # Type checkbunx shadcn@latest add [component-name]Available components: button, input, card, textarea, select, scroll-area, etc.
- TypeScript strict mode enabled
- Use existing shadcn/ui components
- Follow existing patterns for new utilities
- Keep utility functions in
src/lib/ - Store shared state in
src/stores/
| Category | Technology |
|---|---|
| Runtime | Bun |
| Framework | React 19 |
| Routing | TanStack Router |
| State Management | TanStack Store |
| UI Components | shadcn/ui |
| Styling | Tailwind CSS 4 |
| Icons | Lucide React |
| Theme Management | next-themes |
| Notifications | Sonner |
| ASCII Art | figlet |
- Zero-Bundle Size Overhead - TanStack libraries are tree-shakeable
- Lazy Loading - Routes load on demand
- Optimized Debouncing - 300-500ms delays prevent API spam
- Bun's HMR - Sub-100ms hot module replacement
- Minimal Client-Side - ASCII generation happens on server
MIT License - feel free to use this project for learning or building your own utilities.
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-utility) - Add your utility
- Test thoroughly
- Commit changes (
git commit -m 'Add amazing utility') - Push to branch (
git push origin feature/amazing-utility) - Open a Pull Request