|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +<img src="docs/public/logo.png" alt="LitePost" width="96" /> |
| 4 | + |
1 | 5 | # LitePost |
2 | 6 |
|
3 | | -A lightweight, cross-platform API testing application built with Tauri, React, and TypeScript. |
| 7 | +**A fast, lightweight API client — no accounts, no cloud, no junk.** |
4 | 8 |
|
5 | | - |
| 9 | +Built with Tauri, Rust, and React. Your requests, collections, and history live in |
| 10 | +plain JSON files on your machine and nowhere else. |
6 | 11 |
|
| 12 | +[**Download**](https://github.com/LykosAI/LitePost/releases/latest) · |
| 13 | +[**Documentation**](https://lykos.ai/LitePost/) · |
| 14 | +[**Report an issue**](https://github.com/LykosAI/LitePost/issues) |
7 | 15 |
|
8 | | -<div align="center"> |
| 16 | +</div> |
9 | 17 |
|
10 | | -### 📥 Download LitePost |
| 18 | + |
11 | 19 |
|
12 | 20 | <table> |
13 | 21 | <tr> |
14 | | -<td align="center" colspan="3"> |
15 | | -<h1>🪟</h1> |
16 | | -<b>Windows</b><br/> |
17 | | -<sub>64-bit Installer</sub><br/> |
18 | | -<a href="https://github.com/LykosAI/LitePost/releases/latest/download/litepost_x64-setup.exe"> |
19 | | -⬇️ Download |
20 | | -</a> |
21 | | -</td> |
| 22 | +<td width="62%"><img src="docs/public/screenshot-schematic.png" alt="The Schematic light theme" /></td> |
| 23 | +<td><img src="docs/public/screenshot-palette.png" alt="The Ctrl+K command palette" /></td> |
22 | 24 | </tr> |
23 | 25 | <tr> |
24 | | -<td align="center"> |
25 | | -<h1>🍎</h1> |
26 | | -<b>macOS</b> <sup><code>beta</code></sup><br/> |
27 | | -<sub>Apple Silicon</sub><br/> |
28 | | -<a href="https://github.com/LykosAI/LitePost/releases/latest/download/litepost_aarch64.app.tar.gz"> |
29 | | -⬇️ Download |
30 | | -</a> |
31 | | -</td> |
32 | | -<td align="center"> |
33 | | -<h1>🍎</h1> |
34 | | -<b>macOS</b> <sup><code>beta</code></sup><br/> |
35 | | -<sub>Intel Processor</sub><br/> |
36 | | -<a href="https://github.com/LykosAI/LitePost/releases/latest/download/litepost_x64.app.tar.gz"> |
37 | | -⬇️ Download |
38 | | -</a> |
39 | | -</td> |
40 | | -<td align="center"> |
41 | | -<h1>🐧</h1> |
42 | | -<b>Linux</b> <sup><code>beta</code></sup><br/> |
43 | | -<sub>AppImage (64-bit)</sub><br/> |
44 | | -<a href="https://github.com/LykosAI/LitePost/releases/latest/download/litepost_amd64.AppImage"> |
45 | | -⬇️ Download |
46 | | -</a> |
47 | | -</td> |
| 26 | +<td align="center"><sub>Schematic — the light theme</sub></td> |
| 27 | +<td align="center"><sub>Ctrl+K — search everything, do anything</sub></td> |
48 | 28 | </tr> |
49 | 29 | </table> |
50 | 30 |
|
51 | | -> 🔄 All downloads are automatically updated to the latest version. [View all releases](https://github.com/LykosAI/LitePost/releases) |
| 31 | +## Download |
52 | 32 |
|
53 | | -</div> |
| 33 | +Grab the installer for your platform from the |
| 34 | +[**latest release**](https://github.com/LykosAI/LitePost/releases/latest): |
| 35 | + |
| 36 | +- **Windows** — `*_x64-setup.exe` |
| 37 | +- **macOS** *(beta)* — `*_aarch64.app.tar.gz` (Apple Silicon) or `*_x64.app.tar.gz` (Intel) |
| 38 | +- **Linux** *(beta)* — `*_amd64.AppImage` |
54 | 39 |
|
55 | | -## Prerequisites |
| 40 | +No sign-up, no telemetry. LitePost updates itself in-app when new releases ship. |
56 | 41 |
|
57 | | -- [Node.js](https://nodejs.org/) (v18 or later) |
58 | | -- [pnpm](https://pnpm.io/) (v8 or later) |
59 | | -- [Rust](https://www.rust-lang.org/) (latest stable) |
60 | | -- Platform-specific dependencies for Tauri: |
61 | | - - **Windows**: Microsoft Visual Studio C++ Build Tools |
62 | | - - **macOS**: Xcode Command Line Tools |
63 | | - - **Linux**: `build-essential`, `libwebkit2gtk-4.0-dev`, `curl`, `wget`, `libssl-dev`, `libgtk-3-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev` |
| 42 | +> **macOS note:** builds are not yet notarized — right-click the app and choose **Open** the first time. |
64 | 43 |
|
65 | | -## Development Setup |
| 44 | +## Features |
66 | 45 |
|
67 | | -1. Clone the repository: |
68 | | - ```bash |
69 | | - git clone https://github.com/LykosAI/LitePost.git |
70 | | - cd LitePost |
71 | | - ``` |
| 46 | +- **Command palette** — `Ctrl+K` fuzzy-searches history and collections, switches environments, and runs any action |
| 47 | +- **Full HTTP toolkit** — all standard methods, headers/params/cookies editors, multipart file uploads, per-request network settings (timeout, SSL, proxy) |
| 48 | +- **Auth that does the work** — Basic, Bearer, API Key, and OAuth 2.0 with PKCE, token refresh, and one-click endpoint auto-fill from OIDC discovery |
| 49 | +- **Live responses** — collapsible JSON tree with a `$.path[*]`-style filter bar, HTML and image previews, timing waterfall, redirect chains |
| 50 | +- **Streaming** — first-class SSE with per-chunk timestamps and cancellation, plus a WebSocket panel |
| 51 | +- **Environments & variables** — `{{variable}}` substitution everywhere, with inline badges showing resolved values, and response extraction rules to capture values automatically |
| 52 | +- **Collections** — save, organize, and batch-run requests; import from cURL, OpenAPI, or Postman format |
| 53 | +- **Testing** — JavaScript test scripts, no-code assertions, and pre-request scripts |
| 54 | +- **Code generation** — copy any request as cURL, Python, JavaScript, C#, Go, or Ruby |
| 55 | +- **Six themes** — from the warm default **Night Desk** to the paper-and-cobalt **Schematic** light theme |
72 | 56 |
|
73 | | -2. Install dependencies: |
74 | | - ```bash |
75 | | - pnpm install |
76 | | - ``` |
| 57 | +Full guides for everything live in the [documentation](https://lykos.ai/LitePost/). |
77 | 58 |
|
78 | | -3. Start the development server: |
79 | | - ```bash |
80 | | - pnpm tauri dev |
81 | | - ``` |
| 59 | +## Development |
82 | 60 |
|
83 | | -## Building for Production |
| 61 | +Prerequisites: [Node.js](https://nodejs.org/) 20+, [pnpm](https://pnpm.io/) 9, |
| 62 | +[Rust](https://www.rust-lang.org/) stable, and the |
| 63 | +[Tauri platform dependencies](https://v2.tauri.app/start/prerequisites/) for your OS. |
84 | 64 |
|
85 | | -To create a production build: |
86 | 65 | ```bash |
87 | | -pnpm tauri build |
| 66 | +git clone https://github.com/LykosAI/LitePost.git |
| 67 | +cd LitePost |
| 68 | +pnpm install |
| 69 | +pnpm tauri dev |
88 | 70 | ``` |
89 | 71 |
|
90 | | -The built applications will be available in `src-tauri/target/release/bundle/`. |
| 72 | +Production builds land in `src-tauri/target/release/bundle/`: |
91 | 73 |
|
92 | | -## Project Structure |
93 | | - |
94 | | -``` |
95 | | -litepost/ |
96 | | -├── src/ # React frontend source |
97 | | -│ ├── components/ # React components |
98 | | -│ │ └── ui/ # Reusable UI components (shadcn/ui) |
99 | | -│ ├── hooks/ # Custom React hooks |
100 | | -│ ├── store/ # Zustand state management |
101 | | -│ ├── utils/ # Utility functions |
102 | | -│ ├── types/ # TypeScript type definitions |
103 | | -│ └── test/ # Test files |
104 | | -├── src-tauri/ # Rust backend source |
105 | | -│ ├── src/ # Rust source code |
106 | | -│ └── capabilities/ # Tauri capability configurations |
107 | | -├── public/ # Static assets |
108 | | -├── coverage/ # Test coverage reports |
109 | | -└── dist/ # Production build output |
| 74 | +```bash |
| 75 | +pnpm tauri build |
110 | 76 | ``` |
111 | 77 |
|
112 | | -Key directories: |
113 | | -- `src/components/`: React components organized by feature |
114 | | -- `src/hooks/`: Custom hooks for API requests, state management, etc. |
115 | | -- `src/store/`: Zustand stores for collections, environments, and settings |
116 | | -- `src/test/`: Unit tests using Vitest and React Testing Library |
117 | | -- `src-tauri/`: Rust backend with HTTP client and file system operations |
118 | | - |
119 | | -## Features 🚀 |
120 | | - |
121 | | -- 🎨 Modern, native UI built with React, Tailwind CSS, and Shadcn UI |
122 | | -- 💻 Cross-platform support (Windows, macOS, Linux) |
123 | | - |
124 | | -### Request & Authentication 🔐 |
125 | | -- Multiple request tabs with history |
126 | | -- Authentication support: |
127 | | - - Basic Auth |
128 | | - - Bearer Token |
129 | | - - API Key (header and query parameter) |
130 | | -- Custom request headers and parameters |
131 | | -- 📝 Code generation for multiple languages (curl, Python, JavaScript, C#, Go, Ruby) |
132 | | - |
133 | | -### Response Handling 📊 |
134 | | -- Advanced response visualization: |
135 | | - - ✨ JSON prettification with syntax highlighting |
136 | | - - 📄 XML formatting |
137 | | - - 🌐 HTML preview |
138 | | - - 🖼️ Image preview |
139 | | -- Response metrics: |
140 | | - - 📏 Size measurements |
141 | | - - ⚡ Request/response timing |
142 | | - - 📈 Network timing breakdown (DNS, First byte, Download time) |
143 | | - |
144 | | -### Environment Management 🌍 |
145 | | -- Create, edit, and delete environments |
146 | | -- Variable substitution |
147 | | -- Environment switching |
148 | | -- Environment-specific variables |
149 | | - |
150 | | -### Collections 📁 |
151 | | -- Save and organize requests in collections |
152 | | -- Basic folder organization |
153 | | -- Import/export collections |
154 | | -- Postman format compatibility |
155 | | - |
156 | | -### Testing ✅ |
157 | | -- JavaScript-based test scripts |
158 | | -- Comprehensive test assertions: |
159 | | - - Status code validation |
160 | | - - JSON value verification |
161 | | - - Header checks |
162 | | - - Response time validation |
163 | | -- Test execution with results display |
164 | | - |
165 | | -## Testing 🧪 |
166 | | - |
167 | | -The project uses Vitest for testing. Here are the available test commands: |
| 78 | +### Tests |
168 | 79 |
|
169 | 80 | ```bash |
170 | | -# Run all tests |
171 | | -pnpm test |
172 | | - |
173 | | -# Run tests in watch mode (useful during development) |
174 | | -pnpm test:watch |
175 | | - |
176 | | -# Run tests with coverage report |
177 | | -pnpm test:coverage |
178 | | - |
179 | | -# Run tests for a specific file |
180 | | -pnpm test RequestUrlBar |
| 81 | +pnpm test:run # frontend (Vitest + React Testing Library) |
| 82 | +pnpm test:coverage # with coverage report |
| 83 | +cargo test # Rust backend (run inside src-tauri/) |
181 | 84 | ``` |
182 | 85 |
|
183 | | -The test suite currently includes: |
184 | | -- Unit tests for React components using React Testing Library |
185 | | -- Component mocking (e.g., Radix UI components) |
186 | | -- Event handling tests |
187 | | -- State management tests |
188 | | -- Coverage reporting with v8 |
189 | | - |
190 | | -Coverage reports can be found in: |
191 | | -- Terminal output (text format) |
192 | | -- `coverage/` directory (HTML and JSON formats) |
193 | | - |
194 | | -### Planned Test Improvements 🎯 |
195 | | - |
196 | | -We plan to add: |
197 | | -- Integration tests for API request/response flows |
198 | | -- End-to-end tests for critical user journeys |
199 | | -- Performance testing for large responses |
200 | | -- Cross-platform compatibility tests |
201 | | - |
202 | | -### Writing Tests 📝 |
| 86 | +### Docs site |
203 | 87 |
|
204 | | -Tests are located in `src/test/` and follow the naming convention `*.test.tsx`. Each test file should: |
205 | | -- Import necessary testing utilities from `vitest` and `@testing-library/react` |
206 | | -- Mock external dependencies when needed |
207 | | -- Use React Testing Library's best practices for component testing |
| 88 | +The documentation is a [VitePress](https://vitepress.dev/) site in `docs/`, |
| 89 | +deployed automatically to [lykos.ai/LitePost](https://lykos.ai/LitePost/) on merge: |
208 | 90 |
|
209 | | -Example test structure: |
210 | | -```typescript |
211 | | -import { describe, it, expect, vi } from 'vitest' |
212 | | -import { render, screen } from '@testing-library/react' |
213 | | -import userEvent from '@testing-library/user-event' |
214 | | -import { YourComponent } from '@/components/YourComponent' |
215 | | - |
216 | | -describe('YourComponent', () => { |
217 | | - interface SetupOptions { |
218 | | - initialValue?: string |
219 | | - isDisabled?: boolean |
220 | | - } |
221 | | - |
222 | | - const setup = (options: SetupOptions = {}) => { |
223 | | - const user = userEvent.setup() |
224 | | - const props = { |
225 | | - value: options.initialValue || '', |
226 | | - isDisabled: options.isDisabled || false, |
227 | | - onChange: vi.fn(), |
228 | | - onSubmit: vi.fn(), |
229 | | - } |
230 | | - |
231 | | - const utils = render(<YourComponent {...props} />) |
232 | | - |
233 | | - return { |
234 | | - user, |
235 | | - ...utils, |
236 | | - ...props, |
237 | | - } |
238 | | - } |
239 | | - |
240 | | - it('renders with default props', () => { |
241 | | - setup() |
242 | | - expect(screen.getByRole('textbox')).toBeInTheDocument() |
243 | | - expect(screen.getByRole('button')).toBeEnabled() |
244 | | - }) |
245 | | - |
246 | | - it('handles user input and submission', async () => { |
247 | | - const { user, onChange, onSubmit } = setup() |
248 | | - |
249 | | - const input = screen.getByRole('textbox') |
250 | | - const button = screen.getByRole('button') |
251 | | - |
252 | | - await user.type(input, 'Hello') |
253 | | - expect(onChange).toHaveBeenCalledWith('Hello') |
254 | | - |
255 | | - await user.click(button) |
256 | | - expect(onSubmit).toHaveBeenCalled() |
257 | | - }) |
258 | | - |
259 | | - it('respects disabled state', () => { |
260 | | - setup({ isDisabled: true }) |
261 | | - expect(screen.getByRole('textbox')).toBeDisabled() |
262 | | - expect(screen.getByRole('button')).toBeDisabled() |
263 | | - }) |
264 | | -}) |
| 91 | +```bash |
| 92 | +pnpm docs:dev |
265 | 93 | ``` |
266 | | -## Contributing 🤝 |
267 | | - |
268 | | -1. Fork the repository |
269 | | -2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
270 | | -3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
271 | | -4. Push to the branch (`git push origin feature/amazing-feature`) |
272 | | -5. Open a Pull Request |
273 | 94 |
|
274 | | -## License ⚖️ |
| 95 | +## Contributing |
275 | 96 |
|
276 | | -This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means: |
| 97 | +Issues and pull requests are welcome. Branch from `main`, keep commits focused, |
| 98 | +and make sure `pnpm test:run` and `cargo check` pass — CI enforces both. See the |
| 99 | +[contributing guide](https://lykos.ai/LitePost/contributing) for details. |
277 | 100 |
|
278 | | -- You can use this software for any purpose |
279 | | -- You can modify this software |
280 | | -- You can distribute this software |
281 | | -- You must include the license and copyright notice with each copy |
282 | | -- You must disclose your source code when you distribute the software |
283 | | -- You must state changes made to the code |
284 | | -- If you use this software over a network, you must make your modified version available to users of that network |
| 101 | +## License |
285 | 102 |
|
286 | | -See the [LICENSE](LICENSE) file for the full license text. |
| 103 | +[AGPL-3.0](LICENSE) — free to use, modify, and distribute; derivatives must remain |
| 104 | +open source, including when served over a network. |
0 commit comments