Skip to content

huynamboz/devmock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Layer Technology Reason
Backend NestJS Scalable, clean architecture
ORM Prisma Strong Postgres + DX
Database PostgreSQL (JSONB) Flexible schema, no heavy migrations needed
Auth JWT Works anywhere, simple integration
Mock Data Faker.js Generate 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

Area Status Notes
Auth / Users ✅ Done JWT, Role-based access
Projects ✅ Done Create / List / Manage workspaces
Resources ✅ Done Logical data tables & Field management
Mock Data ✅ Done Smart generation (Faker & JSON Templates)
Public API ✅ Done Dynamic CRUD endpoints /api/v1/pilot/...
Pagination 🚧 In Progress Performance for large datasets
API Keys 🔜 Planned Access without JWT
Export ⭐ Planned Export 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

Watchers

Forks

Releases

No releases published

Packages

No packages published