Contributing
This guide covers how to set up a local development environment, run tests, and submit changes to LitePost.
Prerequisites
All Platforms
Windows
- Microsoft Visual Studio C++ Build Tools (install via the Visual Studio Installer -- select the "Desktop development with C++" workload)
macOS
- Xcode Command Line Tools (install with
xcode-select --install)
Linux
Install the required system libraries:
sudo apt update
sudo apt install -y \
build-essential \
libwebkit2gtk-4.0-dev \
curl \
wget \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-devDevelopment Setup
Fork and clone the repository:
bashgit clone https://github.com/<your-username>/LitePost.git cd LitePostInstall frontend dependencies:
bashpnpm installStart the development server:
bashpnpm tauri devThis launches both the Vite dev server (with hot-reload for the React frontend) and the Tauri application window. Rust backend changes trigger an automatic rebuild of the native binary.
Building for Production
pnpm tauri buildPlatform-specific installers and bundles are written to src-tauri/target/release/bundle/.
Project Structure
LitePost/
src/ React frontend
components/ UI components (request panel, response panel, auth, etc.)
hooks/ Custom React hooks (useRequest, useStreamingResponse, useTabs)
store/ Zustand stores (environments, settings, theme)
utils/ Utility functions (cURL parser, streaming, persistence)
types/ Shared TypeScript type definitions
test/ Test files (Vitest + React Testing Library)
src-tauri/ Rust backend
src/
lib.rs Tauri command definitions
http_client.rs HTTP request execution
models.rs Shared Rust types
network_utils.rs Network helper functions
docs/ Documentation (VitePress)Running Tests
Tests use Vitest and React Testing Library. Test files live in src/test/.
| Command | Description |
|---|---|
pnpm test | Run all tests |
pnpm test:watch | Run tests in watch mode |
pnpm test:coverage | Generate a coverage report |
pnpm test:run | Run all tests once (CI-friendly) |
pnpm test:ui | Open the Vitest UI |
Contributing Workflow
- Fork the repository on GitHub.
- Create a feature branch from
main:bashgit checkout -b feature/my-change - Make your changes. Follow existing code style and patterns. Keep commits focused.
- Run tests to make sure nothing is broken:bash
pnpm test:run - Open a pull request against
mainon github.com/LykosAI/LitePost. Include a clear description of what your change does and why.
Documentation
The docs site is built with VitePress. To preview documentation changes locally:
pnpm docs:devThis starts a local dev server with hot-reload at http://localhost:5173.
License
LitePost is licensed under the AGPL-3.0. By contributing, you agree that your contributions will be licensed under the same terms.
