A high-performance Jamstack documentation platform built with Next.js, TypeScript, and Tailwind CSS. This solution addresses the coding challenge requirements with multi-brand support, OpenAPI specification display, interactive tutorials, and a comprehensive blog section.
✅ Jamstack Site Generator: Built with Next.js 14 (React-based SSG)
✅ Multi-Brand Support: Environment-based build system with different branding
✅ OpenAPI Display: Interactive Swagger UI integration
✅ Tutorial System: Markdown-based tutorials with embedded code samples
✅ Blog Section: Full-featured blog platform
✅ Core Web Vitals: Optimized for PageSpeed Performance score
✅ Tech Stack: React, TypeScript, Next.js, Tailwind CSS
Documentation Platform
├── Multi-Brand System (2 brands: DocuFlow & DevDocs Pro)
├── OpenAPI Integration (Interactive Swagger UI)
├── Tutorial Engine (Markdown + Code Highlighting)
├── Blog Platform (Markdown + Metadata)
└── Performance Optimizations (Static Generation)
- Node.js 18+
- npm or yarn
# Clone and install
git clone <repository>
npm install
# Start development server
npm run dev
# Visit http://localhost:3000
# Build Brand A (DocuFlow - Blue Theme)
npm run build:brand-a
# Build Brand B (DevDocs Pro - Green Theme)
npm run build:brand-b
# Default build (Brand A)
npm run build
- Brand A (DocuFlow): Blue theme with 📘 logo
- Brand B (DevDocs Pro): Green theme with 🚀 logo
- Dynamic color schemes and branding
- Environment variable controlled (
NEXT_PUBLIC_BRAND
)
- Interactive Swagger UI interface
- Enhanced Petstore API specification
- Live API exploration capabilities
- Mobile-responsive design
- Professional documentation presentation
- Featured Tutorial: "Making a Payment with TypeScript"
- Syntax-highlighted code blocks
- Step-by-step instructions
- Difficulty levels and reading time
- Interactive feedback system
- Featured Post: "The Importance of Creating Great Documentation Experiences"
- Markdown rendering with custom styling
- Author attribution and publication dates
- Tag categorization system
{
"framework": "Next.js 14",
"language": "TypeScript",
"styling": "Tailwind CSS",
"content": "React Markdown",
"api-docs": "Swagger UI React",
"highlighting": "Rehype Highlight",
"generation": "Static Site Generation (SSG)"
}
src/
├── components/
│ └── Layout.tsx # Main layout with navigation
├── config/
│ └── brand.ts # Multi-brand configuration
├── pages/
│ ├── index.tsx # Homepage with feature cards
│ ├── api.tsx # OpenAPI documentation page
│ ├── tutorials/
│ │ ├── index.tsx # Tutorial listing
│ │ └── payment-typescript.tsx # Featured tutorial
│ ├── blog/
│ │ ├── index.tsx # Blog listing
│ │ └── great-documentation-experiences.tsx
│ └── _app.tsx # App configuration
├── styles/
│ └── globals.css # Tailwind + performance optimizations
├── next.config.js # Static export configuration
├── tailwind.config.js # Brand theming system
└── package.json # Dependencies and build scripts
## 🌐 Deployment
### Static Site Generation
```bash
# Build static files
npm run build
# Files ready for deployment in 'out' directory
# Deploy to: Vercel, Netlify, GitHub Pages, etc.
# Deploy Brand A
NEXT_PUBLIC_BRAND=brand-a npm run build
# Deploy to brand-a.example.com
# Deploy Brand B
NEXT_PUBLIC_BRAND=brand-b npm run build
# Deploy to brand-b.example.com
// src/config/brand.ts
const brandConfigs = {
"brand-c": {
name: "TechDocs Elite",
logo: "⚡",
colors: {
primary: "bg-purple-600",
secondary: "bg-purple-800",
accent: "bg-amber-500",
},
theme: "purple",
},
};
NEXT_PUBLIC_BRAND=brand-c npm run build
- Create new file in
src/pages/tutorials/[slug].tsx
- Use React Markdown for content rendering
- Include syntax highlighting for code blocks
- Add to tutorial index page
- Create new file in
src/pages/blog/[slug].tsx
- Include frontmatter (title, date, author, tags)
- Use React Markdown with custom styling
- Add to blog index page
- Strict type checking enabled
- Path aliases configured (
@/*
) - Latest ES features supported
- Tailwind CSS utility-first approach
- Custom brand color system
- Responsive design patterns
- Performance-focused selectors
- Semantic HTML structure
- Proper focus management
- ARIA labels where needed
- Keyboard navigation support
# Build and analyze bundle
npm run build
npm run export
# Test with Lighthouse or PageSpeed Insights
# Expected scores: Performance 80+, Accessibility 90+
- Chrome (latest) ✅
- Firefox (latest) ✅
- Safari (latest) ✅
- Edge (latest) ✅
- CMS integration (Contentful, Strapi)
- Search functionality
- User authentication
- Comment system for blog
- Analytics integration
- Multi-language support
- Dark mode toggle
- Database integration for dynamic content
- CDN configuration for global performance
- CI/CD pipeline for automated deployments
- A/B testing for different brand variations
npm run dev # Development server
npm run lint # ESLint checking
npm run build # Production build
npm run start # Preview production build
- TypeScript types defined
- Responsive design implemented
- Accessibility standards met
- Performance optimizations applied
- Multi-brand support maintained
- Cross-browser compatibility verified
This documentation platform successfully demonstrates:
- Modern Jamstack Architecture: Next.js with TypeScript and static generation
- Multi-Brand Flexibility: Easy brand switching via environment variables
- Comprehensive Content Types: API docs, tutorials, and blog posts
- Performance Excellence: Optimized for Core Web Vitals compliance
- Developer Experience: Clean code, proper typing, and maintainable structure
- Production Ready: Static deployment, SEO optimized, accessible
Built with ❤️ using Next.js, TypeScript, and Tailwind CSS