Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# OpenConvert Environment Variables
# Copy this file to .env and fill in values as needed.

# Tauri updater signing (required for production releases)
# Generate with: npx tauri signer generate -w ~/.tauri/openconvert.key
# TAURI_SIGNING_PRIVATE_KEY=
# TAURI_SIGNING_PRIVATE_KEY_PASSWORD=

# Vite environment variables (prefixed with VITE_)
# VITE_APP_TITLE=OpenConvert
51 changes: 51 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Agents

This file describes how AI agents (Cline, Codex, Copilot, etc.) should interact
with this repository.

## Context

OpenConvert is a local-first Windows desktop file converter built with
Tauri v2 (Rust + React + TypeScript). All processing is done locally;
no data leaves the user's machine.

## Key Constraints

- **Do not modify source code or product functionality.** Only documentation,
CI/CD, and project governance files should be touched unless explicitly
directed otherwise.
- **Local-first.** No cloud, no accounts, no telemetry.
- **Windows-first.** The primary target is Windows via NSIS installer.
- **AGPL-3.0 licensed.** Ensure all contributions are compatible.

## When to Consult This File

Agents should read this file at the start of any session involving this
repository, especially when opening PRs, suggesting architecture changes,
or writing new code.

## Agent Tasks

Allowed tasks for AI agents without explicit human approval:

- Fix typos in documentation
- Add badges or metadata to README
- Update CHANGELOG formatting
- Refactor CI/CD workflow formatting
- Create standard governance files (CODE_OF_CONDUCT, CONTRIBUTING, SECURITY, SUPPORT)
- Audit for secret leaks or dead files
- Recommend dependency updates (do not apply without review)

Tasks requiring human approval:

- Any change to `src/` or `src-tauri/src/` source code
- Adding new npm or Cargo dependencies
- Changing the build pipeline or release workflow logic
- Changing the license
- Adding telemetry, analytics, or network calls

## Communication Style

- Be direct and concise.
- Provide structured summaries after audits.
- Flag blockers immediately rather than fabricating results.
96 changes: 96 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# CLAUDE.md — OpenConvert Repository Guide

## Repository Overview

OpenConvert is a **local-first Windows desktop file converter** built with
Tauri v2. All processing happens entirely on the user's machine. No data is
uploaded, no accounts are required, and no telemetry is collected.

## Tech Stack

- **Desktop Shell**: Tauri v2
- **Frontend**: React 18, TypeScript 5, Tailwind CSS 3, Lucide React
- **Bundler**: Vite 5
- **Backend**: Rust (Tauri commands in `src-tauri/src/`)
- **Testing**: Vitest (frontend), `cargo test` (Rust)
- **Linting**: ESLint 9 + TypeScript-ESLint
- **Installer**: NSIS (Windows)

## Branch Workflow

- `main` is the default and release branch.
- Feature branches should use conventional prefixes:
- `feat/` — new features
- `fix/` — bug fixes
- `docs/` — documentation
- `chore/` — tooling, CI, maintenance
- `refactor/` — code restructuring
- Keep branches focused on a single concern.
- Squash-merge PRs into `main` with descriptive commit messages.

## Coding Expectations

### TypeScript / React

- Use strict TypeScript (`strict: true` in tsconfig). Avoid `any`.
- Functional components with hooks. Follow the rules of hooks.
- Use Tailwind utility classes — avoid custom CSS when possible.
- Use Lucide React for icons.
- Keep components small and focused. Extract reusable logic to `src/lib/`.

### Rust

- Follow idiomatic Rust conventions.
- Handle errors with `Result` types. Avoid `unwrap()` in production code.
- Use `cargo fmt` and `cargo clippy` before committing.

### General

- Run `npm run lint && npm run test && npm run build` before pushing.
- Run `cargo test --manifest-path src-tauri/Cargo.toml` for Rust tests.
- No dead code — if it's not used, remove it.
- No secrets in source files. Use environment variables where needed.

## Architecture Constraints

- **Local-first**: No cloud uploads, no accounts, no telemetry.
- **Windows-first**: The primary target is Windows NSIS installer.
- **File processing**: All conversion happens via Tauri IPC to the Rust backend.
- **History**: Only stores metadata (filename, format, timestamp, status) — not
file contents or paths.
- **Auto-updates**: Via Tauri updater + GitHub Releases.
- **AGPL-3.0**: Ensure all contributions are compatible.

## Directory Structure

```
OpenConvert/
├── src/ # Frontend source
│ ├── App.tsx # Main app component
│ ├── components/ # React components
│ ├── lib/ # Utilities and logic
│ ├── types.ts # TypeScript types
│ ├── main.tsx # Entry point
│ └── styles.css # Tailwind CSS
├── src-tauri/ # Rust backend
│ ├── src/ # Rust source
│ ├── Cargo.toml # Rust dependencies
│ └── tauri.conf.json # Tauri configuration
├── .github/workflows/ # CI/CD pipelines
├── docs/ # Documentation
├── package.json # npm dependencies
└── vite.config.ts # Vite configuration
```

## AI Coding Assistant Rules

When acting as an AI coding assistant for this repository:

1. **Do not change source code or product functionality** without explicit
human approval.
2. **Do add missing governance files** (CODE_OF_CONDUCT, CONTRIBUTING,
SECURITY, SUPPORT).
3. **Do improve documentation** (README, ROADMAP, CHANGELOG, docs/).
4. **Do improve CI/CD** workflows but verify with `npm run lint/test/build`.
5. **Do audit** for secrets, dead files, and hygiene issues.
6. **Flag security issues** immediately.
63 changes: 63 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the project maintainer at **sparshsam@users.noreply.github.com**.
All complaints will be reviewed and investigated promptly and fairly.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

[homepage]: https://www.contributor-covenant.org
100 changes: 100 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Contributing to OpenConvert

Thank you for your interest in contributing! OpenConvert is a local-first
desktop file converter. We welcome contributions that respect the project's
scope and principles.

## Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Development Workflow](#development-workflow)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Coding Standards](#coding-standards)
- [Testing](#testing)
- [Reporting Issues](#reporting-issues)

## Code of Conduct

This project and everyone participating in it is governed by the
[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). By participating, you are expected
to uphold this code.

## Getting Started

1. Fork the repository.
2. Clone your fork:
```bash
git clone https://github.com/your-username/OpenConvert.git
```
3. Set up the development environment:
- Node.js 20 or newer
- Rust stable
- Windows build tools (for packaging)
4. Install dependencies:
```bash
npm install
```
5. Create a branch for your work:
```bash
git checkout -b my-feature-branch
```

## Development Workflow

1. Make your changes on a feature branch (not `main`).
2. Keep changes focused — one feature or fix per branch.
3. Run checks before committing:
```bash
npm run lint
npm run test
npm run build
cd src-tauri && cargo test
```
4. Commit messages should follow conventional commits:
- `feat:` — new feature
- `fix:` — bug fix
- `docs:` — documentation
- `chore:` — tooling, CI, maintenance
- `refactor:` — code restructuring

## Pull Request Guidelines

- Open PRs against the `main` branch.
- Title should summarize the change (e.g., "feat: add batch conversion").
- Link related issues in the PR description.
- Keep PRs small and reviewable.
- Ensure all CI checks pass before requesting review.
- Do not merge your own PRs without review.

## Coding Standards

- **TypeScript**: Strict mode enabled. Avoid `any`. Use typed interfaces.
- **React**: Functional components with hooks. Follow hooks rules.
- **Rust**: Idiomatic Rust, handle errors with `Result`, avoid `unwrap` in
production code.
- **CSS**: Tailwind CSS utility classes. Avoid custom CSS unless necessary.
- **Formatting**: ESLint and Prettier conventions (run `npm run lint`).

## Testing

- Frontend tests: `npm run test` (Vitest).
- Rust tests: `cargo test` in `src-tauri/`.
- Add tests for new functionality.
- Ensure existing tests pass.

## Reporting Issues

- Search existing issues before opening a new one.
- Use issue templates if available.
- Include:
- OpenConvert version
- OS version
- Steps to reproduce
- Expected vs. actual behavior
- Screenshots or logs if applicable

## Licensing

By contributing, you agree that your contributions will be licensed under the
AGPL-3.0 License.
Loading
Loading