![Markprompt – Enterprise-grade ChatGPT for your website and docs](https://private-user-images.githubusercontent.com/504893/239653948-9df7ac5a-1ac3-4b33-9bb3-a146d119ed73.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0Mjg4NTgsIm5iZiI6MTcyMTQyODU1OCwicGF0aCI6Ii81MDQ4OTMvMjM5NjUzOTQ4LTlkZjdhYzVhLTFhYzMtNGIzMy05YmIzLWExNDZkMTE5ZWQ3My5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcxOVQyMjM1NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01OGVjMGJiMDk5NjIxNDUyZTEyZmQzYzgzZmRhYjk4OWI1YTlhNmE3MDc2YzliODdjMDliZmMzOTUzMTJkZDc5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.1HBE_3ebwuwhkSXSyLvkqQfPT12xc7Ud-zVd-fBUKRo)
Markprompt is a platform for building GPT-powered prompts. It takes Markdown, Markdoc, MDX, HTML and plain text files (from a GitHub repo, website, file uploads or API requests), and creates embeddings that you can use to create a prompt, for instance using the companion Markprompt React or Web 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
- 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), and Fathom (analytics).
Markprompt comes with React and Web components that make it easy to build a prompt interface on top of 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 docs to get started, or explore the source code.
Also, try 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).