tscircuit / snippets

https://snippets.tscircuit.com
MIT License
3 stars 15 forks source link
hacktoberfest

TSCircuit Snippets

Docs · Website · Twitter · discord · Quickstart · Online Playground

TSCircuit Snippets is a web application for creating, sharing, and managing circuit designs using TypeScript and React. It provides an intuitive interface for designing circuit boards, packages, footprints, and 3D models.

Features

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/tscircuit/snippets.git
cd snippets
  1. Install dependencies:
bun install

Running the Development Server

To start the development server:

bun run dev

This command will build the fake API and start the Vite development server. Open http://localhost:5173 in your browser to view the application.

Testing the AI in Development

Create a .env file with the following:

VITE_USE_DIRECT_AI_REQUESTS=true
VITE_ANTHROPIC_API_KEY=<your-key-here>

Building for Production

To build the project for production:

bun run build

This will create a production-ready build in the dist directory.

Project Structure

Snapshots

We use Playwright for visual regression testing. Snapshots are stored in the playwright-tests/snapshots/ directory.

To update a single snapshot run...

bun run snapshot

This will prompt you to select a specific test file to update.

Contributing

We welcome contributions to TSCircuit Snippets! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

License

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

Acknowledgments

For more information, visit tscircuit.com.