Skip to content
Muslu Yüksektepe

GMacros

An AI-assisted CAM desktop app for CNC workshops, together with a store for Alphacam add-ins.

GMacros is a family of software I built for workshops that use CNC machines to produce furniture and decorative parts. Today it is offered as two products. The first is GMacros CAM, an AI-assisted CAM application that does not need Alphacam. The second is an add-in package for workshops that already use Alphacam, delivered with a single installer and a single licence key. I run sales, licensing, invoicing and support through a store and customer panel that I also wrote myself.

Purpose

In a CNC workshop, drawing parts such as fronts, doors, cabinets or decorative panels, setting up toolpaths and producing NC code that fits the machine is often slow and repetitive work. I built GMacros to cut down that repetition. The user enters the dimensions and a few preferences, and the software draws the part, sets up the operations and prepares code the machine can read.

I started by writing macros for Alphacam. Over time those macros turned into products, and selling them required a licensing system. Later, so that workshops without an Alphacam licence could get the same convenience, I wrote GMacros CAM, which handles every step from dimensions to NC code on its own.

How it works

In GMacros CAM the user picks a job such as a front, door, cabinet, 3D wave panel or decor piece and enters its dimensions. The application draws the part, sets up operations and tools by layer with a single click, and previews the toolpath on the drawing. A 3D material removal simulation can be watched if needed, and parts can be nested on a sheet. In the last step the user gets NC output suited to the selected machine. Users can import their own Alphacam tool and post files, but those files are never embedded in the application or distributed.

In the Alphacam package, the tools are added directly inside Alphacam. The user installs the package once and enters the licence key once, and the key is not asked for again for the duration of a time-based licence.

The customer flow is kept simple as well. The customer looks at the product on the website, picks a plan in the panel, pays and receives the licence key by email. Invoices and support requests are handled in the same panel. On my side, I manage sales, licences, plans and requests from an admin panel.

Key features

  • GMacros CAM runs on Windows, Linux and Android, and it can also be used in the browser.
  • On the AI side there is NirvanaAI, which builds a relief model from a written description, an assistant for cutting values and CNC questions, and a cutting advisor.
  • NirvanaAI produces a 3D relief model from a description written in Turkish and adds it straight to the drawing, so the user does not need a separate modelling program.
  • The 3D Wave Panel tool lets the user pick one of fifty ready-made patterns and draw up to twenty fronts at once, with the pattern continuing seamlessly across neighbouring fronts.
  • GMacros Decor covers baffle slats, kerf bending, separators and carving from a photo.
  • The website has a separate guide page and a usage video for every tool, explaining what it does, which values it asks for and how it is used.
  • In the store the customer chooses a plan and a quantity, and each unit means a separate licence key for one computer.
  • Resellers can place bulk orders from their own panel and hand the keys out to their customers.
  • Emails to customers are sent in the language the customer has chosen in the panel, Turkish or English.

Security

From the start I made it a rule to keep licence validation entirely on the server. The signing key lives only on the server, and the add-in cannot validate a key on its own. A licence key can be active on only one computer at a time. Server responses are signed with RSA and every request carries a one-time value (a nonce) generated by the client. That makes it impossible to bypass the licence by running a fake licence server or editing the hosts file.

Licences come in two types. A time-based licence has an end date. A usage-based licence spends one credit per run, and the counter is kept only on the server. From the admin panel I can send a warning to a specific customer, computer or licence, or stop it from running remotely. To prevent abuse of trial licences, the canonical form of the email address, the phone number, the computer ID and VPN or data centre IP addresses are all checked together.

On the payment side, card details never touch the server. For card payments, the licence is issued only after a verified result arrives from the payment provider. Confirming the payment, recording the subscription and generating licence keys all happen in a single database transaction, so an order cannot be paid for and left without a key. Before buying, the customer accepts the sales agreement, and that acceptance is written to the audit log.

Technical stack

The backend is a Go monorepo. It contains the API, a background worker, a database migration tool and admin utilities as separate commands. The database is PostgreSQL. Customer data is isolated in two layers: row-level security in the database (RLS, meaning each query can only see the rows that belong to that customer) and an extra check in the application layer. For periodic jobs I use River, a queue that runs directly on PostgreSQL, instead of Redis. Files are kept on local disk and downloads are served through Nginx's X-Accel-Redirect feature.

On the web side, the marketing site, the customer panel and the admin panel are written in Next.js. The marketing site is built as static pages and reads product information from the API at build time. The site is bilingual, and it generates structured data and a sitemap that includes video information for search engines.

GMacros CAM is a separate Go module written with Wails and React. Geometry, DXF, toolpaths, post processors, nesting and simulation all live inside that module. The browser version uses the same Go code as the desktop app. A separate child process is started for each user, and Landlock restricts that process so it can only reach that user's own folder. The Linux build ships as a .deb package and the Android build as a WebView shell.

The Alphacam add-ins are written in VBA. The licensing code has a single source, and Python scripts copy it into every package. Installers are produced by an installer I wrote in Go. I do not use Docker on the servers; every service runs as a systemd unit behind Nginx with HTTP/3.

Use cases

  • Shortening the path from dimensions to NC code in furniture workshops that make kitchen, wardrobe and bathroom cabinet fronts.
  • Designing wall panels, acoustic panels and decorative surfaces quickly from ready-made patterns.
  • Generating a relief model from a written description and machining it directly on the CNC.
  • Automating repetitive drawing and operation setup in workshops that use Alphacam.
  • Selling and distributing licences in bulk through resellers.

Status

GMacros CAM is currently in beta and still under development, so some screens and features may change. The Alphacam package and the store are live, and customers handle purchases and licences through the panel.

Category
Products & SaaS
Year
2024

Technologies

  • Go
  • PostgreSQL
  • Wails
  • React
  • Code Signing
  • Microsoft Store

Links

Back to all projects