FauxDataForge is a flexible API for generating, storing, and managing fake data based on user-defined schemas. Built with Express.js and Faker.js, this tool is perfect for creating realistic mock data for testing, development, and demonstration purposes.
- Custom schema-based fake data generation
- Data storage and retrieval
- File listing and deletion
- Swagger documentation for API exploration
- Image generation support
- Node.js (v14 or later recommended)
- npm
-
Clone the repository:
git clone https://github.com/ShivdeepJha/FauxDataForge.git cd FauxDataForge -
Install dependencies:
npm install -
Start the development server:
npm start -
Access the Swagger documentation at
http://localhost:3000/api-docs
POST /generate-data: Generate and store fake dataGET /get-data/{key}: Retrieve stored dataGET /list-files: List all stored data filesDELETE /delete-data/{key}: Delete specific data file
For detailed information, refer to the Swagger documentation.
FauxDataForge now supports image generation as part of the fake data creation process. You can include image fields in your schema with the following properties:
type: Set to "image"width: Desired image width (default: 200)height: Desired image height (default: 200)category: Optional category for the image (e.g., "nature", "people", etc.)
Example schema with image:
{
"name": "name",
"email": "email",
"profile_picture": {
"type": "image",
"width": 300,
"height": 300,
"category": "people"
}
}The generated image URL will be a placeholder from picsum.photos, simulating different images for each record.
- Run
npm startto start the server with nodemon for auto-reloading during development.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the ISC License.
- Express.js
- Faker.js
- Swagger UI Express
- uuid
- Picsum Photos for image placeholders