Skip to content

kiwicom/Paper-Plane

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Paper Plane

OpenAPI based mock management system.
View Demo · Report Bug · Request Feature

✈️ About The Project

Product Name Screen Shot

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 Architecture drawio

Paper Plane helps you manage mocks for your production website and is compatible with API based on OpenAPI v2, v3 and v3.1 specification.

Built With

Prerequisites

  • Firebase Project with Firestore DB and Google Cloud Functions*

*only required for deployment

🧩 Running Paper Plane Locally

  1. Setup Firebase ENV variables - create .env.local based on .env.local.example
  2. Enable Google Sign-in method in your Firebase Project
  3. yarn install
  4. yarn dev

🚀 Deployment

main branch is automatically deployed to Kiwi.com's Paper Plane Firebase project, through GitHub Actions.

Hosting custom Paper Plane instance

  1. Fork Paper Plane Repository
  2. Run Paper Plane Locally
  3. (Manual deployment)
    • firebase login
    • firebase use <project_id|alias>
    • yarn deploy
  4. (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 secret FIREBASE_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 sure firebase-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.

🚧 Roadmap

  • 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

🪪 License

Distributed under the MIT License. See LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published