Skip to content

Latest commit

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Mock API Builder

A lightweight mock backend + mock database built for Frontend Developers — no backend knowledge required.
Create data models, generate mock data, and call real REST APIs instantly while focusing entirely on UI development.

✨ Features

  • Create Projects and organize your mock data
  • Define Resources (tables/collections) like users, products, posts, etc.
  • Add Fields with supported types:
    • string - Text fields
    • number - Numeric fields
    • boolean - Boolean fields
    • date - Date fields (ISO string)
    • timestamp - Unix timestamp (milliseconds)
    • json - JSON object fields
    • faker - Auto-generate realistic test data with Faker.js
  • Switch Data Mode:
    • Schema Mode — simple structured fields
    • JSON Template Mode — supports complex nested objects/arrays
  • Clean, RESTful dynamic API endpoints

🎯 Designed For

  • Frontend devs learning React / Vue / Svelte / Next.js
  • Rapid UI prototyping without backend setup
  • Portfolio / demo / hackathon projects
  • Teams who need mock data that actually looks real

🏗 Tech Stack

LayerTechnologyReason
BackendNestJSScalable, clean architecture
ORMPrismaStrong Postgres + DX
DatabasePostgreSQL (JSONB)Flexible schema, no heavy migrations needed
AuthJWTWorks anywhere, simple integration
Mock DataFaker.jsGenerate realistic sample data

🚀 Getting Started

Prerequisites

  • Node.js: Version 20 or higher
  • PostgreSQL: Local instance or Docker
  • Yarn or pnpm (recommended)

Installation

  1. Clone the repository:

    git clone https://github.com/huynam/mockpilot.git
    cd mockpilot
  2. Install dependencies:

    yarn install
    # or
    pnpm install
  3. Setup environment variables:

    cp .env.example .env
    # Update .env with your database credentials and other settings
  4. Database Setup:

    # Generate Prisma client and run migrations
    npx prisma generate
    npx prisma migrate dev
    # Seed initial data (Admin user)
    yarn seed:admin

Running the App

# Development mode
yarn start:dev
# Production mode
yarn build
yarn start:prod

🧱 Backend Roadmap

AreaStatusNotes
Auth / Users✅ DoneJWT, Role-based access
Projects✅ DoneCreate / List / Manage workspaces
Resources✅ DoneLogical data tables & Field management
Mock Data✅ DoneSmart generation (Faker & JSON Templates)
Public API✅ DoneDynamic CRUD endpoints /api/v1/pilot/...
Pagination🚧 In ProgressPerformance for large datasets
API Keys🔜 PlannedAccess without JWT
Export⭐ PlannedExport to Supabase SQL

🧭 Philosophy

Focus on UI, not backend. Data should be easy to create, realistic to display, and effortless to integrate.


🚀 Status

The project backend is production-ready with core features complete. Frontend dashboard development is ready to begin.

Stay tuned ✨

About

A lightweight mock backend + mock database

Resources

Stars

20 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages