MarkAPI is a self-hosted Markdown API documentation browser for teams that already maintain API docs in Markdown.
Upload a complete .md file and publish it as a versioned, searchable, read-only documentation page with a stable share link. MarkAPI is intentionally small: it focuses on internal API documentation browsing instead of trying to become a full developer portal or team workspace.
Open the read-only sample documentation:
The demo uses sample data and does not provide admin access.
- Self-hosted deployment with data stored in your own SQLite database
- Simple single-admin-password management UI for small teams
- Multiple documentation projects with versioned Markdown uploads
- Read-only public documentation through unguessable share links
- Optional public access to version history
- Documentation pages with a table of contents, in-page search, and version switching
- GitHub Flavored Markdown support, including tables, task lists, and code blocks
- API-documentation enhancements for endpoint paths, field names, and JSON code block copying
- Chinese and English UI with light, dark, and system themes
- Docker Compose quick start
- Internal API documentation
- Stable read-only documentation links for frontend, QA, customer success, or trusted collaborators
- Keeping historical versions of Markdown API documents
- Lightweight documentation sites deployed on private servers or internal networks
- Documentation platforms that need multi-user accounts, roles, or fine-grained permissions
- Public SaaS-style documentation workspaces with registration and team collaboration
- Projects that need OpenAPI-driven SDK generation or a full developer portal
- Knowledge base, blog, or CMS use cases
cp .env.example .envEdit .env and set at least:
ADMIN_PASSWORD=replace-with-admin-password
SESSION_SECRET=replace-with-long-random-secret
ALLOW_HTTP_ADMIN_LOGIN=1You can generate a SESSION_SECRET with:
openssl rand -hex 32ALLOW_HTTP_ADMIN_LOGIN=1 is suitable for local or temporary HTTP usage. Change it to ALLOW_HTTP_ADMIN_LOGIN=0 after deploying behind HTTPS.
DATABASE_URL already points to a local SQLite file by default and usually does not need to be changed.
Then start the service:
docker compose up -dThe default service URL is:
http://localhost:3000
Open the admin UI, create a project, upload a Markdown document, and copy the share link.
Docker Compose stores data in the markapi-data volume. Back up the SQLite database regularly before using it for real work.
MarkAPI renders Markdown directly and does not require a proprietary document format.
- Supports GitHub Flavored Markdown, including tables, task lists, and code blocks
- Uses second- and third-level headings to build the table of contents
- Renders
jsoncode blocks with an API-documentation-friendly layout - Recognizes lines like
GET /api/usersas endpoint rows - Adds copy actions for common field names, paths, and enum-like values in tables
| Variable | Required | Description |
|---|---|---|
ADMIN_PASSWORD |
Yes | Password for the admin UI |
SESSION_SECRET |
Yes | Secret used to sign admin sessions. Use a long random value in production |
DATABASE_URL |
No | SQLite database URL. Defaults to file:./data/markapi.db |
ALLOW_HTTP_ADMIN_LOGIN |
No | Allows admin login over HTTP in production-like deployments |
Default .env.example:
ADMIN_PASSWORD=replace-with-admin-password
SESSION_SECRET=replace-with-long-random-secret
DATABASE_URL=file:./data/markapi.db
ALLOW_HTTP_ADMIN_LOGIN=1You usually do not need to change DATABASE_URL. The default value stores the SQLite database under the project data/ directory. If you customize a relative SQLite path, keep it under data/, for example file:./data/markapi.db or file:markapi.db.
MarkAPI currently uses a single-admin-password model. It is intended for small teams and internal deployments.
Public documentation is available through unguessable shareToken links. This is not a login-based authorization system: anyone with the link can access the corresponding document.
If you publish a public demo, use sample data only and link directly to a read-only documentation page. Do not expose admin access as a public trial environment.
For production, use HTTPS and set:
ALLOW_HTTP_ADMIN_LOGIN=0If you must access the admin UI over HTTP, set:
ALLOW_HTTP_ADMIN_LOGIN=1This allows the admin session cookie to be sent without HTTPS. Login credentials will travel over a plaintext connection, so only use it on trusted internal networks or temporary environments.
npm install
npm run devCommon checks:
npm run lint
npm run buildThis project uses npm scripts. pnpm and yarn workflows are not required.
- Next.js App Router
- React
- TypeScript
- SQLite
MarkAPI is an early-stage project. The goal is to stay lightweight, self-hostable, and easy to maintain. The current focus is internal API documentation browsing, not complex permissions, team workspaces, or plugin systems.
Issues and pull requests are welcome. Before submitting changes, run at least:
npm run lint
npm run buildKeep each pull request focused on one clear topic and avoid mixing unrelated refactors into feature or bug-fix changes.
