Skip to content

Latest commit

 

History

History

with-react-vite

Vite (React) Example App for Capsule Integration

Welcome to the Vite (React) example app for Capsule integration! This app is part of the Capsule examples monorepo, designed to demonstrate how to integrate Capsule across various web development frameworks and setups.

Monorepo Structure

Our examples monorepo is organized into two primary folders:

  1. packages/: Contains framework-specific subfolders (e.g., with-nextjs, with-react-craco, with-react-vite). Each subfolder includes the necessary configurations for compilation and bundling specific to that framework.

  2. packages/shared-examples/: This shared folder contains components and examples used across all React-based frameworks. It houses individual example files demonstrating end-to-end flows for different Capsule integration scenarios.

Shared Components

All our React-based examples share the same UI components built with Shadcn UI and TailwindCSS. These components can be found in the packages/shared-examples directory.

Integration Examples

The packages/shared-examples/examples folder contains dedicated files for each Capsule integration flow, built as end-to-end examples. Here's a brief overview of each example:

More examples coming soon!

Getting Started

This monorepo uses Lerna to manage multiple packages and applications. You can run each app independently or all apps simultaneously. Each app will run on its own port, allowing you to test multiple examples at once.

To get started:

  1. Clone the monorepo
  2. Navigate to the root directory
  3. Install dependencies:
    yarn install
    

Running the Apps

You can run the apps using the following commands from the root directory:

  • To run this Vite example:

    yarn start:with-react-vite
    
  • To run all apps simultaneously:

    yarn start:all
    

Clean Install

If you need to perform a clean installation:

yarn clean-install

This will remove all node_modules, lock files, and build artifacts before reinstalling dependencies.

For more detailed information about Capsule integration, please refer to our official documentation.