-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
This page collects every knob you can turn: environment variables, persisted user settings, and the main configuration files.
The renderer reads a handful of Vite variables. Start from the template:
cp .env.template .env| Variable | Default | Purpose |
|---|---|---|
VITE_BASE_URL |
http://localhost:3000 |
Base URL of the embedded Fastify API. Used by the Axios instance in utils/api.helper.ts. |
VITE_LOG_LEVEL |
debug |
Renderer log verbosity for vue-logger-plugin: error, warn, debug, trace. |
Vite
envDirnote: because the renderer root issrc/renderer(not the project root),vite.config.mjssetsenvDirexplicitly so the root-level.envis loaded. The.envfile is git-ignored.
Runtime user preferences are persisted by electron-store to a JSON file in the user-data directory, and are schema-validated (src/main/stores/settings.ts):
| Key | Type | Default | Notes |
|---|---|---|---|
theme |
'light' | 'dark' |
dark |
Light/dark mode |
primaryColor |
string |
violet |
Name of one of the 17 palettes |
These are read/written from the renderer through the preload IPC bridge (window.settings.get/set). See Frontend for the full flow.
Key settings:
| Option | Value | Why |
|---|---|---|
root |
src/renderer |
The renderer app root |
server.port |
8080 |
Dev server port |
build.outDir |
build/renderer |
Where the production bundle lands |
envDir |
project root | So .env is found despite the custom root |
Plugins: @tailwindcss/vite, @vitejs/plugin-vue, unplugin-vue-components (with the PrimeVue resolver, for auto-import), and rollup-plugin-visualizer (writes a bundle report to dist/bundle-analysis.html).
| Option | Value |
|---|---|
appId |
com.electron.app |
directories.output |
dist |
win.target |
nsis, zip
|
linux.target |
snap |
nsis |
non-one-click, per-user, installation dir changeable |
Files bundled into the app: build/main → main, src/main/static → static, build/renderer → renderer.
Extra resources (shipped alongside, used by the runtime migration/seed system): the generated Prisma client (build/main/prisma), plus prisma/migrations and prisma/seeds.
See Build and Packaging for the full build pipeline.
Points the Prisma CLI at the schema and the dev datasource:
export default defineConfig({
schema: 'src/main/prisma/schema.prisma',
datasource: { url: `file:${path.join(process.cwd(), 'dev.db')}` },
})Details and the runtime DB paths are covered in Database.
| Option | Value |
|---|---|
testDir |
./tests/e2e |
globalSetup |
./tests/global-setup.ts (compiles the main process) |
timeout |
100000 ms |
retries |
1 |
workers |
1 (single worker — the tests share one Electron instance and DB) |
headless |
true |
More in Testing.
| File | Purpose |
|---|---|
.prettierrc.json |
Formatting rules (applied via lint-staged) |
postcss.config.mjs |
PostCSS / Tailwind pipeline |
sonar-project.properties |
SonarQube: project key nextask, sources src, host localhost:9000
|
tsconfig.json (per area) |
Separate TypeScript configs for main, preload, prisma, and renderer
|
.husky/ |
Git hooks (see Contributing) |
Derived at runtime, not user-configurable, but useful to know:
| Constant | Meaning |
|---|---|
IS_DEV |
NODE_ENV === 'development' |
IS_TEST |
--test present in process.argv (used by Playwright to hide the window & skip DevTools) |
DB_PATH |
dev.db (dev) or app.db in user-data (prod) |
MIGRATIONS_PATH / SEEDS_PATH
|
Resolve to src/main/prisma/... in dev, or the packaged resources/prisma/... in prod |
NexTask — a modern cross-platform desktop todo app · Electron · Vue 3 · Prisma · TailwindCSS Repository · Licensed under Apache-2.0
Getting Started
Understanding the App
Deep Dives
Workflow