Socket
Socket
Sign inDemoInstall

storyweaver

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

storyweaver

Sets up React with Storybook for component-driven development, including a FastAPI server to mock API responses from user-generated JSON files. Automates Storybook configuration, story generation, and optional mock server startup.


Maintainers
1

StoryWeaver

Overview

StoryWeaver sets up a React environment with Storybook for component-driven development and testing. It includes an integrated FastAPI server to mock API responses using user-generated JSON files. The setup script automates Storybook configuration, story generation for React components, and optional FastAPI mock server startup, enhancing the development workflow.

Features

  • Storybook Integration: Automatically configures Storybook for your React project.
  • Story Generation: Generates story files for each React component.
  • API Mocking: Uses FastAPI to mock API responses from user-provided JSON files.

Installation

  1. Clone the Repository

    git clone https://github.com/yourusername/storyweaver.git
    cd storyweaver
    
  2. Install Dependencies

    Using Poetry:

    poetry install
    
  3. Initialize Your React Project

    If you haven't already, set up your React project and install Storybook:

    npx create-react-app my-project
    cd my-project
    npx sb init
    

Usage

  1. Setup Storybook and Generate Stories

    poetry run python setup_storybook.py path/to/components
    
  2. Optionally, Start the FastAPI Mock Server

    poetry run python setup_storybook.py path/to/components --mock
    
  3. Run Storybook

    npm run storybook
    

Project Structure

  • setup_storybook.py: Script to configure Storybook and generate stories.
  • mock_api.py: FastAPI server script to mock API responses.
  • mock_api: Directory containing user-generated JSON files for API responses.

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc