Paper Plane is a web application for creating and managing mocks of production web app. The whole application in based on Firebase platform. Paper Plane takes advantage of OpenAPI standard and uses it for generation and validation of mocked API responses.
Paper Plane helps you manage mocks for your production website and is compatible with API based on OpenAPI v2, v3 and v3.1 specification.
- Firebase Project with Firestore DB and Google Cloud Functions*
*only required for deployment
- Setup Firebase ENV variables - create
.env.local
based on.env.local.example
- Enable Google Sign-in method in your Firebase Project
yarn install
yarn dev
main
branch is automatically deployed to Kiwi.com's Paper Plane Firebase project, through GitHub Actions.
- Fork Paper Plane Repository
- Run Paper Plane Locally
- (Manual deployment)
firebase login
firebase use <project_id|alias>
yarn deploy
- (Continuous deployment through GitHub Actions)
- Move environment variables from
.env.local
to your GitHub Actions Secrets - Enable GitHub Actions in your repository
- Enable Artifact Registry API on your Google Cloud project
⚠️ Service Account stored in GitHub secretFIREBASE_SERVICE_ACCOUNT_PAPER_PLANE
will require following GCP IAM roles- Cloud Functions Developer - Cloud Functions deployment
- Firebase Authentication Admin - Full read/write access to Firebase Authentication resources
- Firebase Hosting Admin - Client hosting deployment
- API Keys Viewer - Getting API keys for a project
⚠️ Make surefirebase-adminsdk
has the rights to access Firestore, if not set following GCP IAM roles to service account used for running Cloud Function (usually<project_id>@appspot.gserviceaccount.com
)- Cloud Functions Admin - Full access to functions, operations and locations.
- Editor - View, create, update, and delete most Google Cloud resources. See the list of included permissions.
- Firestore Service Agent - Gives Firestore service account access to managed resources.
- Move environment variables from
- OpenAPI's validation during mock editing and mock creation process
- Updating Projects's API endpoints (add new endpoints if OpenAPI schema has new ones)
- Validating mocks against OpenAPI schema periodically or on each api request and updating mock validity status in Firestore
- Automatic repair of invalid mocks
- Creating non-OpenAPI API mocks
- Configurable project access roles in project settings
- Integration tests
- Configurable default Client URL base options in project config
- Diff for mocks
- Creating mocks through templates of existing mocks
- Contribution guide
Distributed under the MIT License. See LICENSE
for more information.