Skip to content

Conversation

@ntatoud
Copy link
Member

@ntatoud ntatoud commented Feb 5, 2025

Goals

The goal of this PR is to restructure the repository into two distinct folders to improve organization, scalability, and maintainability:

apps/

This folder will contain:

  • The documentation app (currently under docs/).
  • The example app (currently under example/).

packages/

  • Initially, this will only contain the react-native-ficus-ui package, keeping it as it is currently published on npm.
  • In the future, we will have the flexibility to split the library into smaller, modular packages (private or public), allowing us to:
    • Extract reusable components from react-native-ficus-ui.
    • Define shared configurations (e.g., tsconfig, Prettier, ESLint) for all apps and packages within the repository.

Did some cleaning of the eslint config:

  • Some dependencies where not maintained anymore and thus where removed
  • Update based of start-ui-web configuration

Motivations

This restructuring is driven by several key benefits:

  1. Better Code Organization & Dependency Management

    • A more structured repository will enable simpler package versioning by leveraging pnpm workspaces.
  2. Modular & Scalable UI Library

    • The ability to split the UI library into smaller, reusable, and independent packages will facilitate long-term growth.
  3. Improved Developer Experience

    • The example app now properly resolves the UI library and its types, enabling contributors to catch errors earlier in the development process.
    • This addresses multiple issues I personally encountered, such as incorrectly defined types for several components when setting up the project.
  4. Streamlined Package & Release Management

    • We can integrate tools like changesets to improve the release workflow and version management.

Next Structural Steps (for Future PRs)

  • Clean up dependencies in the various package.json files.
  • Enhance TypeScript configuration for better maintainability.
  • Improve the release process for smoother deployments.
  • Unify ESLint and Prettier configurations across the repository.

These improvements will lay the groundwork for ongoing development, including bug fixes and feature additions.

Breaking changes

Allegedly, the only breaking changes are the dependencies being moved to peerDependencies, as done in #42


Remaining Tasks

  • Update CONTRIBUTING.md.
  • Update the package version.
  • Improve scripts and configurations in package.json.
  • Update Vercel configuration for deploying the documentation website.
  • Fix CI.

Issue:

  • For the docs app, the pnpm dev command is not working because of dependcies not being transpiled properly. The pnpm build && pnpm startstill work.

This PR is a critical first step in making the repository more structured, scalable, and developer-friendly. Looking forward to your feedback!

@vercel
Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-ficus-ui ❌ Failed (Inspect) Feb 13, 2025 2:27pm

@ntatoud ntatoud merged commit dc58926 into next Feb 13, 2025
1 of 2 checks passed
@ntatoud ntatoud deleted the feat/monorepo branch February 13, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants