A comprehensive Keycloak-based authentication system developed using BMAD-METHOD and Claude Task Master - demonstrating the power of AI-driven development workflows.
This project showcases how to combine two powerful AI development tools:
- BMAD-METHOD: Breakthrough Method for Agile AI-Driven Development
- Claude Task Master: Task management system for AI-driven development
- Multi-Provider OAuth: Google, GitHub, and Microsoft authentication
- JWT Token Management: Secure API authentication
- User Profile Management: Custom attributes and avatar support
- Role-Based Access Control: Admin, User, and Guest roles
- Docker Deployment: Easy containerized setup
- Export/Import: Realm configuration management
- Comprehensive Testing: Unit, integration, and E2E tests
- Analyst (
/analyst
): Project planning and requirements analysis - Product Manager (
/pm
): PRD creation and product strategy - Architect (
/architect
): Technical architecture design - Scrum Master (
/sm
): Development story creation - Developer (
/dev
): Code implementation with full context - QA (
/qa
): Quality assurance and testing
- Task Management: Parse PRDs and generate actionable tasks
- Progress Tracking: Manage task lifecycle and dependencies
- Research Integration: Fresh information gathering
- MCP Integration: Seamless Cursor IDE integration
- Integration Guide: How to use both tools together
- Medium Article: Comprehensive article about the integration
- Practical Examples: Real-world usage examples
- PRD: Complete Product Requirements Document
- Docker installed
- Node.js v20+
- Cursor IDE (or VS Code/Windsurf)
- API keys for OAuth providers
git clone <your-repo>
cd keycloak-config
npm install
# BMAD-METHOD is already configured
# Available agents: /analyst, /pm, /architect, /sm, /dev, /qa
Update .cursor/mcp.json
with your API keys:
{
"mcpServers": {
"task-master-ai": {
"command": "npx",
"args": ["-y", "--package=task-master-ai", "task-master-ai"],
"env": {
"ANTHROPIC_API_KEY": "your-key-here",
"PERPLEXITY_API_KEY": "your-key-here"
}
}
}
}
In Cursor AI chat:
Initialize taskmaster-ai in my project
npm run keycloak:start
Open admin console: http://localhost:8099/admin
- Analyst Brief:
/analyst
- Create comprehensive project brief - PRD Creation:
/pm
- Develop detailed Product Requirements Document - Architecture Design:
/architect
- Design technical architecture
- Parse PRD: Convert requirements into actionable tasks
- Generate Tasks: Create detailed, implementable development stories
- Track Progress: Manage task lifecycle and dependencies
- Story Creation:
/sm
- Create detailed development stories - Implementation:
/dev
- Implement features with full context - Quality Assurance:
/qa
- Ensure quality and testing
# Run Keycloak locally
docker run --name keycloak -p 8099:8080 \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
quay.io/keycloak/keycloak:26.3.2 \
start-dev
- Create OAuth client in Google Cloud Console
- Add OpenID Connect provider in Keycloak
- Configure attribute mapping
- Create OAuth app in GitHub
- Add GitHub provider in Keycloak
- Set up username and email mapping
- Register app in Azure
- Add OpenID Connect provider in Keycloak
- Configure user attribute mapping
const checkJwt = jwt({
secret: jwksRsa.expressJwtSecret({
jwksUri: 'http://localhost:8099/realms/myrealm/protocol/openid-connect/certs',
cache: true,
rateLimit: true,
jwksRequestsPerMinute: 5,
}),
audience: 'node-api-client',
issuer: 'http://localhost:8099/realms/myrealm',
algorithms: ['RS256'],
});
npm test
npm run test:integration
npm run test:e2e
keycloak-config/
βββ .bmad-core/ # BMAD-METHOD framework
βββ .claude-task-master/ # Task Master framework
βββ .cursor/ # Cursor configuration
β βββ mcp.json # MCP server configuration
βββ .taskmaster/ # Task Master project files
β βββ docs/
β βββ prd.txt # Product Requirements Document
βββ exports/ # Keycloak realm exports
βββ data/ # Keycloak data
βββ mock_service/ # Mock API service
βββ package.json # Project dependencies
βββ README.md # This file
βββ BMAD_TASKMASTER_INTEGRATION.md
βββ MEDIUM_ARTICLE.md
βββ PRACTICAL_EXAMPLES.md
- Anthropic API Key: For Claude models
- Perplexity API Key: For research capabilities
- Google OAuth: For Google login
- GitHub OAuth: For GitHub login
- Microsoft OAuth: For Microsoft login
# OAuth Provider Credentials
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret
MICROSOFT_CLIENT_ID=your-microsoft-client-id
MICROSOFT_CLIENT_SECRET=your-microsoft-client-secret
docker-compose up -d
kubectl apply -f k8s/
- Use environment-specific configurations
- Implement proper secret management
- Set up monitoring and logging
- Configure backup procedures
- Login Response Time: < 2 seconds
- API Response Time: < 500ms
- Token Validation: < 100ms
- System Uptime: > 99.9%
- HTTPS Enforcement: All communications encrypted
- JWT Token Security: Secure token generation and validation
- OAuth Security: Best practices implementation
- Account Lockout: Protection against brute force attacks
- Session Management: Secure session handling
- Fork the repository
- Create a feature branch
- Use BMAD-METHOD for planning and development
- Use Claude Task Master for task management
- Submit a pull request
MIT License - see LICENSE for details.
- BMAD-METHOD for the comprehensive AI development framework
- Claude Task Master for intelligent task management
- Keycloak for the robust authentication platform
- BMAD-METHOD: Discord Community
- Claude Task Master: Discord Community
- Keycloak: Community Forum
This project demonstrates the power of combining AI-driven development tools for creating robust, scalable authentication systems. The integration of BMAD-METHOD and Claude Task Master provides a comprehensive development experience that accelerates project delivery while maintaining high quality standards.