README
A comprehensive knowledge hub for Microsoft D365, Power Platform, and OpenAI integration. Built with Next.js 15, featuring advanced search capabilities, interactive tools, and expert content.
π Features
- **Comprehensive Content Library**: Expert guides, tutorials, and best practices for D365, Power Platform, and OpenAI
- **Advanced Search**: Full-text search with tag filtering and suggestions powered by MiniSearch
- **Interactive Tools**:
- D365 Replenishment Playground for inventory management simulation
- Power Platform Decision Workbench for solution mapping
- OpenAI Prompt Lab for D365-specific prompt engineering
- **Modern UI**: Clean, responsive design with dark mode support
- **SEO Optimized**: Complete SEO setup with structured data, sitemaps, and social media integration
- **Keyboard Navigation**: Gmail-style keyboard shortcuts for power users
π οΈ Tech Stack
- **Framework**: Next.js 15 with App Router
- **Styling**: Tailwind CSS v4 + shadcn/ui components
- **Content**: MDX with frontmatter for rich content authoring
- **Search**: MiniSearch for client-side full-text search
- **Typography**: Geist Sans & Mono fonts
- **Analytics**: Google Analytics & Tag Manager support
- **Deployment**: Vercel with optimized build configuration
π¦ Installation
1. **Clone the repository** \`\`\`bash git clone <https://github.com/MikFoss/Fossome_Site> cd d365-knowledge-hub \`\`\`
2. **Install dependencies** \`\`\`bash npm install \`\`\`
3. **Set up environment variables** \`\`\`bash cp .env.example .env.local \`\`\`
Configure the following variables: \`\`\`env NEXT_PUBLIC_SITE_URL=<https://www.fossome.net/> NEXT_PUBLIC_GTM_ID=GTM-XXXXXXX (optional) NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX (optional) \`\`\`
4. **Build the search index** \`\`\`bash npm run build:search \`\`\`
5. **Start development server** \`\`\`bash npm run dev \`\`\`
π Deployment
Vercel (Recommended)
1. **Connect your repository** to Vercel 2. **Set environment variables** in Vercel dashboard 3. **Deploy** - Vercel will automatically build and deploy
The `vercel.json` configuration includes:
- Automatic search index building
- Security headers
- Caching optimization
- Function timeout configuration
Manual Deployment
1. **Build the application** \`\`\`bash npm run build \`\`\`
2. **Start production server** \`\`\`bash npm start \`\`\`
π Content Management
Adding Articles
1. Create MDX files in the `content/` directory: \`\`\` content/ βββ d365/ βββ power-platform/ βββ openai/ \`\`\`
2. Use the frontmatter schema: \`\`\`yaml ---
title: "Your Article Title" summary: "Brief description" category: "d365" | "power-platform" | "openai" tags: ["tag1", "tag2"] publishedTime: "2024-01-01" modifiedTime: "2024-01-02" authors: ["Author Name"] readingTime: "5 min read" ---
\`\`\`
3. Rebuild the search index: \`\`\`bash npm run build:search \`\`\`
Content Components
Available MDX components:
- `<Callout type="info|warning|error">` - Highlighted content blocks
- `<Toc />` - Automatic table of contents generation
π Search System
The search system uses MiniSearch for client-side full-text search:
- **Build-time indexing**: Content is indexed during build
- **Fuzzy matching**: Handles typos and partial matches
- **Tag filtering**: Filter results by content tags
- **Suggestions**: Auto-complete and search suggestions
- **Keyboard shortcuts**: `/` to open search, `Esc` to close
β¨οΈ Keyboard Shortcuts
- `/` - Open search modal
- `Esc` - Close modals
- `g + h` - Go to home
- `g + d` - Go to D365 hub
- `g + p` - Go to Power Platform hub
- `g + o` - Go to OpenAI hub
- `g + s` - Go to patterns hub
π¨ Customization
Theming
The application uses Tailwind CSS with shadcn/ui components. Customize:
1. **Colors**: Update `app/globals.css` CSS variables 2. **Components**: Modify components in `components/ui/` 3. **Layout**: Adjust layout components in `components/`
Navigation
Update navigation structure in:
- `components/Header.tsx` - Main navigation
- `components/MobileNav.tsx` - Mobile navigation
- `data/nav.json` - Navigation data (if using dynamic nav)
π Analytics
The application supports:
- **Google Analytics 4**: Set `NEXT_PUBLIC_GA_ID`
- **Google Tag Manager**: Set `NEXT_PUBLIC_GTM_ID`
Analytics are loaded asynchronously and respect user privacy preferences.
π§ Development
Project Structure
\`\`\` βββ app/ # Next.js app directory β βββ [category]/ # Dynamic category pages β βββ api/ # API routes β βββ globals.css # Global styles βββ components/ # React components β βββ ui/ # shadcn/ui components β βββ ... # Custom components βββ content/ # MDX content files βββ data/ # Static data files βββ lib/ # Utility functions βββ public/ # Static assets βββ scripts/ # Build scripts \`\`\`
Available Scripts
- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run build:search` - Build search index
- `npm run start` - Start production server
- `npm run lint` - Run ESLint
π€ Contributing
1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Add/update tests if needed 5. Submit a pull request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
For support and questions:
- Create an issue in the repository
- Check the documentation
- Review existing discussions
Built with β€οΈ using Next.js and modern web technologies.