TeamIDE-methodology/templates/TauriStarter/docs/development.md

1.7 KiB

Development Guide

Development workflow and practices for [Project Name]

Development Workflow

Build and Run

This project uses a build-and-run approach (not hot reload):

cd app
./build.sh -dev -open    # Build and launch
./build.sh logs          # View console output

Why Build-and-Run?

  • Dev = Prod - What you test is what ships
  • Full logging - Console output captured to files
  • No dev-only bugs - Identical to production environment

Making Changes

Adding a New Feature

  1. Create components in src/components/
  2. Add pages in src/pages/
  3. Register routes in src/router/
  4. Add state management in src/stores/
  5. Rebuild to test: ./build.sh -dev -open
  6. Document the feature in docs/

Adding a Tauri Command

  1. Add the command in src-tauri/src/main.rs
  2. Register it in the invoke_handler
  3. Call from frontend with invoke('command_name', { args })

Debugging

Console Logs

./build.sh logs              # Last 100 lines
cat build/console/console_latest.log  # Full log

Build Errors

cat build/logs/build_latest.log

Common Issues

Issue Solution
Build fails with cache errors ./build.sh clean && ./build.sh -dev -open
Changes not appearing Rebuild - this is build-and-run, not hot reload
Console logs missing Check console-logger.ts is in boot files

Code Style

  • Components: PascalCase (UserProfile.vue)
  • Composables: camelCase with use prefix (useAuth.ts)
  • Stores: camelCase (userStore.ts)
  • Types: PascalCase (UserProfile.ts)

Testing

[Add testing instructions when implemented]