A secure, enterprise-grade collaborative story pointing system built with React, TypeScript, and Firebase. Features multi-tenant architecture, Microsoft SSO integration, JWT authentication, role-based permissions, and secure room management for agile teams to estimate effort, complexity, and uncertainty of tickets through anonymous voting.
- Multi-Authentication Support: Email/password and Microsoft SSO integration
- Multi-Tenant Architecture: Complete data isolation between organizations
- JWT-based Authentication: Secure login with Firebase Authentication
- Role-based Access Control: Granular permissions system with three user roles
- Email Domain Restrictions: Configurable per-tenant email domain validation
- Password Security: bcrypt hashing with configurable password policies
- Email Verification: Optional email verification for self-registered users
- Secure Room Access: Users can only join rooms they've been specifically invited to
- Complete Tenant Isolation: Each organization has isolated data and users
- Tenant Management: Super Admins can create and manage multiple tenants
- Domain-based Authentication: Users authenticate based on their email domain
- Tenant Switching: Super Admins can switch between tenants
- Configurable Authentication: Each tenant can enable/disable auth methods
- Custom Branding: Support for tenant-specific logos and colors
- Resource Limits: Configurable user and room limits per tenant
- Azure AD Integration: Seamless Microsoft account authentication
- Domain-based Routing: Automatic tenant detection from email domain
- Self-Service Registration: Users can sign up via Microsoft SSO
- Tenant-Configurable: Each tenant can enable/disable Microsoft auth
- Secure Token Handling: Firebase manages Microsoft OAuth tokens
- Super Admin: Full system access, user management, tenant management, can join any room
- Room Admin: Create/manage rooms, select participants, configure voting settings
- Estimator: Participate in assigned rooms, cast votes in story pointing sessions
- Multiple Roles: Users can have multiple roles with cumulative permissions
- Invite-only Rooms: Room admins select specific users for each session
- TTL Room Management: Configurable room expiration (30 minutes to 2 hours)
- Admin Voting Control: Room admins can choose whether they participate in voting
- Real-time Synchronization: Live updates across all connected users using Firebase
- Tenant Isolation: Rooms are isolated per tenant
- Automatic Cleanup: Expired rooms are automatically deleted
- Multi-dimensional Voting: Vote on effort, complexity, and uncertainty
- Anonymous Voting: Individual votes remain private until results are revealed
- Configurable Point System: Points calculated from predefined voting combinations
- Session Management: Create multiple tickets per room with complete vote history
- Real-time Collaboration: See voting progress and member activity live
- Fibonacci Consensus: Final points calculated using closest Fibonacci number
- Configurable TTL: Choose room duration from 30 minutes to 2 hours (15-minute intervals)
- Live Countdown: Real-time timer showing remaining time with color coding
- Automatic Expiration: Rooms are automatically deleted when TTL expires
- Expiration Warnings: Visual warnings when room is about to expire
- Multi-user Notifications: All users are notified when room expires
- Live Synchronization: Firebase Firestore provides real-time updates
- Instant Member Updates: See when users join/leave rooms
- Real-time Voting: Live voting progress across all participants
- Automatic UI Updates: Interface updates automatically when data changes
- Connection Status: Firebase connection status indicator
- React 19.1.0: Modern React with latest features
- TypeScript 5.8.3: Full type safety and developer experience
- Vite 5.1.0: Fast build tool and development server
- Tailwind CSS 3.4.17: Utility-first CSS framework
- React Router 7.6.3: Client-side routing
- React Hot Toast: Beautiful toast notifications
- Firebase 11.9.1: Backend-as-a-Service platform
- Firebase Firestore: NoSQL real-time database
- Firebase Authentication: User authentication and management
- Firebase Security Rules: Database-level security and access control
- Firebase Auth: JWT token management
- Microsoft OAuth: Azure AD integration via Firebase
- bcryptjs 3.0.2: Password hashing
- Role-based Permissions: Custom permission system
- Vitest: Unit testing framework
- TypeScript: Static type checking
- ESLint: Code linting
- Autoprefixer: CSS vendor prefixing
- PostCSS: CSS processing
- Vite Build: Optimized production builds
- Firebase Hosting: (Optional) Serverless hosting
- Environment Variables: Configuration management
- Email Entry: User enters email address
- Tenant Detection: System identifies tenant by email domain
- Auth Method Selection: Available auth methods shown based on tenant config
- Authentication: User signs in via email/password or Microsoft SSO
- Role Assignment: User gets appropriate roles within their tenant
- Dashboard Access: Role-based dashboard shows tenant-specific data
- Domain Detection: User email domain mapped to tenant
- Microsoft Popup: Azure AD authentication popup
- Token Exchange: Microsoft token exchanged for Firebase token
- User Creation: New users automatically created with Estimator role
- Tenant Assignment: User assigned to tenant based on email domain
- Room Creation: Room Admins create rooms within their tenant
- User Invitation: Only tenant users can be invited to rooms
- TTL Configuration: Room expiration time set during creation
- Real-time Access: Invited users see room in their dashboard
- Automatic Cleanup: Expired rooms automatically deleted
- Join Room: Invited users join from their personalized dashboard
- Create Tickets: Room Admin creates tickets for estimation
- Multi-dimensional Voting: Team members vote on three dimensions:
- Effort: How much work is required (Small, Medium, Large)
- Complexity: How complex the solution is (Small, Medium, Large)
- Uncertainty: How uncertain the requirements are (Small, Medium, Large)
- Real-time Updates: All participants see live voting progress
- Point Calculation: System calculates points using predefined combination matrix
- Results Reveal: Admin closes voting to show anonymized results and final points
- Automatic Cleanup: Rooms expire based on configured TTL and are automatically cleaned up
The application uses a sophisticated two-stage point calculation system:
Different combinations of effort, complexity, and uncertainty result in different story points for each vote:
- Small + Small + Small = 1 point
- Small + Large + Medium = 5 points
- Large + Large + Large = 21 points
- And many more combinations...
The final story points for a ticket are determined using Fibonacci Consensus:
- Calculate Average: All individual vote points are averaged
- Find Closest Fibonacci: The system finds the closest Fibonacci number to the average
- Set Final Points: This Fibonacci number becomes the final story points
Example: If three team members vote 1, 8, and 13 points:
- Average: (1 + 8 + 13) ÷ 3 = 7.33
- Closest Fibonacci: 8
- Final Story Points: 8
Fibonacci Sequence Used: [0, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
This approach ensures final estimates align with common story pointing practices while providing a mathematically sound consensus method that reduces the impact of outlier votes.
- Node.js (version 18 or higher)
- npm or yarn
- Firebase Project (for authentication and database)
- Microsoft Azure AD (optional, for SSO)
-
Create Firebase Project:
- Go to Firebase Console
- Create a new project
- Enable Firestore Database
- Enable Authentication
-
Configure Authentication:
- Go to Authentication > Sign-in method
- Enable Email/Password provider
- (Optional) Enable Microsoft provider for SSO
-
Get Firebase Configuration:
- Go to Project Settings > General > Your apps
- Add a web app
- Copy the Firebase config object
-
Environment Configuration: Create a
.envfile in your project root:# Firebase Configuration VITE_APP_FIREBASE_API_KEY=your_api_key_here VITE_APP_FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com VITE_APP_FIREBASE_PROJECT_ID=your_project_id VITE_APP_FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com VITE_APP_FIREBASE_MESSAGING_SENDER_ID=your_sender_id VITE_APP_FIREBASE_APP_ID=your_app_id # Optional: Default tenant limits VITE_DEFAULT_MAX_USERS=5 VITE_DEFAULT_MAX_ROOMS=2
-
Firestore Security Rules: The application includes comprehensive security rules in
firestore.rules. Deploy them:firebase deploy --only firestore:rules
-
Azure AD App Registration:
- Go to Azure Portal
- Register a new application
- Configure redirect URIs for Firebase
-
Firebase Microsoft Provider:
- In Firebase Console > Authentication > Sign-in method
- Enable Microsoft provider
- Add your Azure AD client ID and secret
-
Clone the repository:
git clone <repository-url> cd story-pointing
-
Install dependencies:
npm install
-
Set up Firebase configuration (see Firebase Setup above)
-
Initialize the application:
# Create Super Admin and Master Tenant cd scripts npm install node createSuperAdmin.js cd ..
-
Start the development server:
npm run dev
-
Open your browser:
- Navigate to http://localhost:3000
- Login with the Super Admin credentials from step 4
- Super Admin Login: Use credentials from
createSuperAdmin.jsscript - Create Tenants: Go to Tenant Management to create organizations
- Configure Auth Methods: Enable email/password and/or Microsoft SSO per tenant
- Create Users: Use User Management or let users self-register
-
Create Tenant:
- Go to Tenant Management
- Click "Create Tenant"
- Configure name, domains, and authentication methods
- Set user and room limits
-
Manage Authentication:
- Enable/disable email/password authentication
- Enable/disable Microsoft SSO
- Configure password policies
- Set email verification requirements
-
Switch Tenants:
- Use tenant switcher in header
- View and manage different organizations
- Access tenant-specific data
-
Create Users (Admin):
- Go to User Management
- Click "Create User"
- Assign roles and tenant
- User receives invitation to set password
-
Self-Registration:
- Users visit signup page
- Enter email (domain determines tenant)
- Choose authentication method
- Complete registration process
-
Create Room:
- Click "Create Room" on dashboard
- Set room name and TTL duration
- Select participants from tenant users
- Configure admin voting participation
-
Join Room:
- Invited users see room on dashboard
- Click to join active rooms
- Real-time updates show other participants
-
Story Pointing:
- Create tickets for estimation
- Vote on effort, complexity, uncertainty
- View real-time voting progress
- Reveal results and final points
- Live Updates: All changes sync instantly across users
- Member Activity: See when users join/leave
- Voting Progress: Real-time voting status
- Room Expiration: Live countdown timers
- Connection Status: Firebase connection indicator
Point calculation system is configurable in src/config/votingConfig.ts:
export const VOTING_COMBINATIONS = [
{ effort: 'small', complexity: 'small', uncertainty: 'small', points: 1 },
{ effort: 'small', complexity: 'large', uncertainty: 'medium', points: 5 },
// ... more combinations
];Role-based permissions are defined in src/config/rolePermissions.ts:
export const ROLE_PERMISSIONS = {
'Super Admin': ['*'], // All permissions
'Room Admin': ['Room.Create', 'Room.Update', 'Room.Delete'],
'Estimator': ['Vote.Create', 'Vote.Update']
};Each tenant can configure:
- Authentication methods (email/password, Microsoft SSO)
- Password policies
- Email verification requirements
- User and room limits
- Custom branding
Firebase Firestore:
├── tenants/
│ ├── {tenantId}/
│ │ ├── name: string
│ │ ├── domains: string[]
│ │ ├── superTenant: boolean
│ │ ├── settings: TenantSettings
│ │ └── isActive: boolean
├── users/
│ ├── {userId}/
│ │ ├── tenantId: string
│ │ ├── roles: string[]
│ │ ├── status: 'ACTIVE' | 'INVITED' | 'INACTIVE'
│ │ └── ...userdata
├── rooms/
│ ├── {roomId}/
│ │ ├── tenantId: string
│ │ ├── allowedUserIds: string[]
│ │ ├── expiresAt: timestamp
│ │ └── ...roomdata
- Firestore Rules: Database-level security with tenant isolation
- JWT Tokens: Firebase manages authentication tokens
- Role Validation: Frontend and backend permission checks
- Domain Validation: Email domain restrictions per tenant
Run the test suite:
npm testRun tests in watch mode:
npm run test:watchnpm run build# Install Firebase CLI
npm install -g firebase-tools
# Login and deploy
firebase login
firebase deployEnsure all environment variables are set in your deployment environment:
- Firebase configuration
- Default tenant limits
- Any custom feature flags
For detailed technical documentation, see:
The application uses Firebase SDK for all backend operations:
- Authentication: Firebase Auth
- Database: Firestore
- Real-time updates: Firestore listeners
- Security: Firestore security rules
src/
├── components/ # React components
│ ├── common/ # Reusable components
│ ├── forms/ # Form components
│ ├── layout/ # Layout components
│ ├── modals/ # Modal dialogs
│ └── pages/ # Page components
├── config/ # Configuration files
├── context/ # React context providers
├── services/ # Business logic and API calls
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
npm run dev: Start development servernpm run build: Build for productionnpm run preview: Preview production buildnpm test: Run tests
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
- Multi-tenant Isolation: Complete data separation between organizations
- Firebase Security Rules: Database-level access control
- JWT Authentication: Secure token-based authentication
- Password Hashing: bcrypt with configurable policies
- Email Domain Validation: Prevent unauthorized access
- Role-based Permissions: Granular access control
- Session Management: Automatic token refresh and expiration
- Enterprise-Ready: Multi-tenant architecture with complete data isolation
- Flexible Authentication: Support for email/password and Microsoft SSO
- Scalable: Firebase backend scales automatically
- Secure: Comprehensive security model with role-based access
- Real-time Collaboration: Live updates and synchronization
- Anonymous Voting: Honest estimation without bias
- Configurable Estimation: Flexible point calculation system
- Time Management: TTL-based room expiration
- Modern Tech Stack: React, TypeScript, Firebase
- Type Safety: Full TypeScript coverage
- Real-time Updates: Firebase Firestore listeners
- Comprehensive Testing: Unit tests with Vitest
This project is open source and available under the MIT License.
For support and questions:
- Create an issue in the repository
- Contact: contact@tejasrana.in
- Documentation: See linked documentation files
Story Pointing - Collaborate, estimate, and deliver with precision - your agile story pointing companion for sprint planning and team estimation.