feat: initialize Tauri v2 + Vue 3 project

This commit is contained in:
Your Name
2026-02-17 17:46:39 +02:00
parent e3070461c7
commit 051de9604b
11 changed files with 7787 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

16
index.html Normal file
View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ZeroClock</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

7563
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

34
package.json Normal file
View File

@@ -0,0 +1,34 @@
{
"name": "zeroclock",
"version": "1.0.0",
"description": "Time tracking desktop application",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview",
"tauri": "tauri"
},
"dependencies": {
"vue": "^3.5.0",
"vue-router": "^4.5.0",
"pinia": "^2.3.0",
"@vueuse/core": "^12.0.0",
"chart.js": "^4.4.0",
"vue-chartjs": "^5.3.0",
"jspdf": "^2.5.0",
"lucide-vue-next": "^0.400.0",
"shadcn-vue": "^2.4.3",
"@tauri-apps/api": "^2.2.0"
},
"devDependencies": {
"@tauri-apps/cli": "^2.2.0",
"@vitejs/plugin-vue": "^5.2.0",
"typescript": "^5.7.0",
"vite": "^6.0.0",
"vue-tsc": "^2.2.0",
"tailwindcss": "^4.0.0",
"@tailwindcss/vite": "^4.0.0",
"autoprefixer": "^10.4.0"
}
}

38
src/App.vue Normal file
View File

@@ -0,0 +1,38 @@
<script setup lang="ts">
// Main App component - layout placeholder
</script>
<template>
<div class="h-full w-full flex flex-col bg-background">
<!-- TitleBar placeholder -->
<header class="h-10 flex items-center justify-between px-4 bg-surface border-b border-border" data-tauri-drag-region>
<div class="flex items-center gap-2">
<span class="text-amber font-semibold">ZeroClock</span>
</div>
<div class="flex items-center gap-2">
<!-- Window controls would go here -->
</div>
</header>
<!-- TimerBar placeholder -->
<div class="h-16 flex items-center justify-center bg-surface border-b border-border">
<span class="text-text-secondary">Timer Bar Placeholder</span>
</div>
<!-- Main content area -->
<div class="flex-1 flex overflow-hidden">
<!-- Sidebar placeholder -->
<aside class="w-16 flex flex-col items-center py-4 bg-surface border-r border-border">
<div class="text-text-secondary text-sm">Sidebar</div>
</aside>
<!-- Main content -->
<main class="flex-1 p-6 overflow-auto">
<router-view />
</main>
</div>
</div>
</template>
<style scoped>
</style>

10
src/main.ts Normal file
View File

@@ -0,0 +1,10 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import './styles/main.css'
const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
app.mount('#app')

57
src/styles/main.css Normal file
View File

@@ -0,0 +1,57 @@
@import "tailwindcss";
@theme {
--color-background: #0F0F0F;
--color-surface: #1A1A1A;
--color-surface-elevated: #242424;
--color-border: #2E2E2E;
--color-text-primary: #FFFFFF;
--color-text-secondary: #A0A0A0;
--color-amber: #F59E0B;
--color-amber-hover: #D97706;
--color-amber-light: #FCD34D;
--color-success: #22C55E;
--color-warning: #F59E0B;
--color-error: #EF4444;
--font-sans: 'IBM Plex Sans', system-ui, sans-serif;
--font-mono: 'IBM Plex Mono', monospace;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body, #app {
height: 100%;
width: 100%;
overflow: hidden;
}
body {
font-family: var(--font-sans);
background-color: var(--color-background);
color: var(--color-text-primary);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Custom scrollbar styles */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: var(--color-surface);
}
::-webkit-scrollbar-thumb {
background: var(--color-border);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--color-text-secondary);
}

7
src/vite-env.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
/// <reference types="vite/client" />
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

24
tsconfig.json Normal file
View File

@@ -0,0 +1,24 @@
{
"compilerOptions": {
"target": "ES2021",
"useDefineForClassFields": true,
"module": "ESNext",
"lib": ["ES2021", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "preserve",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}

11
tsconfig.node.json Normal file
View File

@@ -0,0 +1,11 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true
},
"include": ["vite.config.ts"]
}

26
vite.config.ts Normal file
View File

@@ -0,0 +1,26 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import tailwindcss from '@tailwindcss/vite'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
plugins: [vue(), tailwindcss()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
clearScreen: false,
server: {
port: 1420,
strictPort: true,
watch: {
ignored: ['**/src-tauri/**']
}
},
build: {
target: ['es2021', 'chrome100', 'safari13'],
minify: !process.env.TAURI_DEBUG ? 'esbuild' : false,
sourcemap: !!process.env.TAURI_DEBUG
}
})