Unified documentation site for all Opsfolio products and services
Main Site: https://docs.opsfolio.com
- Spry: docs.opsfolio.com/spry
- Surveilr: docs.opsfolio.com/surveilr
- QualityFolio: docs.opsfolio.com/qualityfolio
- EAA: docs.opsfolio.com/eaa
This is a unified documentation site covering all Opsfolio products. It's built with Next.js, Fumadocs, and Tailwind CSS.
| Product | Description | Docs Path |
|---|---|---|
| Spry | Operations management & workflow automation | /spry |
| Surveilr | Surveillance & monitoring platform | /surveilr |
| QualityFolio | Quality assurance & testing | /qualityfolio |
| EAA | Enterprise Asset Assessment | /eaa |
- π Comprehensive Documentation - Well-organized documentation with multiple sections
- π€ AI-Powered Search - Ask AI questions powered by Groq
- π¬ User Feedback System - Collect feedback with JSON storage
- π¨ Modern UI - Beautiful, responsive design with dark mode
- π± Mobile Friendly - Fully responsive layout
- β‘ Fast Performance - Built with Next.js 16 and Turbopack
- π Full-Text Search - Integrated search across all docs
- π§ GitHub Integration - Shows last edit time for each page
- π― Professional Branding - Consistent logo and favicon
| Technology | Purpose | Version |
|---|---|---|
| Next.js | React framework | 16.0.1 |
| Fumadocs | Documentation framework | 16.2.4 |
| Tailwind CSS | Styling | 4.1.16 |
| TypeScript | Type safety | 5.9.3 |
| Groq | AI provider | Latest |
| AI SDK | AI integration | 5.0.104 |
| Lucide React | Icons | 0.552.0 |
| Zod | Validation | 4.1.13 |
docs.opsfolio.com/
βββ content/
β βββ docs/ # π All documentation
β βββ meta.json # Root navigation
β βββ index.mdx # Home page
β βββ getting-started.mdx # Global getting started
β βββ spry/ # Spry product docs
β β βββ meta.json
β β βββ index.mdx
β β βββ getting-started/
β β βββ core-concepts/
β β βββ reference-guides/
β β βββ advanced/
β βββ surveilr/ # Surveilr product docs
β βββ qualityfolio/ # QualityFolio product docs
β βββ eaa/ # EAA product docs
βββ src/
β βββ app/
β β βββ api/
β β β βββ chat/ # π€ AI chat endpoint
β β β βββ feedback/ # π Feedback API
β β β βββ search/ # π Search endpoint
β β βββ (docs)/ # Dynamic docs pages
β β βββ (home)/ # Home/landing page
β β βββ layout.tsx
β β βββ global.css
β β βββ mdx-components.tsx
β βββ components/
β β βββ feedback.tsx
β β βββ search.tsx
β β βββ navbar.tsx
β β βββ ui/
β βββ lib/
β β βββ source.ts # Fumadocs config
β β βββ layout.shared.tsx
β β βββ db.ts
β β βββ feedback.ts
β βββ mdx-components.tsx
βββ db/
β βββ feedback.json # Auto-created
βββ public/
β βββ favicon.ico
β βββ logo.png
β βββ logo.svg
β βββ robots.txt
βββ .env.sample # Environment template
βββ source.config.ts # MDX configuration
βββ next.config.mjs
βββ tailwind.config.ts
βββ package.json
βββ README.md
Key Directories:
content/docs/= All documentation contentsrc/app/= Next.js pages and layoutssrc/components/= React componentssrc/lib/= Utility functions and configspublic/= Static files (images, icons)
- Node.js 18 or higher
- npm 10 or higher
- Git
- Groq API Key (Get free key)
- Clone the repository
git clone https://github.com/opsfolio/docs.opsfolio.com.git
cd docs.opsfolio.com- Install dependencies
npm install- Set up environment variables
cp .env.sample .env.local- Add your API key to
.env.local:
# Required: Get free key at https://console.groq.com/keys
GROQ_API_KEY=gsk_your_actual_key_here
# Optional: GitHub integration
GITHUB_TOKEN=ghp_your_token_here
NEXT_PUBLIC_GITHUB_OWNER=opsfolio
NEXT_PUBLIC_GITHUB_REPO=docs.opsfolio.com
NEXT_PUBLIC_GITHUB_DOCS_PATH=content/docs- Start development server
npm run dev-
Open in browser
Navigate to http://localhost:3000
| Variable | Description | Get Value |
|---|---|---|
GROQ_API_KEY |
Groq AI API key for search | console.groq.com/keys |
| Variable | Description | Default |
|---|---|---|
GITHUB_TOKEN |
GitHub token for last edit time | (not set) |
NEXT_PUBLIC_GITHUB_OWNER |
GitHub repository owner | opsfolio |
NEXT_PUBLIC_GITHUB_REPO |
GitHub repository name | docs.opsfolio.com |
NEXT_PUBLIC_GITHUB_DOCS_PATH |
Path to docs in repo | content/docs |
- Create a new
.mdxfile incontent/docs/subdirectory
touch content/docs/spry/section/new-page.mdx- Add frontmatter:
---
title: "Your Page Title"
description: "Brief description for SEO"
icon: "FileText"
---
# Your Content Here
Content using MDX syntax...- Update
meta.jsonto include your page in navigation:
{
"title": "Section Name",
"pages": ["existing-page", "new-page"]
}- Preview changes:
npm run devEach product follows this structure:
product-name/
βββ meta.json # Navigation config
βββ index.mdx # Product overview
βββ getting-started/ # Getting started guides
βββ core-concepts/ # Fundamental concepts
βββ reference-guides/ # API/CLI references
βββ advanced/ # Advanced topics
- Clear & Concise: Use simple language
- Action-Oriented: Start with verbs
- Code Examples: Include working snippets
- Consistent Terminology: Use same terms across products
- Visual Aids: Add diagrams/screenshots where helpful
Users can access AI search by:
- Clicking the Ask AI button (bottom-right)
- Using keyboard shortcut:
Cmd+/(Mac) orCtrl+/(Windows/Linux)
Capabilities:
- Natural language questions
- AI-powered answers with relevant links
- Retry/regenerate responses
- Full conversation history
- Powered by Groq (Llama 3.3 70B)
Users can provide feedback on pages:
- Thumbs Up - Mark page as helpful
- Thumbs Down - Mark page as unhelpful
- Optional Message - Add detailed feedback
- Automatic Metadata - Captures user agent, timezone, platform
Storage: Saved to db/feedback.json (auto-created)
Built-in full-text search:
- Fast and responsive
- Shows relevant results
- Easy navigation
Configure in src/lib/layout.shared.tsx:
- Logo:
public/logo.png - Title: "Opsfolio Documentation"
- Navigation options
- Tailwind CSS 4: Main styling framework
- PostCSS: Advanced styling
- Dark Mode: Built-in support
Stored in db/feedback.json:
[
{
"id": 1,
"url": "/spry/getting-started",
"opinion": "good",
"message": "Very helpful!",
"session_id": "1701520800000-abc123",
"metadata": "{\"userAgent\":\"...\"}",
"created_at": "2024-12-02T10:00:00Z"
}
]Save user feedback
Request:
{
"type": "good" | "bad",
"page": "/docs/page-path",
"timestamp": "2024-12-02T10:00:00Z"
}Response: { "success": true }
AI-powered documentation Q&A
- Uses Groq API (Llama 3.3 70B)
- Context-aware responses
- Error handling
Full-text search
- Query parameter:
q - Returns relevant pages
# Development
npm run dev # Start dev server (:3000)
npm run build # Build for production
npm start # Start production server
# Code Quality
npm run lint # Run ESLint
npm run types:check # TypeScript validation- Push code to GitHub
- Import at Vercel Dashboard
- Add environment variables:
GROQ_API_KEYGITHUB_TOKEN(optional)
- Deploy
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]npm run build
# Deploy .next/, db/, public/, package.json
npm install --prod
npm start| Issue | Solution |
|---|---|
| AI Search not working | Verify GROQ_API_KEY in .env.local |
| Feedback not saving | Check db/ permissions |
| GitHub last edit missing | Add GITHUB_TOKEN to .env.local |
| Build fails | Run rm -rf .next && npm install |
| TypeScript errors | Run npm run types:check |
We welcome contributions!
- Fork the repository
- Create feature branch (
git checkout -b docs/feature) - Make changes
- Test locally (
npm run dev) - Commit with clear messages
- Push and create Pull Request
- Follow existing structure
- Use consistent terminology
- Include code examples
- Test all links
- Update
meta.jsonfiles
- π Issues: GitHub Issues
- Built with Fumadocs
- Powered by Next.js
- Styled with Tailwind CSS
- AI by Groq
For detailed guidelines, see:
- GETTING-STARTED.md - Comprehensive getting started guide