A production-ready starter template for building community portals with Microsoft Dataverse integration. Copy this project and have your own portal running in 30-45 minutes!
- HOW-TO-GUIDE.md - Complete setup instructions
- ENTITY_CONFIGURATION.md - Configure dynamic entities
- ICON_REFERENCE.md - Available menu icons
- CHAT_MODE_INSTRUCTIONS.md - AI assistant guide
- DYNAMIC_ENTITY_CONFIG.md - Technical architecture
- SERVER_SIDE_SECURITY.md - Security implementation
- PROJECT_STATUS.md - Current system status and features
MIT License - see LICENSE file for details.
- Issues: GitHub Issues for bugs and feature requests
- Discussions: GitHub Discussions for community help
- Setup Help: Review HOW-TO-GUIDE.md for complete setup
- Entity Config: See ENTITY_CONFIGURATION.md for adding entities
- AI Development: Use CHAT_MODE_INSTRUCTIONS.md with AI assistantsStart
π Complete Setup Guide - HOW-TO-GUIDE.md π
The comprehensive guide walks you through every step from start to finish.
- Modern React App hosted on Netlify (free tier)
- Secure Authentication via Clerk.dev (work + personal accounts)
- Microsoft Dataverse Integration for contact management
- Production-Ready Security with rate limiting, input validation, CORS
- Easy Customization - Add your own tables, fields, and business logic
- AI-Friendly Architecture - Clean patterns for AI-assisted development
- Microsoft 365 admin access (for Azure App Registration)
- Power Platform environment (Dataverse access)
- GitHub account
- Netlify account (free tier)
- Clerk account (authentication service)
- HOW-TO-GUIDE.md - Complete step-by-step instructions
- Fork this repository
- Set up Azure App Registration (Service Principal)
- Create Dataverse Application User
- Configure Clerk authentication
- Deploy to Netlify with environment variables
- Test your portal
β±οΈ Setup Time: 30-45 minutes
- Frontend: React 18 + Vite + Tailwind CSS
- Authentication: Clerk.dev (supports Microsoft Entra ID, Google, Outlook, etc.)
- Backend: Netlify Functions (serverless)
- Database: Microsoft Dataverse
- Hosting: Netlify (free tier)
CommunityPortal/
βββ src/
β βββ components/
β β βββ ContactChecker.jsx # Auto contact management
β β βββ ContactForm.jsx # Contact data form
β β βββ Sidebar.jsx # Navigation component
β βββ pages/
β β βββ Landing.jsx # Public landing page
β β βββ Welcome.jsx # Post-login welcome
β β βββ MyPage.jsx # User profile/dashboard
β β βββ Success.jsx # Confirmation page
β βββ App.jsx # Main app with routing
β βββ main.jsx # Vite entrypoint with ClerkProvider
β βββ index.css # Tailwind CSS imports
βββ functions/
β βββ auth.js # Service Principal authentication
β βββ contact.js # Contact CRUD operations
βββ HOW-TO-GUIDE.md # Complete setup instructions
βββ CHAT_MODE_INSTRUCTIONS.md # AI assistant guide
βββ netlify.toml # Netlify configuration
βββ package.json # Dependencies and scripts
- Service Principal Authentication - Secure server-to-server Dataverse access
- Input Validation & Sanitization - All user input is validated and sanitized
- Rate Limiting - Prevents API abuse (30 requests/minute per IP)
- CORS Protection - Proper cross-origin request handling
- Environment Variable Security - No secrets in frontend code
- Request Size Limits - Prevents payload overflow attacks
# Clone your fork
git clone https://github.com/yourusername/CommunityPortal.git
cd CommunityPortal
# Install dependencies
npm install
# Set up Netlify CLI (one-time)
npm install -g netlify-cli
netlify login
netlify link
# Start development with real environment variables
netlify dev# Test production build locally
npm run build
npm run preview
# Commit and push to trigger Netlify deployment
git add .
git commit -m "Your changes"
git push origin main- Update
src/components/ContactForm.jsxwith new input fields - Modify
functions/contact.jsto handle new fields in database operations - Ensure your Dataverse Contact entity has the required fields
- Create new function following
functions/contact.jspattern - Create new React components following existing patterns
- Add new routes in
src/App.jsx - Update navigation components
- Uses Tailwind CSS exclusively
- Customize
tailwind.config.jsfor brand colors - All components use consistent utility classes
- Responsive design with mobile-first approach
| Variable | Description | Example |
|---|---|---|
TENANT_ID |
Azure AD tenant ID | 12345678-1234-1234-1234-123456789abc |
CLIENT_ID |
App registration client ID | 87654321-4321-4321-4321-cba987654321 |
CLIENT_SECRET |
App registration secret | ABC123~XYZ789.secretvalue |
DATAVERSE_URL |
Dataverse environment URL | https://yourorg.crm.dynamics.com |
VITE_CLERK_PUBLISHABLE_KEY |
Clerk frontend key | pk_live_Y29tbXVuaXR5cG9ydGFs... |
CLERK_SECRET_KEY |
Clerk backend key | sk_live_abcdef123456... |
Authentication Issues:
- Verify all environment variables are set correctly in Netlify
- Check Azure App Registration permissions include "Dynamics CRM β user_impersonation"
- Ensure Application User exists in Dataverse with proper security roles
Build/Deploy Issues:
- Confirm build command is
npm run buildand publish directory isdist - Check Netlify function logs for specific error messages
- Redeploy after adding environment variables
Local Development Issues:
- Use
netlify devinstead ofnpm run devfor full functionality - Ensure you're linked to the correct Netlify site with
netlify link - Verify Netlify CLI is authenticated with
netlify status
For detailed troubleshooting: See HOW-TO-GUIDE.md
- Complete Documentation - Step-by-step setup guide
- Production Ready - Security, error handling, rate limiting included
- Free Tier Compatible - Works on free service tiers
- Modern Architecture - Current best practices
- AI-Friendly - Clean patterns for AI-assisted development
- Microsoft Admin Access Required - Need organizational Azure/O365 admin rights
- Multiple Service Setup - 4-5 platforms to configure
- Learning Curve - Moderate technical complexity
Difficulty Level: MODERATE (30-45 minutes for technical users)
This project is optimized for AI-assisted development:
- Reference
CHAT_MODE_INSTRUCTIONS.mdfor AI context - Follow established patterns when adding features
- Use semantic search for finding relevant code examples
- Extend using the documented patterns and conventions
"Add a new Case table following the Contact pattern"
"Create a search component using existing styling"
"Add phone validation to ContactForm"
After setup, your Community Portal provides:
- β Secure authentication for work and personal accounts
- β Automatic contact management with Dataverse
- β Production-ready security and error handling
- β Scalable architecture for additional features
- β Cost-effective deployment on free tiers
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow existing code patterns and conventions
- Test thoroughly with
netlify dev - Update documentation if needed
- Submit a Pull Request
MIT License - see LICENSE file for details.
- Issues: GitHub Issues for bugs and feature requests
- Discussions: GitHub Discussions for community help
- Documentation: Review HOW-TO-GUIDE.md for setup help
- AI Development: Use CHAT_MODE_INSTRUCTIONS.md with AI assistants
π Ready to build your community portal? Start with HOW-TO-GUIDE.md