Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/oneananda/reactflow-reactnative-builder

reactflow-reactnative-builder
https://github.com/oneananda/reactflow-reactnative-builder

Last synced: about 1 month ago
JSON representation

reactflow-reactnative-builder

Awesome Lists containing this project

README

        

---

# ReactFlow ReactNative Builder

**ReactFlow ReactNative Builder** is a drag-and-drop tool for building React Native pages using ReactFlow. This project allows users to visually create UI components and generate React Native code in real-time, making mobile app development faster and more intuitive.

---

## Features

- πŸ–±οΈ **Drag-and-Drop Interface**: Create UI layouts by dragging and dropping components.
- ⚑ **React Native Code Generation**: Instantly generate React Native code for your designs.
- 🌟 **Customizable Components**: Extendable to add your own components.
- πŸ’Ύ **Export Code**: Save generated code as a `.js` file for integration into your projects.
- πŸ“¦ **Mobile-Ready**: Use the generated code with Expo or React Native CLI for rapid development.

---

## Installation

1. Clone the repository:
```bash
git clone https://github.com/oneananda/reactflow-reactnative-builder.git
cd reactflow-reactnative-builder
```

2. Install dependencies:
```bash
npm install
```

3. Start the development server:
```bash
npm start
```

4. Open your browser at [http://localhost:3000](http://localhost:3000).

---

## Usage

1. **Drag Components**: Use the sidebar to drag components like `Text`, `Button`, and `View` onto the canvas.
2. **Customize Properties**: Click on a component to modify its properties, such as text, color, or dimensions.
3. **Generate Code**: Click the **Generate Code** button to see the corresponding React Native code.
4. **Export Code**: Save the generated code as a `.js` file for further development.

---

## Example

Here’s a sample of the generated code:

```jsx
import React from 'react';
import { View, Text, Button } from 'react-native';

const GeneratedPage = () => {
return (

Welcome to ReactFlow!
alert('Button Pressed')} />

);
};

export default GeneratedPage;
```

---

## Folder Structure

```
reactflow-reactnative-builder/
β”œβ”€β”€ public/
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”œβ”€β”€ Sidebar.jsx # Drag-and-drop sidebar
β”‚ β”‚ β”œβ”€β”€ CustomNodes.jsx # Custom ReactFlow nodes
β”‚ β”œβ”€β”€ utils/
β”‚ β”‚ β”œβ”€β”€ codeGenerator.js # Logic to generate React Native code
β”‚ β”œβ”€β”€ App.js # Main application entry point
β”‚ β”œβ”€β”€ index.js # React DOM renderer
β”œβ”€β”€ package.json
```

---

## Contributing

Contributions are welcome! πŸŽ‰

1. Fork the repository.
2. Create a new branch:
```bash
git checkout -b feature-name
```
3. Make your changes and commit:
```bash
git commit -m "Add feature-name"
```
4. Push to your fork and submit a pull request.

---

## Roadmap

- [ ] Add more React Native components (e.g., `Image`, `TextInput`).
- [ ] Implement real-time preview of the generated code.
- [ ] Add functionality for nested components.
- [ ] Support importing/exporting project configurations.

---

## License

This project is licensed under the [MIT License](LICENSE).

---

## Acknowledgments

- [ReactFlow](https://reactflow.dev/) for the drag-and-drop diagram builder.
- [React Native](https://reactnative.dev/) for powering cross-platform mobile apps.

---

Happy coding! 😊