diff --git a/apps/web/README.md b/apps/web/README.md index cbf5045dc..2689727ca 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -1,33 +1,3 @@ # Your Application -Write here everything about your application. - -## Setup - -For working locally, please add a file named `.env.local` where we can place our environment variables. This file is not committed to Git, therefore it is safe to store sensitive information in it. - -After starting Supabase, copy the service role key from the Supabase project settings and add it to the `.env.local` file. - -``` -SUPABASE_SERVICE_ROLE_KEY=your-service-role-key -``` - -## Stripe - -For the Stripe integration, first we need to start the Stripe CLI: - -``` -pnpm run stripe:listen -``` - -Then, update the `.env.local` file with the following variables: - -``` -STRIPE_WEBHOOK_SECRET= -STRIPE_SECRET_KEY= -NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= -``` - -### Supabase - -Please follow the instructions in the [Supabase README](../supabase/README.md) to setup your Supabase project. +Write here everything about your application. \ No newline at end of file diff --git a/packages/analytics/README.md b/packages/analytics/README.md index edf1601a1..cd57b92ad 100644 --- a/packages/analytics/README.md +++ b/packages/analytics/README.md @@ -2,9 +2,4 @@ @kit/analytics Package provides a simple and consistent API for tracking analytics events in web applications. -## Overview - -This version of the `@kit/analytics` package uses classes internally for structure and encapsulation, but exposes a functional API for ease of use and consistency with Makerkit's style. - -## Implementation - +Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/analytics/analytics-and-events). \ No newline at end of file diff --git a/packages/billing/core/README.md b/packages/billing/core/README.md index 30d3bc67d..2bea63bab 100644 --- a/packages/billing/core/README.md +++ b/packages/billing/core/README.md @@ -1,4 +1,5 @@ # Billing - @kit/billing + This package is responsible for managing billing and subscription related operations. Make sure the app installs the `@kit/billing` package before using it. diff --git a/packages/billing/lemon-squeezy/README.md b/packages/billing/lemon-squeezy/README.md index 5f31d9ec1..044c05a18 100644 --- a/packages/billing/lemon-squeezy/README.md +++ b/packages/billing/lemon-squeezy/README.md @@ -2,36 +2,4 @@ This package is responsible for handling all billing related operations using Lemon Squeezy. -Please add the following environment variables to your `.env.local` file during development: - -```env -LEMON_SQUEEZY_SECRET_KEY= -LEMON_SQUEEZY_SIGNING_SECRET= -LEMON_SQUEEZY_STORE_ID= -``` - -Add the variables to your production environment as well using your CI. - -### Webhooks - -When testing locally, you are required to set up a proxy to your own local server, so you can receive the webhooks from Lemon Squeezy. You can use [ngrok](https://ngrok.com/) for this purpose, or any other similar service (LocalTunnel, Cloudflare Tunnel, Localcan, etc). - -Once you have the proxy running, you can add the URL to your Lemon Squeezy account developer account as the Webhooks URL. - -Please set your app configuration URL to the following: - -``` -NEXT_PUBLIC_SITE_URL=https:// -``` - -Replace `` with the URL provided by the proxy service. - -#### Webhook Events - -You must point the webhook to the `/api/billing/webhook` endpoint in your local server. - -Please subscribe to the following events: -- `order_created` -- `subscription_created` -- `subscription_updated` -- `subscription_expired` \ No newline at end of file +Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/billing/lemon-squeezy). \ No newline at end of file diff --git a/packages/billing/stripe/README.md b/packages/billing/stripe/README.md index dbdef266e..04bf47c59 100644 --- a/packages/billing/stripe/README.md +++ b/packages/billing/stripe/README.md @@ -2,12 +2,4 @@ This package is responsible for handling all billing related operations using Stripe. -Please add the following environment variables to your `.env.local` file during development: - -```env -STRIPE_SECRET_KEY= -STRIPE_WEBHOOKS_SECRET= -NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY= -``` - -Add the variables to your production environment as well using your CI. \ No newline at end of file +Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/billing/stripe). \ No newline at end of file diff --git a/packages/cms/keystatic/README.md b/packages/cms/keystatic/README.md index a99c644dc..e3f194530 100644 --- a/packages/cms/keystatic/README.md +++ b/packages/cms/keystatic/README.md @@ -2,46 +2,4 @@ Implementation of the CMS layer using the Keystatic library. -This implementation is used when the host app's environment variable is set as: - -``` -CMS_CLIENT=keystatic -KEYSTATIC_PATH=content -``` - -Additionally, the following environment variables may be required: - -``` -KEYSTATIC_STORAGE_KIND=local # local, cloud, github -KEYSTATIC_PATH= -``` - -You can also use Keystatic Cloud or GitHub as the storage kind as remote storage. - -If `KEYSTATIC_STORAGE_KIND` is set to `cloud`, the following environment variables are required: - -``` -KEYSTATIC_STORAGE_KIND=cloud -KEYSTATIC_STORAGE_PROJECT=project-id -``` - -If `KEYSTATIC_STORAGE_KIND` is set to `github`, the following environment variables are required: - -``` -KEYSTATIC_STORAGE_KIND=github -KEYSTATIC_STORAGE_REPO=makerkit/next-supabase-saas-kit-turbo-demo -KEYSTATIC_GITHUB_TOKEN=github_***************************************************** -KEYSTATIC_PATH_PREFIX=apps/web -``` - -Of course, you need to replace the `KEYSTATIC_STORAGE_REPO` and `KEYSTATIC_GITHUB_TOKEN` with your own values. - -GitHub mode requires the installation of a GitHub app for displaying the admin. - -Please refer to the [Keystatic documentation](https://keystatic.com/docs/github-model) for more information. - -If your content folder is not at `content`, you can set the `KEYSTATIC_CONTENT_PATH` environment variable to the correct path. For example, if your content folder is at `data/content`, you can set the `KEYSTATIC_CONTENT_PATH` environment variable as: - -``` -KEYSTATIC_CONTENT_PATH=data/content -``` \ No newline at end of file +Please refer to the [Documentation](https://makerkit.dev/docs/next-supabase-turbo/content/keystatic). \ No newline at end of file diff --git a/packages/cms/types/README.md b/packages/cms/types/README.md deleted file mode 100644 index 9f552a43e..000000000 --- a/packages/cms/types/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# CMS - @kit/cms - -CMS abstraction layer for the Makerkit framework. \ No newline at end of file diff --git a/packages/cms/wordpress/README.md b/packages/cms/wordpress/README.md index 3735ffc74..5b6ced3da 100644 --- a/packages/cms/wordpress/README.md +++ b/packages/cms/wordpress/README.md @@ -1,63 +1,3 @@ # CMS/Wordpress - @kit/wordpress -Implementation of the CMS layer using the [Wordpress](https://wordpress.org) library. [WIP - not yet working] - -This implementation is used when the host app's environment variable is set as: - -``` -CMS_CLIENT=wordpress -``` - -Additionally, please set the following environment variables: - -``` -WORDPRESS_API_URL=http://localhost:8080 -``` - -For development purposes, we ship a Docker container that runs a Wordpress instance. To start the container, run: - -``` -docker-compose up -``` - -or - -``` -pnpm run start -``` - -from this package's root directory. - -The credentials for the Wordpress instance are: - -``` -WORDPRESS_DB_HOST=db -WORDPRESS_DB_USER=wordpress -WORDPRESS_DB_PASSWORD=wordpress -WORDPRESS_DB_NAME=wordpress -``` - -You will be asked to set up the Wordpress instance when you visit `http://localhost:8080` for the first time. - -## Note for Wordpress REST API - -To make the REST API in your Wordpress instance work, please change the permalink structure to `/%post%/` from the Wordpress admin panel. - -## Blog - -To include Blog Posts from Wordpress - please create a **post** with category named `blog` and add posts to it. - -## Documentation - -To include Documentation from Wordpress - please create a **page** with category named `documentation` and add posts to it. - -This involves enabling categories for pages. To do this, add the following code to your theme's `functions.php` file: - -```php -function add_categories_to_pages() { - register_taxonomy_for_object_type('category', 'page'); -} -add_action('init', 'add_categories_to_pages'); -``` - -Please refer to `wp-content/themes/twentytwentyfour/functions.php` for an example of a theme that includes this code. \ No newline at end of file +Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/content/wordpress). \ No newline at end of file diff --git a/packages/mailers/core/README.md b/packages/mailers/core/README.md index 8843b0f14..671cd8519 100644 --- a/packages/mailers/core/README.md +++ b/packages/mailers/core/README.md @@ -1,3 +1,3 @@ -# Nodemailer - @kit/nodemailer +# Mailers - @kit/mailers -This package provides a simple and easy to use mailer for sending emails using nodemailer. \ No newline at end of file +This package provides a proxy to use the registered mailer in the application. \ No newline at end of file diff --git a/packages/mailers/nodemailer/README.md b/packages/mailers/nodemailer/README.md deleted file mode 100644 index b50a8322f..000000000 --- a/packages/mailers/nodemailer/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# Mailers - @kit/mailers - -This package is responsible for sending emails using a unified interface across the app. - -The default mailer uses the `nodemailer` package to send emails. You can create custom mailers by extending the `Mailer` class. - -Make sure the app installs the `@kit/mailers` package before using it. - -```json -{ - "name": "my-app", - "dependencies": { - "@kit/mailers": "*" - } -} -``` - -## Usage - -By default, the package uses `nodemailer`. - -To use [Resend](https:///resend.com)'s HTTP API, please set the environment variable `MAILER_PROVIDER` to `resend`. - -``` -MAILER_PROVIDER=resend -``` - -### Send an email - -```tsx -import { getMailer } from '@kit/mailers'; - -async function sendEmail() { - const mailer = await getMailer(); - - return mailer.sendEmail({ - to: '', - from: '', - subject: 'Hello', - text: 'Hello, World!' - }); -} -``` - -## Resend - -If you're using the `resend` provider, please add the following environment variables: - -``` -RESEND_API_KEY=your-api-key -``` \ No newline at end of file diff --git a/packages/mailers/resend/README.md b/packages/mailers/resend/README.md deleted file mode 100644 index 8843b0f14..000000000 --- a/packages/mailers/resend/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Nodemailer - @kit/nodemailer - -This package provides a simple and easy to use mailer for sending emails using nodemailer. \ No newline at end of file diff --git a/packages/monitoring/baselime/README.md b/packages/monitoring/baselime/README.md index 2e8c528ab..2e4ffc465 100644 --- a/packages/monitoring/baselime/README.md +++ b/packages/monitoring/baselime/README.md @@ -1,8 +1,3 @@ # Baselime Monitoring / @kit/baselime -Please set the following environment variables: - -``` -NEXT_PUBLIC_BASELIME_KEY=your_key -NEXT_PUBLIC_MONITORING_PROVIDER=baselime -``` \ No newline at end of file +Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/baselime). \ No newline at end of file diff --git a/packages/next/README.md b/packages/next/README.md index fe29c0a46..4d3af8af6 100644 --- a/packages/next/README.md +++ b/packages/next/README.md @@ -1,85 +1,3 @@ # Next.js Utilities / @kit/next -This package provides utilities for working with Next.js. - -## Server Actions - -The `enhanceAction` function allows you to wrap a Next.js Server Action with additional functionality. - -```ts -import { enhanceAction } from '@kit/next/actions'; - -export const myServerAction = enhanceAction(async (data, user) => { - // "data" has been parsed with the schema - // and will correctly be typed as the schema type - // in the case below, data will be of type { id: number } - - // "user" is the user object from the session - - // if "captcha" is true, the action will require a captcha -}, { - captcha: true, - schema: z.object({ - id: z.number() - }), -}); -``` - -The `enhanceAction` function takes two arguments: -1. The action function -2. An options object - -The options object can contain the following properties: -- `captcha` - If true, the action will require a captcha to be passed to the body as `captchaToken` -- `schema` - A zod schema that the data will be validated against -- `captureException` - If true, the action will capture exceptions and report them to the configured provider. It is `true` by default. - -When successfully called, the action will return the result of the action function. - -1. The user will be automatically authenticated and the result will be passed as the second argument to the action function. -2. The data will be parsed/validated with the schema and passed as the first argument to the action function. -3. If the `captcha` option is true, the action will require a `captchaToken` to be passed in the body. - -The consumer can call the action like so: - -```ts -import { myServerAction } from 'path/to/myServerAction'; - -const result = await myServerAction({ id: 1 }); -``` - -or with an optional captcha token: - -```ts -import { myServerAction } from 'path/to/myServerAction'; - -const result = await myServerAction({ id: 1, captchaToken: 'captchaToken' }); -``` - -## Route Handlers - -The function `enhanceRouteHandler` allows you to wrap a Next.js API Route Handler with additional functionality. - -```ts -import { enhanceRouteHandler } from '@kit/next/routes'; - -export const POST = enhanceRouteHandler(({ request, body, user }) => { - // "body" has been parsed with the schema - // and will correctly be typed as the schema type - // in the case below, data will be of type { id: number } - - // "user" is the user object from the session - - // "request" is the raw request object passed by POST - // if "captcha" is true, the action will require a captcha - // if "captureException" is true, the action will capture exceptions and report them to the configured provider -}, { - captcha: true, - captureException: true, - schema: z.object({ - id: z.number() - }), -}); -``` - -When using a Captcha, the consumer will pass an header `x-captcha-token` with the captcha token. \ No newline at end of file +This package provides utilities for working with Next.js. \ No newline at end of file diff --git a/packages/ui/README.md b/packages/ui/README.md index 7a1e388bc..a3d794c11 100644 --- a/packages/ui/README.md +++ b/packages/ui/README.md @@ -4,19 +4,9 @@ This package is responsible for managing the UI components and styles across the This package define two sets of components: -- `shadn-ui`: A set of UI components that can be used across the app using shadn UI -- `makerkit`: Components specific to MakerKit +- `Shadcn UI`: A set of UI components that can be used across the app using shadcn UI +- `Makerkit-specific`: Components specific to MakerKit ## Installing a Shadcn UI component -To install a Shadcn UI component, you can use the following command in the root of the repository: - -```bash -npx shadcn@latest add -c packages/ui -``` - -For example, to install the `Button` component, you can use the following command: - -```bash -npx shadcn-ui@latest add button -c packages/ui -``` \ No newline at end of file + Please refer to the [documentation](https://makerkit.dev/docs/next-supabase-turbo/components/shadcn). \ No newline at end of file