redstraw
v1.1.0
Published
Modern type-safe content management for Next.js 16+ and Vite. Transform Markdown, MDX, YAML, JSON into your app's data layer with full TypeScript support and Turbopack optimization.
Downloads
39
Maintainers
Readme
✨ What is RedStraw?
RedStraw is a modern, type-safe content management system designed specifically for Next.js 16+ and Vite projects. It transforms your Markdown, MDX, YAML, and JSON files into a strongly-typed data layer with zero-cost abstractions.
Built with Turbopack optimization in mind, RedStraw provides blazing-fast content processing with full TypeScript support throughout your entire workflow.
🎯 The Problem RedStraw Solves
Managing static content (blog posts, documentation, product pages) in modern JavaScript apps is challenging:
- Type Safety: You write content in files but want TypeScript validation
- Developer Experience: No IDE autocomplete or type checking for your content
- Build Performance: Traditional solutions are slow and bloated
- Flexibility: You need framework-agnostic, customizable solutions
RedStraw solves all of this. ✨
🌍 What's in a Name?
"RedStraw" refers to layers of rock or earth — each layer distinct yet building upon others. Similarly, RedStraw builds your content layer, with each piece precisely typed and validated.
🚀 Key Features
- ⚡ Next.js 16 + Turbopack Ready - Optimized for the latest Next.js with Turbopack support for maximum speed
- 🔒 Type-Safe - Full TypeScript schemas with Zod validation and automatic type generation
- 🎯 Framework Agnostic - JSON, ESM, and TypeScript declaration outputs work with any JavaScript framework
- 📦 Lightweight - Minimal dependencies, native Node.js APIs, optimized for both build time and runtime
- 🛠️ Powerful - Built-in support for Markdown, MDX, YAML, JSON with relative file/image processing
- ⚙️ Configurable - Customizable input/output directories, loaders, hooks, and transformation pipelines
- 🔧 Extensible - Support for custom file types, field validation, and output formats
🚀 What Makes RedStraw Different?
- ✅ Modern Stack: Built for Next.js 16, React 19, and Turbopack
- ✅ Better DX: Cleaner config API, faster builds
- ✅ Type-Safe: Full TypeScript integration with Zod validation
- ✅ Framework Agnostic: Works with any JavaScript framework or library
- ✅ Actively Maintained: Regular updates and improvements
- ✅ Lightweight: Minimal dependencies, native Node.js APIs
📚 Quick Start
npm install redstraw
# or
pnpm add redstraw🔗 Next.js 16 Integration
RedStraw is optimized for Next.js 16 with Turbopack:
// next.config.ts
import { withRedStraw } from 'redstraw/next'
export default withRedStraw({
// your Next.js config
})Then run with Turbopack for maximum performance:
next dev --turbopack📖 Documentation
- Getting Started - Setup RedStraw in 5 minutes
- Collections Guide - Define your content structure
- Next.js 16 Integration - Turbopack-optimized setup
- API Reference - Complete API documentation
- Examples - Learn by example
🌐 Try RedStraw Online
Experience RedStraw directly in your browser:
🤝 Who Uses RedStraw?
RedStraw is trusted by teams building:
- 📝 Blog platforms and documentation sites
- 🏢 Corporate websites with dynamic content
- 📚 Knowledge bases and wikis
- 🛍️ E-commerce product catalogs
🛣️ Roadmap
- [ ] Incremental content builds for faster development
- [ ] Content versioning and drafts
- [ ] Built-in image optimization
- [ ] GraphQL API export option
- [ ] Remote content sources (CMS integration)
- [ ] Caching layer improvements
- [ ] More built-in schema types
- [ ] CLI scaffolding tool
See CHANGELOG.md and the open issues for more details.
🐛 Found a Bug?
Please open an issue on GitHub.
💬 Have Questions?
- 📖 Check the documentation
- 💭 Look at examples
- 🆘 Search existing issues
🔄 Upgrading Your Setup
If you're looking to modernize your content management system, RedStraw offers a fresh, type-safe approach built for today's JavaScript ecosystem.
🤝 Contributing
We welcome contributions!
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
MIT © RedStraw Contributors
