MCPcopy Index your code
hub / github.com/GeekyAnts/unitools

github.com/GeekyAnts/unitools @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
80 symbols 219 edges 121 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Introduction to Unitools

Unitools is a group of tooling that aims to simplify the process of code sharing between Next.js, Expo, and React Native projects. It's a required and indispensable tool in the realm of cross-platform development today with more and more apps moving towards universal app development. Unitools provides a unified API for handling images, links, and route navigation hooks across all these platforms.

Documentation

You can find more details on documentation website.

Why?

The challenge of sharing code for navigation and images across platforms like Next.js and Expo has always been a significant hurdle for developers because of the fragmented APIs. These platforms, although powerful in their own right, have distinct structures and syntax, which creates an added layer of complexity when writing code. Unitools is designed to address this specific problem. By enabling seamless code sharing between these platforms, Unitools eliminates the need for developers to write separate sets of code, thus saving time and effort and allowing for a smoother workflow.

How it is different?

There are other tools in the market that attempt to solve the same problem, such as Solito. These tools, while offering much more features also adds a layer of complexities and learning curve.

Unitools is designed to be simple and easy to use. It provides a unified API but only for your DX and rely on the bundler to use the actual platform specific code. This makes it easier to understand and use.

What’s included?

Each package contains three libraries.

  1. Base package which exports the interface
  2. Expo package
  3. Next.js package

Below are the packages we have created so far:

  • Link - A unified API for expo and next link
  • Image -A unified API for expo and next image
  • Router - A unified API for expo and next router

Extension points exported contracts — how you extend this code

LinkProps (Interface)
(no doc)
packages/link/src/index.tsx
IImageProps (Interface)
(no doc)
packages/image/src/index.tsx
RouterProps (Interface)
(no doc)
packages/router/src/index.tsx

Core symbols most depended-on inside this repo

addRequireCall
called by 3
packages/babel-plugin-universal-image/src/index.js
getExactDependenciesFromNodeModules
called by 3
packages/next-adapter/src/utils.ts
getDependenciesFromNodeModules
called by 3
packages/next-adapter/src/utils.ts
useRouter
called by 3
packages/router/src/index.tsx
useColorScheme
called by 3
apps/expo-router-example/components/useColorScheme.web.ts
splitFontWeight
called by 2
packages/fonts-plugin/helpers/index.js
useFonts
called by 2
packages/fonts-loader/src/index.js
withUnitools
called by 2
packages/next-adapter/src/index.ts

Shape

Function 77
Interface 3

Languages

TypeScript100%

Modules by API surface

packages/next-adapter/src/utils.ts8 symbols
packages/router/src/index.tsx3 symbols
packages/navigation/src/index.tsx3 symbols
packages/fonts-plugin/helpers/index.js3 symbols
packages/babel-plugin-universal-image/src/index.js3 symbols
apps/expo-router-example/components/Themed.tsx3 symbols
packages/router-next/src/index.tsx2 symbols
packages/router-expo/src/index.tsx2 symbols
packages/link/src/index.tsx2 symbols
packages/image/src/index.tsx2 symbols
apps/web/components/ui/gluestack-ui-provider/index.web.tsx2 symbols
apps/mobile/App.tsx2 symbols

For agents

$ claude mcp add unitools \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact