This is a mock server designed to simulate requests and responses as specified in the ZIMRA FDMS API documentation: https://fdmsapitest.zimra.co.zw/swagger/index.html
Note
This mock server is particularly useful for developers who do not have immediate access to a fiscalized ID. However, please note that it is recommended to test with the original server whenever possible, as the responses may differ from those provided by this mock implementation.
- Node.js
- Express
- TypeScript
- Docker
-
Clone the repository:
git clone https://github.com/takumade/zimra-fdms-mock-server.git cd zimra-fdms-mock-server
-
Install dependencies:
- Using npm/yarn/pnpm:
npm install
- Using npm/yarn/pnpm:
-
Start the server:
- Using npm/yarn/pnpm:
npm start
- Using npm/yarn/pnpm:
NB: In place of npm
you can use yarn
, or pnpm
.
NB: The server will start running on http://localhost:3000
.
To deploy the ZIMRA FDMS Mock Server using Docker, follow these steps:
- Ensure Docker is installed on your system.
- Navigate to the project root directory.
- Build and run the Docker container:
# Build the Docker image
docker build -t zimra-mock-server .
# Run the container
docker run -p 3000:3000 zimra-mock-server
The server will be accessible at http://localhost:3000
.
You can access the live endpoint at:
https://zimra-fdms-mock-server.onrender.com
Note
While this runs on a free tier and won't dip into my pocket, please don't abuse it.
This project is open source and contributions are welcome. Please fork the repository and submit pull requests.
Note
Given that it's a mock server, contributions are most welcome in the form of bug fixes and realism enhancements.
✅ Device endpoints
✅ Public endpoints
✅ User endpoints
✅ ProductsStock endpoints
⏳ Make mock server as realistic as possible
Note
Most of the endpoints are mocked but I want it to be as realistic as possible. An average user shouldnt tell the difference between the mock server and the original server. 😊 For more info see TODO.md
src/
├── controllers/
│ ├── Device/
│ ├── Public/
│ ├── Public/
│ ├── User/
│ └── ProductsStock/
├── routes/
│ ├── Device/
│ ├── Public/
│ ├── User/
│ └── ProductsStock/
└── server/
├── app.ts
└── index.ts