A lightweight, cross-platform API testing application built with Tauri, React, and TypeScript.
Windows 64-bit Installer β¬οΈ Download |
||
macOS beta Apple Silicon β¬οΈ Download |
macOS beta Intel Processor β¬οΈ Download |
Linux beta AppImage (64-bit) β¬οΈ Download |
π All downloads are automatically updated to the latest version. View all releases
- Node.js (v18 or later)
- pnpm (v8 or later)
- Rust (latest stable)
- Platform-specific dependencies for Tauri:
- Windows: Microsoft Visual Studio C++ Build Tools
- macOS: Xcode Command Line Tools
- Linux:
build-essential
,libwebkit2gtk-4.0-dev
,curl
,wget
,libssl-dev
,libgtk-3-dev
,libayatana-appindicator3-dev
,librsvg2-dev
-
Clone the repository:
git clone https://github.com/LykosAI/LitePost.git cd LitePost
-
Install dependencies:
pnpm install
-
Start the development server:
pnpm tauri dev
To create a production build:
pnpm tauri build
The built applications will be available in src-tauri/target/release/bundle/
.
litepost/
βββ src/ # React frontend source
β βββ components/ # React components
β β βββ ui/ # Reusable UI components (shadcn/ui)
β βββ hooks/ # Custom React hooks
β βββ store/ # Zustand state management
β βββ utils/ # Utility functions
β βββ types/ # TypeScript type definitions
β βββ test/ # Test files
βββ src-tauri/ # Rust backend source
β βββ src/ # Rust source code
β βββ capabilities/ # Tauri capability configurations
βββ public/ # Static assets
βββ coverage/ # Test coverage reports
βββ dist/ # Production build output
Key directories:
src/components/
: React components organized by featuresrc/hooks/
: Custom hooks for API requests, state management, etc.src/store/
: Zustand stores for collections, environments, and settingssrc/test/
: Unit tests using Vitest and React Testing Librarysrc-tauri/
: Rust backend with HTTP client and file system operations
- π¨ Modern, native UI built with React, Tailwind CSS, and Shadcn UI
- π» Cross-platform support (Windows, macOS, Linux)
- Multiple request tabs with history
- Authentication support:
- Basic Auth
- Bearer Token
- API Key (header and query parameter)
- Custom request headers and parameters
- π Code generation for multiple languages (curl, Python, JavaScript, C#, Go, Ruby)
- Advanced response visualization:
- β¨ JSON prettification with syntax highlighting
- π XML formatting
- π HTML preview
- πΌοΈ Image preview
- Response metrics:
- π Size measurements
- β‘ Request/response timing
- π Network timing breakdown (DNS, First byte, Download time)
- Create, edit, and delete environments
- Variable substitution
- Environment switching
- Environment-specific variables
- Save and organize requests in collections
- Basic folder organization
- Import/export collections
- Postman format compatibility
- JavaScript-based test scripts
- Comprehensive test assertions:
- Status code validation
- JSON value verification
- Header checks
- Response time validation
- Test execution with results display
The project uses Vitest for testing. Here are the available test commands:
# Run all tests
pnpm test
# Run tests in watch mode (useful during development)
pnpm test:watch
# Run tests with coverage report
pnpm test:coverage
# Run tests for a specific file
pnpm test RequestUrlBar
The test suite currently includes:
- Unit tests for React components using React Testing Library
- Component mocking (e.g., Radix UI components)
- Event handling tests
- State management tests
- Coverage reporting with v8
Coverage reports can be found in:
- Terminal output (text format)
coverage/
directory (HTML and JSON formats)
We plan to add:
- Integration tests for API request/response flows
- End-to-end tests for critical user journeys
- Performance testing for large responses
- Cross-platform compatibility tests
Tests are located in src/test/
and follow the naming convention *.test.tsx
. Each test file should:
- Import necessary testing utilities from
vitest
and@testing-library/react
- Mock external dependencies when needed
- Use React Testing Library's best practices for component testing
Example test structure:
import { describe, it, expect, vi } from 'vitest'
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { YourComponent } from '@/components/YourComponent'
describe('YourComponent', () => {
interface SetupOptions {
initialValue?: string
isDisabled?: boolean
}
const setup = (options: SetupOptions = {}) => {
const user = userEvent.setup()
const props = {
value: options.initialValue || '',
isDisabled: options.isDisabled || false,
onChange: vi.fn(),
onSubmit: vi.fn(),
}
const utils = render(<YourComponent {...props} />)
return {
user,
...utils,
...props,
}
}
it('renders with default props', () => {
setup()
expect(screen.getByRole('textbox')).toBeInTheDocument()
expect(screen.getByRole('button')).toBeEnabled()
})
it('handles user input and submission', async () => {
const { user, onChange, onSubmit } = setup()
const input = screen.getByRole('textbox')
const button = screen.getByRole('button')
await user.type(input, 'Hello')
expect(onChange).toHaveBeenCalledWith('Hello')
await user.click(button)
expect(onSubmit).toHaveBeenCalled()
})
it('respects disabled state', () => {
setup({ isDisabled: true })
expect(screen.getByRole('textbox')).toBeDisabled()
expect(screen.getByRole('button')).toBeDisabled()
})
})
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means:
- You can use this software for any purpose
- You can modify this software
- You can distribute this software
- You must include the license and copyright notice with each copy
- You must disclose your source code when you distribute the software
- You must state changes made to the code
- If you use this software over a network, you must make your modified version available to users of that network
See the LICENSE file for the full license text.