Build electronics with React. The website for tscircuit packages and the online tscircuit editor
npm install @tscircuit/fake-snippetsBuild electronics with React. The website for tscircuit packages and the online tscircuit editor
Docs · Website · Twitter · discord · Quickstart · Online Playground
tscircuit.com 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.
- Create and edit circuit designs using TypeScript and React
- Real-time preview of PCB layouts and 3D models
- Share and collaborate on circuit designs
- AI-assisted circuit design and error correction
- Import and export designs in various formats
- Bun (latest version)
1. Clone the repository:
``bash`
git clone https://github.com/tscircuit/tscircuit.com.git
cd tscircuit.com
2. Install dependencies:
`bash`
bun install
To start the development server:
`bash`
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.
Create a .env file with the following:
`bash`
VITE_USE_DIRECT_AI_REQUESTS=true
VITE_ANTHROPIC_API_KEY=
To enable Sentry error monitoring, set the SENTRY_DSN environment variable before running the app. The value will be exposed to the client as VITE_SENTRY_DSN and used to initialize Sentry.
To build the project for production:
`bash`
bun run build
This will create a production-ready build in the dist directory.
- src/: Contains the main React application codefake-snippets-api/
- : Contains the mock API for developmentpublic/
- : Static assetssrc/components/
- : Reusable React componentssrc/hooks/
- : Custom React hookssrc/pages/
- : Main page componentssrc/lib/
- : Utility functions and helpersplaywright-tests/
- : Playwright test filesplaywright-tests/snapshots/
- : Visual regression test snapshots
We use Playwright for visual regression testing. Snapshots are stored in the playwright-tests/snapshots/ directory.
To update a single snapshot run...
`bash``
bun run snapshot
This will prompt you to select a specific test file to update.
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.
- Arduino Nano Servo Breakout Board
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by val.town, codesandbox.io, and v0.dev
- Built with React, Vite, and Tailwind CSS
For more information, visit tscircuit.com.