You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Jose Olarte III e6f0c7a079 Merge branch 'master' into electron-copy-paste-keyboard-shortcuts 2 days ago
.cursor/rules Merge branch 'master' into profile_include_location 7 days ago
.husky pre-commit(husky): add lint-fix to checks 2 weeks ago
android Merge branch 'master' into android-safe-area-insets 1 week ago
config/assets refactor(assets): convert asset management scripts to TypeScript with tsx 3 weeks ago
doc feat: suppress console spam for expected HTTP errors in profile operations 1 week ago
docker docs: comprehensive documentation updates and modernization 2 weeks ago
electron feat(electron): add editMenu to enable copy/paste keyboard shortcuts 5 days ago
ios Chore: regenerate podfile.lock checksum 1 week ago
public add another sample boundary frame for the certificate view of a claim 9 months ago
resources docs: comprehensive documentation updates and modernization 2 weeks ago
scripts fix(electron): resolve TypeScript errors in Electron build configuration 7 days ago
src refactor: remove deprecated lastName field from user settings 2 days ago
sw_scripts Remove PWA functionality and service worker infrastructure 2 months ago
test-playwright Merge branch 'playwright-test-60-fix' into didview-invalid-did-handling 7 days ago
test-scripts rename app ID from app.timesafari.app to app.timesafari & adjust tests (Java 20 works) 6 months ago
.browserslistrc init 3 years ago
.cursor-markdown-rules.md docs: update build pattern conversion plan with consistent naming and mode handling 2 months ago
.dockerignore refactor: complete migration from GitHub to Gitea 2 weeks ago
.env.development fix(build): resolve shell script export error in .env.development 3 weeks ago
.env.production feat(logging): implement configurable log levels via VITE_LOG_LEVEL 3 weeks ago
.env.test fix(env): resolve malformed comment in .env.test causing shell export errors 2 weeks ago
.eslintrc.js feat(ci): enforce type safety with ESLint errors and pre-commit validation 3 weeks ago
.gitignore chore: ignore state files 1 week ago
.markdownlint-cli2.jsonc Merge branch 'master' into android-safe-area-insets 1 week ago
.markdownlint.json Merge branch 'master' into android-safe-area-insets 1 week ago
.node-version feat(assets): standardize asset configuration with capacitor-assets 3 weeks ago
.npmrc WIP: Fix Electron build issues and migrate to @nostr/tools 2 months ago
.nvmrc feat(assets): standardize asset configuration with capacitor-assets 3 weeks ago
BUILDING.md Merge pull request 'fix(electron): resolve TypeScript errors in Electron build configuration' (#187) from electron-build-config-overwrite into master 2 days ago
CHANGELOG.md docs: comprehensive documentation updates and modernization 2 weeks ago
CONTRIBUTING.md add recipient description to offers in user's list 1 year ago
Dockerfile Fix Docker build issues and SQL worker configuration 1 month ago
Gemfile fix: resolve duplicate APP_SERVER import declarations 1 month ago
Gemfile.lock update lock files to match current build 1 month ago
LICENSE add license file 9 months ago
README-PR-TEMPLATE.md docs: add comprehensive Build Architecture Guard documentation 2 weeks ago
README.md doc: add simpler instruction to get started with testing 1 week ago
TASK_storage.md docs: comprehensive documentation updates and modernization 2 weeks ago
build.sh feature: adding Dockerfile for online testing or deployment to docker 4 months ago
capacitor-assets.config.json feat(assets): standardize asset configuration with capacitor-assets 3 weeks ago
capacitor.config.json Fix Android emulator API connectivity with cleaner build script approach 4 weeks ago
capacitor.config.ts feat(assets): standardize asset configuration with capacitor-assets 3 weeks ago
commitlint.config.js Merge branch 'master' into android-safe-area-insets 1 week ago
docker-compose.yml Fix: markdownlint MD012/MD019 errors in build-pattern-conversion-plan.md 2 months ago
index.html feat: implement dynamic platform entry point system 2 weeks ago
jest.config.js Finalize Dexie-to-SQLite migration prep: docs, circular dep removal, SQL helpers, tests 2 months ago
package-lock.json Merge branch 'master' into build-web-serve-test 1 week ago
package.json Merge branch 'master' into build-web-serve-test 1 week ago
pkgx.yaml disable SQLite in Java & Swift (since they don't compile) & add SQL queueing on startup 3 months ago
playwright.config-local.ts Switch to single-worker mode 3 weeks ago
postcss.config.js Adding Tailwind and start application views 3 years ago
project.task.yaml update ClickUp link to a public link 1 year ago
pull_request_template.md feat: add Build Architecture Guard PR template 2 weeks ago
tailwind.config.js Fix config 3 years ago
tsconfig.json WIP: fix(AbsurdSqlDatabaseService) fixes to typing and other curious beasts 3 months ago
tsconfig.node.json Integrate TypeScript type checking into build process with conditional execution 1 month ago
vite.config.capacitor.mts refactor: reorganize Vite config into modular files 7 months ago
vite.config.common.mts fix(build): resolve web app loading failure by simplifying Vite configuration 2 weeks ago
vite.config.dev.mts WIP: certificate view and dependency updates 6 months ago
vite.config.electron.mts Remove manual service worker registration; rely on VitePWA auto-registration 2 months ago
vite.config.optimized.mts feat(build): add comprehensive ESBuild error handling to Vite configurations 2 weeks ago
vite.config.utils.mts feat(build): add comprehensive ESBuild error handling to Vite configurations 2 weeks ago
vite.config.web.mts fix(build): resolve web app loading failure by simplifying Vite configuration 2 weeks ago

README.md

TimeSafari.app - Crowd-Funder for Time - PWA

Time Safari allows people to ease into collaboration: start with expressions of gratitude and expand to crowd-fund with time & money, then record and see the impact of contributions.

Roadmap

See ClickUp for current priorities.

Setup & Building

Quick start:

  • For setup, we recommend pkgx, which installs what you need (either automatically or with the dev command). Core dependencies are typescript & npm; when building for other platforms, you'll need other things such as those in the pkgx.yaml & BUILDING.md files.
npm install
npm run build:web:serve -- --test

To be able to take action on the platform: go to the test page and click "Become User 0".

See BUILDING.md for comprehensive build instructions for all platforms (Web, Electron, iOS, Android, Docker).

🛡️ Build Architecture Guard

This project uses Husky Git hooks to protect the build system architecture. When you modify build-critical files, the system automatically blocks commits until you update BUILDING.md.

Quick Setup

npm run guard:setup  # Install and activate the guard

How It Works

  • Pre-commit: Blocks commits if build files changed without BUILDING.md updates
  • Pre-push: Blocks pushes if commits contain undocumented build changes
  • Protected paths: scripts/, vite.config.*, electron/, android/, ios/, etc.

Usage

# Test the guard manually
npm run guard:test

# Emergency bypass (use sparingly)
git commit --no-verify
git push --no-verify

📚 Full documentation: See doc/README-BUILD-GUARD.md

Development Database Clearing

TimeSafari provides a simple script-based approach to clear the local database (not the claim server) for development purposes.

Logging Configuration

TimeSafari supports configurable logging levels via the VITE_LOG_LEVEL environment variable. This allows developers to control console output verbosity without modifying code.

Quick Usage

# Show only errors
VITE_LOG_LEVEL=error npm run dev

# Show warnings and errors
VITE_LOG_LEVEL=warn npm run dev

# Show info, warnings, and errors (default)
VITE_LOG_LEVEL=info npm run dev

# Show all log levels including debug
VITE_LOG_LEVEL=debug npm run dev

Available Levels

  • error: Critical errors only
  • warn: Warnings and errors (default for production web)
  • info: Info, warnings, and errors (default for development/capacitor)
  • debug: All log levels including verbose debugging

See Logging Configuration Guide for complete details.

Quick Usage

# Run the database clearing script
./scripts/clear-database.sh

# Then restart your development server
npm run build:electron:dev  # For Electron
npm run build:web:dev       # For Web

What It Does

Electron (Desktop App)

  • Automatically finds and clears the SQLite database files
  • Works on Linux, macOS, and Windows
  • Clears all data and forces fresh migrations on next startup

Web Browser

  • Provides instructions for using custom browser data directories
  • Shows manual clearing via browser DevTools
  • Ensures reliable database clearing without browser complications

Safety Features

  • Interactive Script: Guides you through the process
  • Platform Detection: Automatically detects your OS
  • Clear Instructions: Step-by-step guidance for each platform
  • Safe Paths: Only clears TimeSafari-specific data

Manual Commands (if needed)

Electron Database Location

# Linux
rm -rf ~/.config/TimeSafari/*

# macOS  
rm -rf ~/Library/Application\ Support/TimeSafari/*

# Windows
rmdir /s /q %APPDATA%\TimeSafari

Web Browser (Custom Data Directory)

# Create isolated browser profile
mkdir ~/timesafari-dev-data

Domain Configuration

TimeSafari uses a centralized domain configuration system to ensure consistent URL generation across all environments. This prevents localhost URLs from appearing in shared links during development.

Key Features

  • Production URLs for Sharing: All copy link buttons use production domain
  • Environment-Specific Internal URLs: Internal operations use appropriate environment URLs
  • Single Point of Control: Change domain in one place for entire app
  • Type-Safe Configuration: Full TypeScript support

Quick Reference

// For sharing functionality (environment-specific)
import { APP_SERVER } from "@/constants/app";
const shareLink = `${APP_SERVER}/deep-link/claim/123`;

// For internal operations (environment-specific)
import { APP_SERVER } from "@/constants/app";
const apiUrl = `${APP_SERVER}/api/claim/123`;

Documentation

Tests

See TESTING.md for detailed test instructions.

Asset Management

TimeSafari uses a standardized asset configuration system for consistent icon and splash screen generation across all platforms.

Asset Sources

  • Single source of truth: resources/ directory (Capacitor default)
  • Source files: icon.png, splash.png, splash_dark.png
  • Format: PNG or SVG files for optimal quality

Asset Generation

  • Configuration: config/assets/capacitor-assets.config.json
  • Schema validation: config/assets/schema.json
  • Build-time generation: Platform assets generated via capacitor-assets
  • No VCS commits: Generated assets are never committed to version control

Development Commands

# Generate/update asset configurations
npm run assets:config

# Validate asset configurations
npm run assets:validate

# Clean generated platform assets (local dev only)
npm run assets:clean

# Build with asset generation
npm run build:native

Environment Setup & Dependencies

Before building the application, ensure your development environment is properly configured:

# Install all dependencies (required first time and after updates)
npm install

# Validate your development environment
npm run check:dependencies

# Check prerequisites for testing
npm run test:prerequisites

Common Issues & Solutions:

  • "tsx: command not found": Run npm install to install devDependencies
  • "capacitor-assets: command not found": Ensure @capacitor/assets is installed
  • Build failures: Run npm run check:dependencies to diagnose environment issues

Required Versions:

  • Node.js: 18+ (LTS recommended)
  • npm: 8+ (comes with Node.js)
  • Platform-specific tools: Android Studio, Xcode (for mobile builds)

Platform Support

  • Android: Adaptive icons with foreground/background, monochrome support
  • iOS: LaunchScreen storyboard preferred, splash assets when needed
  • Web: PWA icons generated during build to dist/ (not committed)

Font Awesome Icons

To add a Font Awesome icon, add to fontawesome.ts and reference with font-awesome element and icon attribute with the hyphenated name.

Other

Reference Material

  • Notifications can be type of toast (self-dismiss), info, success, warning, and danger. They are done via notiwind and set up in App.vue.

  • Customize Vue configuration.

  • If you are deploying in a subdirectory, add it to publicPath in vue.config.js, eg: publicPath: "/app/time-tracker/",

Code Organization

The project uses a centralized approach to type definitions and interfaces:

  • src/interfaces/ - Contains all TypeScript interfaces and type definitions
    • deepLinks.ts - Deep linking type system and Zod validation schemas
    • give.ts - Give-related interfaces and type definitions
    • claims.ts - Claim-related interfaces and verifiable credentials
    • common.ts - Shared interfaces and utility types
    • Other domain-specific interface files

Key principles:

  • All interfaces and types are defined in the interfaces folder
  • Zod schemas are used for runtime validation and type generation
  • Domain-specific interfaces are separated into their own files
  • Common interfaces are shared through common.ts
  • Type definitions are generated from Zod schemas where possible

Database Architecture

The application uses a platform-agnostic database layer with Vue mixins for service access:

  • src/services/PlatformService.ts - Database interface definition
  • src/services/PlatformServiceFactory.ts - Platform-specific service factory
  • src/services/AbsurdSqlDatabaseService.ts - SQLite implementation
  • src/utils/PlatformServiceMixin.ts - Vue mixin for database access with caching
  • src/db/ - Legacy Dexie database (migration in progress)

Development Guidelines:

  • Always use PlatformServiceMixin for database operations in components
  • Test with PlatformServiceMixin for new features
  • Use migration tools for data transfer between systems
  • Leverage mixin's ultra-concise methods: $db(), $exec(), $one(), $contacts(), $settings()

Architecture Decision: The project uses Vue mixins over Composition API composables for platform service access. See Architecture Decisions for detailed rationale.

📁 Project Structure

timesafari/
├── 📁 src/              # Source code
├── 📁 scripts/          # Build and automation scripts
├── 📁 electron/         # Electron configuration
├── 📁 android/          # Android configuration  
├── 📁 ios/              # iOS configuration
├── 📁 .husky/           # Git hooks (Build Architecture Guard)
├── 📄 BUILDING.md       # Build system documentation
├── 📄 pull_request_template.md # PR template
└── 📄 doc/README-BUILD-GUARD.md # Guard system documentation

🤝 Contributing

  1. Follow the Build Architecture Guard - Update BUILDING.md when modifying build files
  2. Use the PR template - Complete the checklist for build-related changes
  3. Test your changes - Ensure builds work on affected platforms
  4. Document updates - Keep BUILDING.md current and accurate

Kudos

Gifts make the world go 'round!