Hey devs! ๐
Ever wished you could take your Next.js project and turn it into a working React Native Expo app without starting from scratch?
Well, I did too โ so I built ntrn โจ
A developer-friendly CLI that transforms your Next.js App Router project into a complete mobile app.
๐ก What is ntrn?
ntrn is an open-source CLI that:
- ๐ Converts
app/directory routes from Next.js intoscreens/for React Native - ๐ง Transforms
layout.tsxinto a cleanApp.tsxroot for RN - ๐ช Uses the Gemini API to rewrite your JSX into React Native components
- ๐จ Supports Tailwind to NativeWind automatically
- ๐ฆ Detects required packages and exports them into a
requirements.txtfor quick setup
Itโs like giving your web app a passport to the mobile world ๐๐ฑ
๐ ๏ธ How it Works
npx ntrn convert
This command:
- Creates a new Expo React Native app
- Copies & converts your Next.js pages into RN screens
- Transforms layout into an
App.tsxentry point - Keeps external component imports (
@/componentsetc.) - Outputs necessary dependencies
The goal? Make it feel like a native project you wrote by hand โ with minimal lift.
โจ Why I Built This
As a web developer, I love building in Next.js. But when I wanted to reuse the same structure for a mobile app, there wasnโt an easy way โ it felt like starting from zero.
So I thought:
Why not automate the conversion from Next.js to React Native?
ntrn was born from that idea โ a tool for:
- Fullstack devs who want to go cross-platform
- Indie hackers launching MVPs on both web and mobile
- Anyone tired of copy-pasting JSX and rewriting layouts
๐ฆ Try it Out
npx ntrn convert
Or clone it from GitHub:
๐ https://github.com/AmeyKuradeAK/ntrn
๐ธ (Optional) Demo GIF or Screenshot
Include a quick GIF showing the CLI in action, if you have one
๐ Looking for Feedback & Contributors
Would love to hear your thoughts:
- Is this useful for your workflow?
- Whatโs missing or confusing?
- Want to contribute?
The repo is open to issues, PRs, and stars โญ๏ธ
Every bit of support means a lot!
Thanks for reading! If this helped or inspired you, feel free to drop a โค๏ธ or share it with someone building fullstack apps!
Letโs build cool stuff,
~ Amey Kurade
Top comments (1)
Am I understanding the codebase correctly, in that it's not a traditional converter, but rather it's utilizing AI agents to do the conversion for you? If that's the case, I would be more explicit about that.