2026-10-17 10:49:38 +00:00
|
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
|
|
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
|
compatibilityDate: '2025-05-01',
|
|
|
|
|
devtools: { enabled: false },
|
|
|
|
|
|
|
|
|
|
// The editor lives in the browser (canvas, localStorage), so no SSR.
|
|
|
|
|
ssr: false,
|
|
|
|
|
|
|
|
|
|
modules: ['@nuxt/fonts', '@nuxt/icon'],
|
|
|
|
|
|
|
|
|
|
fonts: {
|
|
|
|
|
families: [
|
|
|
|
|
{ name: 'Inter', weights: [400, 500, 600, 700], provider: 'google' },
|
|
|
|
|
{ name: 'JetBrains Mono', weights: [400, 600], provider: 'google' },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
css: ['~/assets/css/main.css'],
|
|
|
|
|
|
|
|
|
|
vite: {
|
|
|
|
|
plugins: [tailwindcss()],
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
icon: {
|
|
|
|
|
serverBundle: { collections: ['lucide'] },
|
|
|
|
|
cssLayer: 'base',
|
|
|
|
|
clientBundle: { scan: true },
|
|
|
|
|
},
|
|
|
|
|
|
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
|
|
|
// Share links live as JSON files in data/shares (a volume in production).
|
|
|
|
|
nitro: {
|
|
|
|
|
storage: {
|
|
|
|
|
shares: { driver: 'fs', base: './data/shares' },
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
2026-10-17 10:49:38 +00:00
|
|
|
runtimeConfig: {
|
|
|
|
|
public: {
|
|
|
|
|
siteUrl: 'https://logicate.blax.at',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
app: {
|
|
|
|
|
head: {
|
|
|
|
|
htmlAttrs: { lang: 'en' },
|
|
|
|
|
title: 'Logigate: build a computer from NAND gates',
|
|
|
|
|
meta: [
|
|
|
|
|
{ charset: 'utf-8' },
|
|
|
|
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
|
|
|
|
{
|
|
|
|
|
name: 'description',
|
|
|
|
|
content: 'Draw logic circuits, simulate them live, and package them into reusable components. Start with a NAND gate and work up to a computer.',
|
|
|
|
|
},
|
|
|
|
|
{ name: 'theme-color', content: '#0e1116' },
|
|
|
|
|
],
|
|
|
|
|
link: [{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' }],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
routeRules: {
|
|
|
|
|
'/**': {
|
|
|
|
|
headers: {
|
|
|
|
|
'X-Content-Type-Options': 'nosniff',
|
|
|
|
|
'X-Frame-Options': 'DENY',
|
|
|
|
|
'Referrer-Policy': 'strict-origin-when-cross-origin',
|
|
|
|
|
'Permissions-Policy': 'camera=(), microphone=(), geolocation=(), payment=(), usb=(), interest-cohort=()',
|
|
|
|
|
'Content-Security-Policy': [
|
|
|
|
|
"default-src 'self'",
|
|
|
|
|
"img-src 'self' data: blob:",
|
|
|
|
|
"font-src 'self' data:",
|
|
|
|
|
"style-src 'self' 'unsafe-inline'",
|
|
|
|
|
"script-src 'self' 'unsafe-inline'",
|
|
|
|
|
"connect-src 'self'",
|
|
|
|
|
"frame-ancestors 'none'",
|
|
|
|
|
"base-uri 'self'",
|
|
|
|
|
"form-action 'self'",
|
|
|
|
|
].join('; '),
|
|
|
|
|
'x-powered-by': '',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|