![Markprompt โ Open-source GPT-4 platform for Markdown, Markdoc and MDX with built-in analytics](https://user-images.githubusercontent.com/504893/227404383-62737a47-72ab-4426-b7b3-83db5b836ebb.png)
Markprompt is a platform for building GPT-powered prompts. It scans Markdown, Markdoc and MDX files in your GitHub repo and creates embeddings that you can use to create a prompt, for instance using the companion Markprompt React component. Markprompt also offers analytics, so you can gain insights on how visitors interact with your docs.
To use the Markprompt platform as is, please refer to the Markprompt documentation.
Markprompt is built on top of the following stack:
- Next.js - framework
- Vercel - hosting
- Typescript - language
- Tailwind - CSS
- Upstash - Redis and rate limiting
- Supabase - database and auth
- Stripe - payments
- Plain - support chat
- Fathom - analytics
Supabase is used for storage and auth, and if self-hosting, you will need to set it up on the Supabase admin console.
The schema is defined in schema.sql. Create a Supabase database and paste the content of this file into the SQL editor. Then run the Typescript types generation script using:
npx supabase gen types typescript --project-id <supabase-project-id> --schema public > types/supabase.ts
where <supabase-project-id>
is the id of your Supabase project.
Authentication is handled by Supabase Auth. Follow the Login with GitHub and Login with Google guides to set it up.
A sample file containing required environment variables can be found in example.env. In addition to the keys for the above services, you will need keys for Upstash (rate limiting and key-value storage), Plain.com (support chat), and Fathom (analytics).
Markprompt React is a headless React component for building a prompt interface, based on the Markprompt API. With a single line of code, you can provide a prompt interface to your React application. Follow the steps in the Markprompt React README to get started using it.
Also, check out the Markprompt starter template for a fully working Next.js + Tailwind project.
Currently, the Markprompt API has basic protection against misuse when making requests from public websites, such as rate limiting, IP blacklisting, allowed origins, and prompt moderation. These are not strong guarantees against misuse though, and it is always safer to expose an API like Markprompt's to authenticated users, and/or in non-public systems using private access tokens. We do plan to offer more extensive tooling on that front (hard limits, spike protection, notifications, query analysis, flagging).
OpenAI keeps training data for 30 days. Read more: OpenAI API data usage policies.
Markprompt keeps the data as long as you need to query it. If you remove a file or delete a project, all associated data will be deleted immediately.
Created by the team behind Motif (@motifland).
MIT