Skip to content

usebruno/mockdata.dev

Repository files navigation

mockdata.dev

mockdata.dev logo

Mocks, but production-grade

A collection of realistic mock APIs for testing and development. Deterministic data generation with filtering, pagination, and comprehensive examples.

An opensource production from the folks at Bruno.

Quick Stats

  • 5 Domains - Flights, Hotels, Songs, Billing, Posts
  • 25+ Endpoints - Comprehensive API coverage
  • 1,000+ Records - Realistic mock data

Getting Started

Installation

npm install

Running the Server

npm start

The server will start on http://localhost:3000 (or the port specified in PORT environment variable).

API Domains

Flights

Flight search, bookings, and airline data

Endpoints:

  • GET /flights - Search flights with filtering and pagination
  • GET /flights/orders - Get flight orders
  • GET /flights/lookups/airports - List available airports
  • GET /flights/lookups/airlines - List airlines
  • GET /flights/lookups/aircraftTypes - List aircraft types
  • GET /flights/lookups/fareTypes - List fare types

Hotels

Hotel search, reservations, and property data

Endpoints:

  • GET /hotels - Search hotels with filtering and pagination
  • GET /hotels/orders - Get hotel orders
  • GET /hotels/lookups/cities - List available cities
  • GET /hotels/lookups/hotelChains - List hotel chains
  • GET /hotels/lookups/roomTypes - List room types
  • GET /hotels/lookups/amenities - List amenities
  • GET /hotels/lookups/propertyTypes - List property types

Songs

Music catalog, purchases, and metadata

Endpoints:

  • GET /songs - Search songs with filtering and pagination
  • GET /songs/orders - Get song orders
  • GET /songs/lookups/genres - List music genres
  • GET /songs/lookups/artists - List artists
  • GET /songs/lookups/formats - List available formats
  • GET /songs/lookups/recordLabels - List record labels

Billing

Customers, subscriptions, payments, and invoices

Endpoints:

  • GET /billing/customers - Get customers
  • GET /billing/subscriptions - Get subscriptions
  • GET /billing/payments - Get payments
  • GET /billing/invoices - Get invoices
  • GET /billing/lookups/currencies - List currencies
  • GET /billing/lookups/paymentMethods - List payment methods
  • GET /billing/lookups/subscriptionStatuses - List subscription statuses
  • GET /billing/lookups/paymentStatuses - List payment statuses
  • GET /billing/lookups/invoiceStatuses - List invoice statuses
  • GET /billing/lookups/customerStatuses - List customer statuses
  • GET /billing/lookups/plans - List subscription plans

Posts

Blog posts, comments, authors, and content

Endpoints:

  • GET /posts - Get posts with filtering and pagination
  • GET /posts/comments - Get comments
  • GET /posts/authors - Get authors
  • GET /posts/lookups/categories - List post categories
  • GET /posts/lookups/tags - List tags
  • GET /posts/lookups/postStatuses - List post statuses
  • GET /posts/lookups/commentStatuses - List comment statuses

Features

  • Deterministic Data Generation - Consistent mock data across API calls
  • Filtering - Filter results by various parameters
  • Pagination - Page-based pagination with configurable page size
  • Comprehensive Examples - OpenCollection examples for all endpoints
  • Swagger Documentation - Interactive API documentation at /spec
  • OpenCollection Docs - Full documentation at /docs

Documentation

  • API Specification: Visit /spec for interactive Swagger documentation
  • OpenCollection Docs: Visit /docs for comprehensive API documentation

Query Parameters

Most endpoints support:

  • page - Page number (default: 1)
  • per_page - Items per page (default: 10, max: 50)
  • Domain-specific filters (see individual endpoint documentation)

Responses include an x-total-count header with the total number of matching records.

Logo

The logo is open source and sourced from SVG Repo.

License

This project is licensed under the MIT License. See LICENSE.md for details.

An opensource production from the folks at Bruno.

About

Mocks, but production-grade

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •