Skip to content

haiha210/PomoTime

Repository files navigation

PomoTime

PomoTime is a desktop study-time tracker built with Tauri 2 (Rust backend + web frontend).

Project Status

  • Desktop target: Linux and Windows
  • App shell: Tauri 2
  • Product specification: docs/spec.md
  • UI prototype/spec reference: docs/index.html

Current Structure

  • src-tauri/: Rust app and Tauri configuration
  • docs/spec.md: product and implementation spec
  • docs/index.html: UI prototype/spec artifact
  • app-config.js: runtime Supabase config placeholders

Prerequisites

  • Node.js and npm
  • Rust toolchain (cargo, rustc)
  • Tauri Linux system dependencies (for Linux builds)

Example Linux dependencies (Ubuntu/Debian):

sudo apt update
sudo apt install -y \
  pkg-config \
  libwebkit2gtk-4.1-dev \
  libgtk-3-dev \
  libayatana-appindicator3-dev \
  librsvg2-dev \
  patchelf

Install

npm install

Run (Development)

npm run dev

Build

npm run build

On Linux, this command builds the Debian package via fakeroot and keeps it in the Tauri bundle output directory. You can install it directly with:

sudo dpkg -i src-tauri/target/release/bundle/deb/PomoTime_0.1.0_amd64.deb

Cross-build Windows from Linux via Docker

If you do not have a Windows host, you can build the NSIS .exe installer from Linux/WSL using Docker:

npm run build:windows:docker

This builds the image at docker/windows-build.Dockerfile (Rust + Node 22 + cargo-xwin + NSIS) and produces:

src-tauri/target/x86_64-pc-windows-msvc/release/bundle/nsis/*-setup.exe

Notes:

  • Requires Docker installed on the host.
  • First run downloads the MSVC SDK via cargo-xwin (~700 MB) and caches it in a named volume.
  • Only the NSIS bundle is produced. MSI requires WiX which only runs on Windows; build MSI on a Windows host or via the GitHub Actions desktop-build (windows-latest) job.

Build on a Windows host

On Windows, run the same npm run build (or npm run build:windows) from a Windows host. It produces both an NSIS .exe and an MSI installer:

  • src-tauri\target\release\bundle\nsis\PomoTime_0.1.0_x64-setup.exe
  • src-tauri\target\release\bundle\msi\PomoTime_0.1.0_x64_en-US.msi

Windows prerequisites:

  • Visual Studio Build Tools with the "Desktop development with C++" workload (provides the MSVC toolchain).
  • WebView2 runtime (Tauri's downloadBootstrapper mode auto-installs it during setup).
  • WiX Toolset is downloaded by Tauri on first MSI build; no manual install needed.

NPM Scripts

  • npm run dev: start Tauri in development mode
  • npm run build: build desktop bundles
  • npm run tauri: run Tauri CLI directly

Supabase Runtime Config

Prefer environment variables so you do not commit keys into git.

Add these variables to .env.local (or .env for local-only setups):

  • VITE_POMOTIME_SUPABASE_URL
  • VITE_POMOTIME_SUPABASE_PUBLISHABLE_KEY
  • VITE_POMOTIME_SUPABASE_ANON_KEY

Legacy fallback keys are still supported if needed:

  • VITE_LEARNTIME_SUPABASE_URL
  • VITE_LEARNTIME_SUPABASE_PUBLISHABLE_KEY
  • VITE_LEARNTIME_SUPABASE_ANON_KEY

app-config.js remains as a runtime fallback for older builds, but it should stay with empty placeholders in the repository. Prefer the publishable key for new setups. The anon key remains supported for backward compatibility.

Important Note About Frontend

Tauri is currently configured with frontendDist = ../dist in src-tauri/tauri.conf.json.

This means production build expects a web frontend output in dist/. If you are using React, ensure your React build step generates dist/ before running npm run build.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages