📦 Blend RN
Blend RN is a custom DSL-based React Native project generator. It allows developers to declare app layouts, screens, and navigation structure using a simple, readable grammar, and then automatically generates React Native boilerplate code.
📖 Grammar Overview
Blend RN uses a declarative grammar to define the navigation and screen structure for your React Native application.
📑 Example
layout Auth type(Stack) {
page LandingScreen
page SplashScreen
}
📚 Grammar Explanation
Keyword | Description | Example |
---|
layout | Defines a navigation layout (Stack, Drawer, Tab) | layout Auth type(Stack) |
page | Defines a screen/page inside a layout | page SplashScreen |
type | Specifies the navigation type for a layout | type(Stack) , type(Drawer) |
📌 Supported Navigation Types:
You can nest layouts and pages to build multi-level navigation structures.
🛠️ Blend RN CLI Commands
Blend RN provides a simple CLI interface to process grammar files and generate your app’s codebase.
1️⃣ blend-rn chop
Purpose:
Parses the grammar files and converts them into intermediate JSON representations.
Usage:
blend-rn chop
2️⃣ blend-rn prepare
Purpose:
Reads the intermediate JSON files generated by chop
and creates the necessary React Native components, navigation, and boilerplate code.
Usage:
blend-rn prepare
3️⃣ blend-rn serve
Purpose:
Starts the React Native Metro bundler and runs the application on the configured emulator or connected device.
Usage:
blend-rn serve
📂 Example Workflow
Given this grammar in your grammar file:
layout Auth type(Stack) {
page LandingScreen
page SplashScreen
}
Run the following commands:
blend-rn chop
blend-rn prepare
blend-rn serve
✅ This will automatically:
- Parse your grammar
- Generate navigation files and screens
- Launch the app with a working navigation structure
📦 Project Structure (After prepare
)
src/
└── layouts/
└── Auth/
└── index.tsx
└── screens/
├── LandingScreen/
└── index.tsx
└── SplashScreen/
└── index.tsx
└── App.tsx
└── navigation/
📞 Support
For issues, improvements, or suggestions — feel free to raise a ticket or contact the project maintainer.
📃 License
This project is licensed under the MIT License.