https://github.com/mukuljainx/mokku
https://github.com/mukuljainx/mokku
api chrome-extension mock
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mukuljainx/mokku
- Owner: mukuljainx
- License: mit
- Created: 2020-06-08T17:20:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-31T09:46:53.000Z (over 1 year ago)
- Last Synced: 2024-12-31T10:31:16.609Z (over 1 year ago)
- Topics: api, chrome-extension, mock
- Language: TypeScript
- Homepage: https://mukuljainx.github.io/Mokku/#/
- Size: 57.4 MB
- Stars: 9
- Watchers: 2
- Forks: 7
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Mokku: Mock API Calls Seamlessly
> **Mokku** helps you by mocking API calls and changing their response, response time, and status. Easily test all your use cases like long loading times, error states, or missing/incorrect data.

---
## ๐ Get the Extension
| Store | Link |
| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------- |
| **Chrome Web Store** | [Install Now](https://chrome.google.com/webstore/detail/mokku-mock-api-calls-seam/llflfcikklhgamfmnjkgpdadpmdplmji?hl=en&authuser=1) |
---
## โจ Features
Mokku adds itself as a tab in your **Dev Tools panel**. From there, you can see network logs, manage mocks, and much more.
### 1. Mock API Calls
- **Specify** JSON body, HTTP status, time delay, and headers.
- **GraphQL Support:** Supports mocking GraphQL queries and mutations.
- **Dynamic Response Mocking:** Write **JavaScript functions** to return complex, conditional responses.
- **Dynamic URL Support:** Use patterns like `goals/:goalId`. The URL parameters are available for your dynamic response function.
- **VSCode Editor** Added Monaco editor, the VSCode editor for editing response and functions
We Uses [path-to-regexp v8.2.0](https://www.npmjs.com/package/path-to-regexp/v/8.2.0) for dynamic url matching.
### 2. Modify Headers
- Easily modify request headersโglobally for all requests or specifically for individual URLs.
### 3. Projects
- Group and organize your mocks and headers by **Project** for simplified management.
### 4. Import / Export
- Keep your mocks & headers by exporting by project basis and import them back as well.
---
## โ๏ธ How it Works & Privacy
- Mokku operates within the Dev Tools panel, showing network logs and enabling mocking.
- Any network call from the logs can be mocked with a simple click, or you can create a mock from scratch.
- **Access/Injection:** All URLs are accessible, but Mokku _does not_ inject scripts into any page _apart from_ those served locally (`http://localhost*`) until manually enabled from the Panel.
### ๐ Privacy Policy
Mokku is committed to user privacy:
- It **does not collect or ask for any personal information**.
- Mocks are stored securely in the **Chrome local store**.
---
## ๐ Support Us
Developing and maintaining Mokku is a significant effort! Please consider supporting the extension if it helps your workflow.
**Alternatively, use UPI:** `811721108` (This is a UPI number, not a mobile number).
---
## Bugs / Request a Features ๐
Please use https://github.com/mukuljainx/Mokku/issues to report any bug or feature request.
---
## ๐ป Developer Guide
### Prerequisites
- [node + npm](https://nodejs.org/) (Current Version)
### Project Structure
| Directory | Description |
| :-------- | :------------------------------------ |
| `dist` | The final Chrome Extension directory. |
| `dist/js` | Generated JavaScript files. |
### Setup
```bash
npm install
```
