Developer documentation for the OnArrival flight booking integration platform.
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- Content: Markdoc + Markdown
- CMS: TinaCMS (local mode)
- Icons: Lucide React
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/OnArrival/onarrival-docs.git
cd onarrival-docs
# Install dependencies
npm installOption 1: Site only
npm run devOption 2: Site + CMS (recommended)
npm run dev:tinaOpen http://localhost:3000 to view the site.
When running with npm run dev:tina, access the CMS at:
http://localhost:3000/admin/index.html
The CMS allows visual editing of all documentation content.
├── content/docs/ # Markdown documentation files
│ ├── introduction/ # Getting started guides
│ ├── integration/ # Integration guides (auth, payments, etc.)
│ ├── samples/ # Code samples (Flutter, React Native, etc.)
│ └── support/ # FAQs and support docs
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── admin/ # TinaCMS admin interface
│ │ ├── api/ # API routes (TinaCMS GraphQL)
│ │ └── docs/ # Documentation pages
│ ├── components/ # React components
│ │ ├── DocsLayout.tsx # Main documentation layout
│ │ ├── CodeBlock.tsx # Syntax-highlighted code blocks
│ │ ├── Callout.tsx # Info/warning callouts
│ │ └── ...
│ ├── lib/ # Utilities
│ └── markdoc/ # Markdoc configuration
├── tina/ # TinaCMS configuration
│ └── config.ts # Content schema
└── public/ # Static assets
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run dev:tina |
Start dev server with TinaCMS |
npm run build |
Build for production |
npm run build:tina |
Build with TinaCMS |
npm run start |
Start production server |
npm run lint |
Run ESLint |
- Run
npm run dev:tina - Open http://localhost:3000/admin/index.html
- Navigate to Documentation
- Create or edit pages visually
- Create a
.mdfile incontent/docs/[category]/ - Add frontmatter:
---
title: "Page Title"
description: "Brief description"
category: "integration"
order: 1
---- Write content in Markdown
Use these Markdoc tags in your markdown:
Callout:
{% callout type="tip" title="Pro Tip" %}
Your tip content here.
{% /callout %}Types: note, tip, warning, danger, info
Code Block:
```javascript
const example = "code";
```- Search — Press
Cmd+K(orCtrl+K) to search - Dark theme — Optimized for developer readability
- Table of Contents — Auto-generated from headings
- Previous/Next — Navigation between pages
- Mobile responsive — Works on all devices
- Copy code — One-click code copying
npm install -g vercel
vercelnpm run build
# Output in .next/ directoryFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]For TinaCMS cloud mode (optional):
NEXT_PUBLIC_TINA_CLIENT_ID=your-client-id
TINA_TOKEN=your-token
TINA_BRANCH=mainLocal mode requires no environment variables.
- Create a feature branch
- Make changes
- Run
npm run lintto check for issues - Submit a pull request
Proprietary - OnArrival