From 01eee52849bbd2f4728b077b2aa827f847d9bd6f Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Fri, 8 Apr 2022 10:59:51 -0400 Subject: [PATCH] Updating contributing to app store docs (#2433) * Allow any types in docs * Update doc --- apps/docs/pages/developer/app-store.mdx | 23 +++++++++++++++++++---- apps/docs/tsconfig.json | 5 ++++- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/apps/docs/pages/developer/app-store.mdx b/apps/docs/pages/developer/app-store.mdx index 6c30776c..11af8378 100644 --- a/apps/docs/pages/developer/app-store.mdx +++ b/apps/docs/pages/developer/app-store.mdx @@ -12,20 +12,26 @@ All apps can be found under `packages/app-store`. In this folder is `_example` w ```sh ├──_example -| ├──index.ts -| ├──package.json -| ├──.env.example | | ├──api | | ├──example.ts | | ├──index.ts | +| ├──components +| | ├──InstallAppButton.tsx +| | ├──index.ts +| | ├──lib | | ├──adaptor.ts | | ├──index.ts | | ├──static | | ├──icon.svg +| +| ├──index.ts +| ├──package.json +| ├──.env.example +| ├──README.mdx ``` ## Getting Started @@ -38,8 +44,17 @@ In `index.js` fill out the meta data that will be rendered on the app page. Unde Under the `/api` folder, this is where any API calls that are associated with your app will be handled. Since cal.com uses Next.js we use dynamic API routes. In this example if we want to hit `/api/example.ts` the route would be `{BASE_URL}/api/integrations/_example/example`. Export your endpoints in an `index.ts` file under `/api` folder and import them in your main `index.ts` file. +Under the `/components` folder, this is where the install button for your app should live. Follow the template under `_example` to add your on click action (ex. Redirecting to a log in page or opening a modal). + The `/lib` folder is where the functions of your app live. For example, when creating a booking with a MS Teams link the function to make the call to grab the link lives in the `/lib` folder. Export your endpoints in an `index.ts` file under `/lib` folder and import them in your main `index.ts` file. -The `/static` folder is where your assets live. +On the app store page you can customize your apps description by adding a markdown file called `README.mdx`. If you do not add one then the description from you `package.json` will be used instead. + +The `/static` folder is where you can store your app icon and any images that your `README.mdx` may use. + +## Adding Your App to the App Store +To render your app on the app store page, go to `packages/app-store/index.ts`. Import your app into the file and add it to the `appStore` object. + +Under `packages/app-store/components.tsx`, in the `InstallAppButtonMap` object dynamically import your install button. Your install button should live under `{your_app}/components`. If you need any help feel free to join us on [Slack](https://cal.com/slack) diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index b98f0952..d1581064 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@calcom/tsconfig/nextjs.json", "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], + "compilerOptions": { + "noImplicitAny": false + } }