Skip to content

Commit 2e9a2ad

Browse files
committed
initial commit
0 parents  commit 2e9a2ad

File tree

101 files changed

+12711
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+12711
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
applyTo: '**'
3+
---
4+
5+
# Project Stack and General Instructions
6+
7+
This is a Tauri + React + TypeScript + Vite **desktop application**.
8+
9+
**IMPORTANT: This is a desktop-only application. Do not consider mobile devices, responsive design for mobile, or touch interfaces. Focus exclusively on desktop user experience with mouse and keyboard interactions.**
10+
11+
Use React 18 with TypeScript for the frontend.
12+
Use Vite 6 as the build tool.
13+
Use Yarn as the package manager.
14+
Use Tailwind CSS 4 with shadcn/ui components for styling.
15+
Use Lucide React for icons.
16+
Use Tauri 2 as the desktop runtime.
17+
Use Rust for backend commands in src-tauri/src/commands.rs.
18+
19+
## Package Management
20+
21+
Always use yarn for package management.
22+
Never use npm or pnpm.
23+
Use yarn add [package] to install dependencies.
24+
Use yarn add -D [package] for dev dependencies.
25+
Use yarn dlx instead of npx for one-time commands.
26+
Use yarn why [package] to debug dependency issues.
27+
Check yarn.lock file for dependency resolution.
28+
29+
## Development Philosophy
30+
31+
Follow the "Worse is Better" (New Jersey) approach with selective MIT principles.
32+
Choose the most straightforward implementation possible.
33+
Avoid premature optimization, complex patterns, or clever solutions.
34+
Prioritize readability and maintainability over completeness.
35+
Code must work perfectly for the primary use cases specified.
36+
Handle expected inputs gracefully with proper error handling.
37+
Use descriptive function and variable names.
38+
Include type hints when supported by the language.
39+
Be transparent about incompleteness with clear TODOs and comments.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
applyTo: '**'
3+
---
4+
Follow the "Worse is Better" (New Jersey) approach with selective MIT principles.
5+
6+
# Copilot Instructions: Pragmatic Simplicity Philosophy
7+
8+
You are a pragmatic coding assistant that prioritizes **simplicity, correctness, and practical completeness**. Follow the "Worse is Better" (New Jersey) approach with selective MIT principles.
9+
10+
## Core Principles (In Order of Priority)
11+
12+
### 1. **Simplicity First**
13+
- Choose the most straightforward implementation possible
14+
- Avoid premature optimization, complex patterns, or clever solutions
15+
- Prioritize readability and maintainability over completeness
16+
- If two approaches exist, choose the one that's easier to read and explain
17+
18+
### 2. **Correctness for Core Use Cases**
19+
- Code must work perfectly for the primary use cases specified
20+
- Handle expected inputs gracefully with proper error handling
21+
- Verify functionality with the examples provided
22+
- Fail loudly with clear error messages rather than silently
23+
24+
### 3. **Clear Interface Design**
25+
- Use descriptive function and variable names
26+
- Include type hints when supported by the language
27+
- Provide concise docstrings explaining purpose, parameters, and returns
28+
- Make the interface intuitive and self-explanatory
29+
30+
### 4. **Honest About Limitations**
31+
- Explicitly state what your code doesn't handle
32+
- Use comments to note assumptions and edge cases not covered
33+
- Example: "Note: This assumes non-empty input" or "For production, add network error handling"
34+
35+
## Implementation Guidelines
36+
37+
### Code Quality
38+
- Write small, focused functions with clear responsibilities
39+
- Use boring, robust solutions over clever tricks
40+
- Follow language-specific best practices and idioms
41+
- Include reasonable error handling without defensive programming overkill
42+
43+
## Decision Process
44+
45+
Before responding, ask yourself:
46+
47+
"Is this the simplest solution that correctly solves the core problem and is honest about its limits?"
48+
49+
If yes, proceed. If no, simplify further.
50+
51+
## Key Mantras
52+
- **Ship something working** over designing something perfect but incomplete
53+
- **Minimize implementation complexity** even if interface isn't elegant
54+
- **Be transparent about incompleteness** with clear TODOs and comments
55+
- **Favor concrete examples** over theoretical generality
56+
- **When unsure, ask for clarification** and suggest incremental improvements
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
applyTo: 'src/**/*.{tsx,css}'
3+
---
4+
5+
# UI and Styling Instructions
6+
7+
**IMPORTANT: This is a desktop-only application. Do not consider mobile devices, responsive design for mobile, or touch interfaces. Focus exclusively on desktop user experience with mouse and keyboard interactions.**
8+
9+
## Design Philosophy
10+
11+
### Core Principles
12+
- **Simplicity Through Reduction**: Identify the essential purpose and eliminate everything that distracts from it.
13+
- **Material Honesty**: Buttons should feel pressable, cards should feel substantial, animations should reflect real-world physics.
14+
- **Obsessive Detail**: Consider every pixel, every interaction, and every transition.
15+
- **Coherent Design Language**: Every element should visually communicate its function and feel like part of a unified system.
16+
- **Invisibility of Technology**: Users should focus on their content and goals, not on understanding the interface.
17+
18+
### Visual Hierarchy & Layout
19+
- Use generous negative space to focus attention and create calm.
20+
- Maintain compositional balance with careful attention to visual weight.
21+
- Related elements should be visually grouped through proximity, alignment, and shared attributes.
22+
- Use grid/flex wrappers with `gap` for spacing rather than direct margins/padding on children.
23+
24+
## Styling Implementation
25+
Use Tailwind CSS classes for styling.
26+
Follow shadcn/ui component patterns.
27+
Use CSS variables defined in src/App.css for theming.
28+
Prefer className over inline styles.
29+
Use shadcn/ui components instead of creating custom UI components.
30+
Follow the "new-york" style variant for shadcn/ui components.
31+
Design for desktop viewports - optimize for larger screens and precise mouse interactions.
32+
33+
### Color Strategy
34+
- Use intentional color where every color has a specific purpose.
35+
- Prefer subtle, slightly desaturated colors rather than bold primary colors.
36+
- Limit accent colors to guide attention to the most important actions.
37+
- Ensure WCAG AA contrast compliance (4.5:1 for normal, 3:1 for large text).
38+
39+
### Typography Excellence
40+
- Treat typography as a core design element, not an afterthought.
41+
- Establish clear visual distinction between different levels of information.
42+
- Use no more than 2-3 typefaces for the entire application.
43+
- Allow generous spacing around text elements (line height typically 1.5x font size for body text).
44+
45+
## Interactive Elements
46+
47+
### Buttons
48+
- Visually express the importance and function through appearance.
49+
- Every button must have distinct states: default, hover, active, focused, disabled.
50+
- Buttons should appear "pressable" through subtle shadows or dimensionality cues.
51+
- Optimize button sizes for mouse interaction (minimum 32×32px for desktop).
52+
- Use concise, action-oriented labels.
53+
54+
### Animation & Motion
55+
- Every animation must serve a functional purpose (orient users, show relationships, provide feedback).
56+
- Movement should follow real-world physics with appropriate acceleration/deceleration.
57+
- Timing guidelines: button press (100-150ms), state changes (200-300ms), page transitions (300-500ms).
58+
- Animations should be felt rather than seen - avoid calling attention to themselves.
59+
60+
### Color Strategy
61+
- Use intentional color where every color has a specific purpose.
62+
- Prefer subtle, slightly desaturated colors rather than bold primary colors.
63+
- Limit accent colors to guide attention to the most important actions.
64+
- Ensure WCAG AA contrast compliance (4.5:1 for normal, 3:1 for large text).
65+
66+
### Typography Excellence
67+
- Treat typography as a core design element, not an afterthought.
68+
- Establish clear visual distinction between different levels of information.
69+
- Use no more than 2-3 typefaces for the entire application.
70+
- Allow generous spacing around text elements (line height typically 1.5x font size for body text).
71+
72+
## Interactive Elements
73+
74+
### Buttons
75+
- Visually express the importance and function through appearance.
76+
- Every button must have distinct states: default, hover, active, focused, disabled.
77+
- Buttons should appear "pressable" through subtle shadows or dimensionality cues.
78+
- Minimum touch target size of 44×44px for all interactive elements.
79+
- Use concise, action-oriented labels.
80+
81+
### Animation & Motion
82+
- Every animation must serve a functional purpose (orient users, show relationships, provide feedback).
83+
- Movement should follow real-world physics with appropriate acceleration/deceleration.
84+
- Timing guidelines: button press (100-150ms), state changes (200-300ms), page transitions (300-500ms).
85+
- Animations should be felt rather than seen - avoid calling attention to themselves.
86+
87+
## Form Handling
88+
Use React.FormEvent for form handling.
89+
Prefer controlled components for forms.
90+
Use e.preventDefault() in form submit handlers.
91+
Validate all inputs before submission.
92+
Handle form errors gracefully with user-friendly messages.
93+
Design fields that guide users through correct input with clear labeling and inline validation.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
applyTo: 'src-tauri/**/*.rs'
3+
---
4+
5+
# Tauri Backend Instructions
6+
7+
Add commands to src-tauri/src/commands.rs.
8+
Update src-tauri/src/lib.rs to register new commands.
9+
Use proper Rust error handling with Result<T, E>.
10+
Use Tauri's security features and permissions properly.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
applyTo: 'src/**/*.{ts,tsx}'
3+
---
4+
5+
# Frontend Development Instructions
6+
7+
## TypeScript
8+
Use strict TypeScript configuration.
9+
Define interfaces for all props and data structures.
10+
Place type definitions in src/types/.
11+
Use proper typing for Tauri commands and responses.
12+
Always use TypeScript with proper type definitions.
13+
Add proper JSDoc comments for complex functions.
14+
15+
## React Components
16+
Place reusable components in src/components/.
17+
Use src/components/ui/ for shadcn/ui components only.
18+
Export components from src/components/index.ts.
19+
Use TypeScript interfaces for prop types.
20+
Use functional components with hooks.
21+
Prefer controlled components for forms.
22+
Use React.memo for expensive components.
23+
Implement proper cleanup in useEffect hooks.
24+
25+
### Component Design Principles
26+
- Design components where users interact directly with their content rather than through abstract controls.
27+
- Every interaction must provide instantaneous visual feedback (within 100ms).
28+
- Elements that look similar should behave similarly - build trust through predictable patterns.
29+
- Make errors difficult, but recovery easy with clear paths to undo actions.
30+
- Core functions should be immediately visible; advanced functions can be progressively revealed.
31+
32+
### Micro-Interactions
33+
- Add small, delightful details that reward attention and form emotional connection.
34+
- Design elements that respond subtly to user interaction, creating a sense of liveliness.
35+
- Layer micro-interactions so they enhance but never obstruct functionality.
36+
37+
## Imports and Organization
38+
Use @/ prefix for imports: @/components, @/lib, @/hooks.
39+
Use consistent import ordering: React imports, third-party imports, local imports.
40+
Export components from src/components/index.ts.
41+
Export custom hooks from src/hooks/index.ts.
42+
43+
## Error Handling
44+
Implement comprehensive error boundaries when needed.
45+
Show user-friendly error messages.
46+
Log errors appropriately for debugging.
47+
Handle Tauri command failures gracefully.
48+
Implement proper error handling for all async operations.
49+
50+
## Accessibility
51+
Use semantic HTML elements.
52+
Implement proper ARIA attributes.
53+
Ensure keyboard navigation works.
54+
Test with screen readers.
55+
Make components accessible by default.
56+
57+
## Tauri Integration
58+
Place Tauri service logic in src/services/tauri.service.ts.
59+
Use async/await for Tauri command calls.
60+
Handle loading states and errors properly.
61+
Type Tauri commands with proper interfaces.
62+
Validate all inputs before sending to Tauri commands.
63+
Handle Tauri command failures gracefully.
64+
Optimize Tauri command calls to avoid unnecessary invocations.
65+
66+
## Custom Hooks
67+
Create custom hooks in src/hooks/ for reusable logic.
68+
Use React hooks (useState, useEffect, etc.) for state management.
69+
Return state, loading, error, and actions from custom hooks.
70+
Implement proper cleanup in useEffect hooks.
71+
Export hooks from src/hooks/index.ts.

.github/workflows/publish.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 'Publish artifacts'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- release
8+
9+
jobs:
10+
publish-tauri:
11+
permissions:
12+
contents: write
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- platform: 'macos-latest' # for Arm based macs (M1 and above).
18+
args: '--target aarch64-apple-darwin'
19+
- platform: 'macos-latest' # for Intel based macs.
20+
args: '--target x86_64-apple-darwin'
21+
- platform: 'ubuntu-22.04'
22+
args: ''
23+
- platform: 'ubuntu-22.04-arm' # Only available in public repos.
24+
args: ''
25+
- platform: 'windows-latest'
26+
args: ''
27+
28+
runs-on: ${{ matrix.platform }}
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: install dependencies (ubuntu only)
33+
if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
37+
38+
- name: setup node
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: lts/*
42+
cache: 'yarn' # Set this to npm, yarn or pnpm.
43+
44+
- name: install Rust stable
45+
uses: dtolnay/rust-toolchain@stable # Set this to dtolnay/rust-toolchain@nightly
46+
with:
47+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
48+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
49+
50+
- name: Rust cache
51+
uses: swatinem/rust-cache@v2
52+
with:
53+
workspaces: './src-tauri -> target'
54+
55+
- name: install frontend dependencies
56+
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
57+
run: yarn install # change this to npm or pnpm depending on which one you use.
58+
59+
- uses: tauri-apps/tauri-action@v0
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
64+
releaseName: 'App v__VERSION__'
65+
releaseBody: 'See the assets to download this version and install.'
66+
releaseDraft: true
67+
prerelease: false
68+
args: ${{ matrix.args }}

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
# chem
27+
*.smiles
28+
*.smi

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

0 commit comments

Comments
 (0)