Welcome to the Bit documentation. Start your journey here to leverage composability for building your next project. Below you will learn to create and release your first Bit components.
Run the following to install Bit:
Initialize Bit on a new folder or in an existing project by running the following command:
Make sure to create your scope on the Bit platform and use the right org and project name. After running the command, Bit is initialized on the chosen directory, and ready to be used via Bit commands, AI agent, your editor or the Bit UI!
Start your next project with Hope AI
Use natural language and file attachments for generating using Hope AI for a ready-to-go, web-based and integrated development workspace with professional architecture and code tailored to your specific needs.
Create the application shell to run, compose and deploy your application:
Run the application:
Head to http://localhost:3000
to view your application shell. You can start composing the application layout and specific pages to build your application. Learn more on building applications or optionally learn maintaining an independent workspace.
Create the components to compose into the feature. Run the following command to create a new React UI component for the application login route:
Adjust the React login to your needs and finally compose the component into the application:
import { Login } from '@my-org/users.pages.login'; import { Routes, Route } from 'react-router-dom'; export function CorporateWebsite() { return ( <AcmeTheme> <NavigationProvider> <Routes> <Route path="/" element={<div>Hello world</div>} /> <Route path="/login" element={<Login />} /> </Routes> </NavigationProvider> </AcmeTheme> ); }
Head to http://localhost:3000/login
to view your new login page.
You can use bit templates
to list official templates or find guides for creating React hooks, backend services, NodeJS modules, UI components and more on our create components page.
Optionally, use bit start
to run the Bit UI to preview components in isolation.
Authenticate with the Bit platform:
Use semantic versioning to version your Bit components:
By default, Bit uses Ripple CI to build and deploy Bit components. You can use the --build
flag to build the Bit components on the local machine. Learn more on setting Kubernetes and other deployment methods.
After versioning, you can proceed to release your components:
Congrats! 🎉 Your platform is now being deployed! You can now view your deployment process on Ripple CI in the Bit platform.
You can create independent workspaces to build, maintain and release Bit components independently. Below are examples to a feature and a platform workspace:
You can install components from different workspaces as external dependencies:
Learn more about independent workspaces on the getting started guide.
The best approach for adopting composability is starting to create new features in Bit while leveraging 100% of your existing codebase. You can either leverage your existing code using existing packages, backend APIs or by packaging your existing app codebase for reuse in Bit components.
Bit components can also be reused in existing projects to start gradually introducing composable software into your stack using standard package managers and without affecting your existing project build process:
Learn more on gradual adoption on the Harmony documentation.