Skip to content

matt123p/TinyCADv4

Repository files navigation

TinyCAD

About TinyCAD

This is the source code for TinyCAD. The TinyCAD website is https://www.tinycad.net

The manual for TinyCAD is here: https://docs.tinycad.net

TinyCAD is a circuit diagram editor for creating and editing electronic schematics. It runs in a web browser or as a desktop app via Electron.

It is intended for:

  • Electronics hobbyists
  • Students and educators
  • Makers and prototyping teams
  • Engineers who want a lightweight schematic capture tool

The focus is fast schematic editing, practical symbol/library workflows, and straightforward export options.

This project is a complete re-write of the original C++ TinyCAD (https://github.com/matt123p/TinyCAD).

Installation

Preferred: App Stores

Install from your platform store when available:

  • Windows: Microsoft Store (search for TinyCAD)
  • macOS: Mac App Store (search for TinyCAD)
  • Linux: Snap Store (search for TinyCAD)

Direct: GitHub Releases

If you prefer manual installation, download builds from this repository's GitHub Releases page.

Typical package types:

  • Windows: installer (.exe) or AppX package (.appx)
  • macOS: disk image (.dmg)
  • Linux: Snap (.snap) or Debian package (.deb)

For Windows direct downloads, prefer the .exe installer for local testing unless you have configured an AppX signing certificate. AppX packages built without a signing certificate are suitable for Microsoft Store submission, but Windows will not install them directly for sideload testing.

Use direct downloads when you need a specific version, want to test pre-release builds, or are not using a store-managed install.

Compatibility with Previous Windows Version

TinyCAD for the Web is a full rewrite of the original Windows-only C++ TinyCAD, with a modern TypeScript/React codebase.

Compatibility notes:

  • This version of TinyCAD is file compatible with the previous version. You should be able to simply open existing .dsn and .tclib files.
  • The project keeps TinyCAD's core schematic/library workflow and file association concepts.
  • Because this is a rewrite, some edge-case behavior may differ from the legacy C++ implementation. This should be kept to a miniumum and is not intended. If you have an old design or library that does not behave as expected, please open an issue with a sample file.

Platforms

This project runs in multiple modes:

  • Web (browser): Windows, macOS, Linux, ChromeOS, and any modern browser that supports ES modules and the File System Access API.
  • Desktop App: Windows, macOS, and Linux.

Building from Source

  1. Make sure you have the latest version of Node.js installed
  2. Clone the repository.
  3. Install dependencies. (npm install)

Run Locally (All Modes)

This project has multiple entry points and storage backends. Each mode is started with a different script:

  • Google Drive mode (OAuth + Drive storage)
    • npm run start:ga
  • Local filesystem mode (File System Access API)
    • npm run start:fs
  • Electron mode (desktop app)
    • npm run dev

Build Outputs

  • Google Drive build: npm run build:ga
  • Local filesystem build: npm run build:fs
  • Electon App: npm run dist
  • Generate missing AppX icons: npm run generate:appx-icons
  • Generate missing icon assets: npm run generate:icons
  • Signed test AppX: npm run dist:test-appx

Build artifacts are generated by Parcel based on the mode-specific HTML entry points.

Build scripts run Parcel with cache disabled (and clear .parcel-cache) to ensure clean, reproducible outputs. Start/dev scripts keep Parcel cache enabled for faster local iteration.

Windows AppX Builds

There are two separate Windows AppX workflows in this repository.

Windows Store Submission

Use this when preparing a package for Microsoft Store submission.

  1. Set APPX_PUBLISHER in .env.local to the publisher identity from Partner Center.
  2. Build the package:
    • npm run dist -- --win appx
  3. Submit the generated .appx from release/ to the Store.

Notes:

  • This build is intentionally unsigned.
  • Windows will not install this package directly for local testing.
  • The Store signs the package during submission.
  • Missing icon files are generated automatically from images/TC Icons.svg during packaging.
  • Page 1 generates the main app icon family (TinyCAD.png, TinyCAD.ico, TinyCAD.icns, and the AppX assets).
  • Page 2 generates the TinyCAD design file icon family (TinyCAD File.png, TinyCAD File.ico, TinyCAD File.icns).
  • Page 3 generates the TinyCAD library file icon family (TinyCAD Lib.png, TinyCAD Lib.ico, TinyCAD Lib.icns).

Local AppX Testing

Use this when you need a sideloadable AppX for local installation outside the Store.

  1. Generate or reuse the local test certificate:
    • npm run setup:test-appx
  2. Build and sign the local test package:
    • npm run dist:test-appx
  3. If Add-AppxPackage reports 0x800B0109, open an elevated terminal and refresh certificate trust machine-wide:
    • npm run setup:test-appx -- -MachineWide
  4. Install the generated package:
    • Add-AppxPackage .\release\TinyCAD 4.0.0.appx

What these commands do:

  • npm run setup:test-appx creates a self-signed code-signing certificate in .certs/appx/, imports the public cert into the current user's TrustedPeople and Root stores, and writes the required TEST_* variables into .env.local.
  • npm run setup:test-appx -- -MachineWide reuses the same certificate setup script but also imports the public cert into LocalMachine\TrustedPeople and LocalMachine\Root. This step requires an elevated PowerShell session.
  • npm run dist:test-appx builds the AppX with the test publisher identity and signs the finished package during the same dist run using the newest installed Windows SDK signtool.exe.

Important:

  • If you skip the machine-wide trust step, Add-AppxPackage can fail with 0x800B0109 even if the package signature itself verifies successfully.
  • The test certificate is intended only for local sideload testing.
  • The generated .pfx and .cer files under .certs/ are ignored by git.

Environment Variables and Secrets

Create a local environment file by copying .env.local.example to .env.local and filling in values as needed.

Common local variables:

  • GOOGLE_CLIENT_ID_DEV
  • GOOGLE_CLIENT_ID_PROD
  • GOOGLE_ANALYTICS_ID
  • APPX_PUBLISHER (used for Electron Windows AppX/MSIX packaging)
  • CSC_LINK / CSC_KEY_PASSWORD (used to sign Windows packages, including AppX/MSIX, for local sideload installation)
  • TEST_APPX_PUBLISHER / TEST_CSC_LINK / TEST_CSC_KEY_PASSWORD (written by npm run setup:test-appx for local signed AppX builds)

If CSC_LINK and CSC_KEY_PASSWORD are set, electron-builder signs the Windows artifacts and the generated AppX can be installed locally for testing. If those variables are not set, the AppX is still produced but remains unsigned for Store submission workflows.

  • TEST_* values are managed by the test AppX scripts and normally do not need to be edited by hand.

.env.local is ignored by git and must not be committed.

License

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

About

Cross platform circuit design app for browser and desktop

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors