How aamir569696/mockflow-ai works
MockFlow AI turns a natural-language API description into an editable, session-scoped mock REST API that developers can exercise, monitor, and export. The main path runs from the Playground through generation and schema editing, then serves live mock requests; separate branches cover QA/load testing, telemetry, public docs, exports, and authentication. The README documents capabilities whose route or component internals were not sampled, so those links are shown only where the tree or documented architecture supports them.
Main entry points: mockService.js Mock API client · server.js Express API server · PlaygroundPage.jsx API playground · mock.js Mock request routes
Components 31
Playground and tools
- React application
frontend/src/App.jsx - API playground
frontend/src/pages/PlaygroundPage.jsx - Prompt and schema editing
frontend/src/components/playground/PromptPanel.jsx - Endpoint preview
frontend/src/components/playground/EndpointPreview.jsx - HTTP request runner
frontend/src/components/playground/RequestRunner.jsx - QA and stress tools
frontend/src/components/dashboard/StressTester.jsx - Traffic dashboard
frontend/src/components/dashboard/RegressionLog.jsx - Public API docs
frontend/src/pages/DocsPage.jsx - Export and SDK tools
frontend/src/components/playground/ExportDropdown.jsx - Playground state
frontend/src/store/playgroundStore.js - Generation history
frontend/src/store/useHistoryStore.js - Mock API client
frontend/src/services/mockService.js - Saved endpoint client
frontend/src/services/endpointService.js - Account interface
frontend/src/components/auth/AuthModal.jsx - Authentication client
frontend/src/services/authService.js
API generation
- Generation routes
backend/routes/generate.js - Generation engine
backend/services/DataGenerator.js
Mock runtime
- Express API server
backend/server.js - Endpoint management
backend/routes/endpoints.js - Mock request routes
backend/routes/mock.js - Mock resolver
backend/services/MockResolver.js - Traffic routes
backend/routes/traffic.js - Documentation route
backend/routes/docs.js
Sessions and integrations
- Session mock store
backend/services/SessionStore.js - Authentication routes
backend/routes/auth.js - Auth middleware
backend/middleware/auth.js - User records
backend/models/User.js - Session persistence
backend/services/SessionPersistence.js
Other components
- Developer
- Gemini AI
- MongoDB
Connections 41
- Developer → React application: uses
- React application → API playground: routes to
- API playground → Prompt and schema editing: edits prompt
- API playground → Endpoint preview: shows endpoints
- API playground → HTTP request runner: runs requests
- Prompt and schema editing → Playground state: updates state
- API playground → Mock API client: calls API
- Mock API client → Generation routes: sends generation
- Generation routes → Generation engine: generates schema
- Generation routes → Gemini AI: requests AI
- Generation engine → Session mock store: registers definitions
- Generation engine → Playground state: returns schema
- Endpoint preview → Export and SDK tools: offers exports
- Endpoint preview → Playground state: reads endpoints
- API playground → Generation history: saves snapshots
- HTTP request runner → Mock API client: fires requests
- Mock API client → Mock request routes: sends mock request
- Mock request routes → Mock resolver: resolves request
- Mock resolver → Session mock store: reads definitions and data
- Mock request routes → Session mock store: updates collections
- Mock request routes → Traffic routes: records traffic
- Traffic dashboard → Mock API client: fetches traffic
- Mock API client → Traffic routes: requests traffic
- QA and stress tools → Mock API client: generates tests and requests
- Public API docs → Mock API client: fetches docs
- Mock API client → Documentation route: requests docs
- Documentation route → Session mock store: reads API metadata
- Developer → Account interface: opens account
- Account interface → Authentication client: submits credentials
- Authentication client → Authentication routes: calls auth API
- Authentication routes → User records: reads and writes users
- Saved endpoint client → Endpoint management: manages saved endpoints
- Endpoint management → Auth middleware: checks access
- Express API server → Session persistence: initializes persistence
- Session persistence → MongoDB: persists sessions
- Express API server → Generation routes: mounts routes
- Express API server → Mock request routes: mounts routes
- Express API server → Endpoint management: mounts routes
- Express API server → Traffic routes: mounts routes
- Express API server → Documentation route: mounts routes
- Express API server → Authentication routes: mounts routes