- Building demos without real data
- Testing your Evidence app locally
- Creating sample datasets for documentation
Installation
The Faker datasource is included with Evidence by default.Configuration
Faker doesn’t require database credentials. Instead, you define data schemas using YAML configuration files.Basic Setup
Add Faker Source
Navigate to Settings in your Evidence app (localhost:3000/settings) and add a Faker datasource.
Create Schema Files
Create
.yaml files in your sources/faker/ directory to define your mock data schemas.Schema Definition
Define your mock data structure in YAML files. Faker uses the @faker-js/faker library. Example:sources/faker/users.yaml
Available Generators
Faker provides hundreds of data generators organized by category: Person Data:person.firstName- First namesperson.lastName- Last namesperson.fullName- Full namesperson.jobTitle- Job titles
internet.email- Email addressesinternet.url- URLsinternet.userName- Usernamesinternet.ipv4- IP addresses
commerce.productName- Product namescommerce.price- Pricescommerce.department- Departments
date.past- Past datesdate.future- Future datesdate.recent- Recent datesdate.between- Dates between two dates
datatype.number- Random numbersdatatype.float- Random floatsdatatype.boolean- Boolean values
location.city- City nameslocation.country- Countrieslocation.streetAddress- Street addresses
Advanced Features
Seeded Data
Use the same seed value to generate consistent, reproducible data:Relationships Between Tables
Create related data across multiple tables:Custom Value Ranges
Control the output of generators with parameters:Example Schemas
E-commerce Dataset
Use Cases
Demo Applications
Build impressive demos without needing real data or database access
Testing
Generate large datasets to test performance and edge cases
Development
Develop locally without connecting to production databases
Documentation
Create consistent example datasets for tutorials and guides
Troubleshooting
Faker data not generating
Faker data not generating
Make sure you’ve run
npm run sources after creating or modifying your schema files. The Faker plugin generates static Parquet files that Evidence uses.Invalid generator error
Invalid generator error
Check the Faker.js API docs to verify the generator name. Generator names are case-sensitive and follow the format
category.method.Need more rows
Need more rows
Increase the
rows value in your schema file. Note that very large datasets (>100,000 rows) may take longer to generate.Related
- JavaScript Datasource - Run custom JavaScript to fetch data
- CSV Datasource - Import CSV files
- DuckDB - Local database with SQL