A simple API server that delivers Coolify Tweaks releases with TweakCN theme integration. Makes it easy to get themed stylesheets without dealing with GitHub's CDN quirks.
Ever tried to use custom themes with Coolify Tweaks and ran into CORS issues or CDN restrictions? Yeah, it's annoying. This API fixes that by:
- Bypassing CDN limitations - Direct access to release assets without the headaches
- Dynamic theme injection - Automatically applies TweakCN themes to your stylesheets
- Edge-powered delivery - Fast global performance with Vercel's edge runtime
- Smart caching - Proper headers and optimized delivery
Want the latest Coolify Tweaks with a custom theme? Just grab it:
# Get the latest release with default styling
curl "https://tweaks-api.yourdomain.com/release/latest"
# Apply a theme from TweakCN
curl "https://tweaks-api.yourdomain.com/release/latest?theme=claude"
# Get a specific asset
curl "https://tweaks-api.yourdomain.com/release/latest?asset=coolify-tweaks.zip"# Clone and setup
git clone <your-repo>
cd coolify-tweaks-api
# Install dependencies
bun install
# Start development server
bun run start
# Deploy to Vercel
bun run deployGET /release/:tagQuery Parameters:
asset- Asset filename (default:main.user.css)theme- TweakCN theme ID for CSS transformation
Examples:
# Latest release with default asset
GET /release/latest
# Specific version
GET /release/v1.2.0
# Custom asset
GET /release/latest?asset=installer.js
# With TweakCN theme (this is where the magic happens)
GET /release/latest?theme=claude&asset=main.user.css
# Download as zip
GET /release/latest?asset=coolify-tweaks.zipGET /api/healthReturns service status and basic info.
GET /api/Lists all available endpoints and usage.
The cool part is when you combine Coolify Tweaks with TweakCN themes:
- Request with theme: Add
?theme=<theme-id>to your CSS requests - Automatic processing: The API fetches the theme from TweakCN registry
- CSS transformation: Theme variables get injected into the stylesheet
- Seamless delivery: You get a themed CSS file ready to use
Available themes: Browse TweakCN for theme IDs.
graph LR
A[Client Request] --> B[API Server]
B --> C{Theme Requested?}
C -->|Yes| D[Fetch from TweakCN]
C -->|No| F[GitHub Release]
D --> E[Transform CSS]
F --> G[Return Asset]
E --> G
G --> H[Client]
- Request comes in with optional theme parameter
- GitHub asset fetched from the latest release
- Theme applied (if requested) by fetching CSS variables from TweakCN
- CSS transformed using PostCSS for clean integration
- Response sent with proper caching headers
The API is set up for the techwithanirudh/coolify-tweaks repository, but you can customize:
- Target repository: Edit the owner/repo in
api/index.ts - Default asset: Change the default filename
- Custom processing: Extend the CSS transformation logic
# Using Vercel CLI
vercel deploy
# Or push to main branch for auto-deployment
git push origin mainHave ideas for improvements? Cool, we'd appreciate the help!
- Fork the repository
- Create your feature branch:
git checkout -b my-new-feature - Make your changes and test them
- Commit:
git commit -am 'Add some feature' - Push:
git push origin my-new-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Coolify - The amazing self-hosting platform this enhances
- TweakCN - Beautiful theme system integration
- Vercel - Edge runtime hosting
- Community - Everyone using and improving Coolify Tweaks