Complete documentation reference for the Internal Claims & Overtime Management System
Welcome to the ClaimBot documentation center. This hub provides organized access to all project documentation, from business requirements to technical specifications and user guides.
| Document | Description | Audience |
|---|---|---|
| Project Summary | Executive overview and current system status | All stakeholders |
| Business Requirements (BRS) | Project objectives, scope, and business rules | All stakeholders |
| System Design (SDS) | Technical architecture, database schema, API design | Developers, Architects |
| Development Plan | Phased development approach and timelines | Project managers, Developers |
| Document | Description | Audience |
|---|---|---|
| UI Wireframes | Visual layout and user interface mockups | Designers, Developers |
| Document | Description | Audience |
|---|---|---|
| System Overview | High-level architecture and component relationships | Developers, Architects |
| Technical Architecture | Comprehensive system architecture and design patterns | Developers, Architects |
| Technical Decision Log | Architecture decisions and rationale | Developers, Architects |
| Location System Specification | Location and mileage calculation system design | Developers, Architects |
| Salary Verification Architecture | Future salary verification and overtime system design | Developers, Architects |
| Document | Description | Audience |
|---|---|---|
| Claim Submission Workflow | End-to-end expense claim submission and approval process | Staff, Managers |
| Overtime Submission Workflow | Overtime request submission and approval process | Staff, Managers |
| Salary Verification Workflow | Salary submission and verification process | Staff, Admins |
| User Management Workflow | User account creation and role management | Administrators |
| Submit Expense Page Guide | Detailed guide for the expense submission page | Staff, Developers |
| Document | Description | Audience |
|---|---|---|
| API Routes Encyclopedia | Complete API endpoint documentation | Developers, Integrators |
| Data Models Reference | Database schema and model definitions | Developers, Architects |
| Component Specifications | UI component architecture and flows | Frontend developers |
| DataTable Component | DataTable component usage and configuration | Frontend developers |
| Location Autocomplete Component | Location autocomplete component guide | Frontend developers |
| Document | Description | Audience |
|---|---|---|
| RBAC & Authentication | Role-based access control implementation | Developers, Security |
| Google Places Implementation | Google Places API integration and location system | Developers |
| Utility Library Reference | Helper functions and utility documentation | Developers |
| Gaps & Issues Report | Known limitations and improvement areas | Developers, QA |
| Document | Description | Audience |
|---|---|---|
| Deployment Guide | Production deployment, Docker, CI/CD, monitoring | DevOps, System Admins |
| Google Maps Integration | Complete Google Maps API setup and integration guide | Developers, DevOps |
| API Documentation | Complete REST API specification (OpenAPI 3.0) | Developers, Integrators |
| Document | Description | Audience |
|---|---|---|
| Historical Debug List | Historical issues and resolved bugs (archived) | Developers, QA |
- Getting Started: Main README → Quick setup and first steps
- Submit Claims: Claim Submission Workflow → How to submit expense claims
- Submit Overtime: Overtime Submission Workflow → How to submit overtime requests
- Salary Setup: Salary Verification Workflow → How to submit salary for verification
- Approval Process: Claim Submission Workflow → Review and approve submissions
- Overtime Approval: Overtime Submission Workflow → Review overtime requests
- Salary Verification: Salary Verification Workflow → Verify employee salaries
- System Overview: System Overview → High-level architecture understanding
- User Management: User Management Workflow → Managing users and roles
- Technical Architecture: Technical Architecture → Comprehensive system design
- RBAC Configuration: RBAC & Authentication → Role and permission management
- Quick Start: Main README → Development environment setup
- Contributing: Contributing Guide → Development workflow and standards
- API Reference: API Routes Encyclopedia → Complete API specification
- Data Models: Data Models Reference → Database schema and relationships
- Architecture: System Overview → System design overview
- Components: Component References → UI component documentation
- Technical Details: Technical Implementation → Implementation specifics
- Deployment: Deployment Guide → Production deployment strategies
- Google Maps Setup: Google Maps Integration → External API configuration
- API Documentation: Swagger Documentation → Complete API specification
docs/
├── 📋 Project Foundation (root)
│ ├── project-summary.md (Executive Overview)
│ ├── business-requirements-specification.md (Business Requirements)
│ ├── system-design-specification.md (System Design)
│ └── development-plan.md (Development Plan)
├── 🏗️ architecture/
│ ├── system-overview.md (High-level Architecture)
│ ├── technical-architecture.md (Comprehensive Technical Architecture)
│ ├── technical-decision-log.md (Architecture Decisions)
│ ├── location-system-specification.md (Location System Design)
│ └── salary-verification-architecture.md (Future Salary System)
├── 📖 guides/
│ ├── deployment-guide.md (Production Deployment Guide)
│ ├── google-maps-integration-guide.md (Google Maps Setup Guide)
│ ├── design/ (UI/UX Design Documents)
│ │ └── wireframes.md
│ ├── workflows/ (Business Process Workflows)
│ │ ├── claim-submission.md
│ │ ├── overtime-submission.md
│ │ ├── salary-verification.md
│ │ └── user-management.md
│ └── pages/ (Page-specific Guides)
│ └── submit-expense.md
├── 📚 reference/
│ ├── api-routes.md (API Documentation)
│ ├── data-models.md (Database Schema)
│ └── components/ (UI Component References)
│ ├── component-specifications.md
│ ├── datatable.md
│ └── location-autocomplete.md
├── 🔧 technical/
│ ├── rbac-and-auth.md (Security Implementation)
│ ├── google-places-implementation.md (Location API Integration)
│ ├── utility-library.md (Helper Functions)
│ └── gaps-and-issues.md (Known Issues)
└── 📁 archive/
└── debug-list-historical.md (Historical Debug Data)
High-level system design, architectural decisions, and technical overview documents.
Step-by-step business process documentation with sequence diagrams and user flows.
Technical documentation for APIs, database models, and UI components.
Detailed implementation guides for specific technical aspects of the system.
graph TB
subgraph "Frontend Layer"
A[Next.js 15 + TypeScript]
B[TailwindCSS + ShadCN UI]
C[React Hook Form + Zod]
end
subgraph "Authentication"
D[Clerk Auth Provider]
end
subgraph "Backend Layer"
E[Next.js API Routes]
F[Mongoose ODM]
G[Winston Logging]
end
subgraph "Database Layer"
H[(MongoDB Atlas)]
end
A --> D
A --> E
E --> F
F --> H
📖 Detailed Architecture: See System Overview and Technical Architecture
| Collection | Purpose | Key Fields |
|---|---|---|
| users | User accounts and profiles | clerkId, role, salary, department |
| claims | Expense claim submissions | userId, expenses, status, attachments |
| overtime | Overtime request submissions | userId, hours, rate, justification |
| files | Document attachments | filename, path, linkedTo |
| audit_logs | System activity tracking | userId, action, timestamp |
| rates_config | Calculation rate settings | type, value, effectiveDate |
📖 Detailed Schema: See Data Models Reference
GET /api/auth/profile- Get current user profileGET /api/users- List all users (admin)POST /api/users- Create new user (admin)PATCH /api/users/[id]- Update user (admin)
GET /api/claims- List claims (filtered by role)POST /api/claims- Create new claimPOST /api/claims/[id]/submit- Submit for approvalPOST /api/claims/[id]/approve- Approve/reject claim
GET /api/overtime- List overtime requestsPOST /api/overtime- Create overtime requestPOST /api/overtime/[id]/submit- Submit for approvalPOST /api/overtime/[id]/approve- Approve/reject request
GET /api/config/rates- Get rate configurationsPOST /api/config/rates- Create rate configurationGET /api/audit-logs- View system audit logsPOST /api/upload- Upload file attachments
POST /api/mileage/calculate- Calculate distance between locationsGET /api/mileage/calculate- Get office location configuration
📖 Complete API Reference: See API Routes Encyclopedia and Swagger Documentation
| Phase | Status | Description |
|---|---|---|
| Phase 1 | ✅ Complete | Foundation & Core Backend |
| Phase 2 | ✅ Complete | Claims & Overtime Backend |
| Phase 3 | ✅ Complete | Frontend Core & Staff Modules |
| Phase 4 | ✅ Complete | Manager & Admin Modules |
| Phase 5 | ✅ Complete | RBAC Enhancement & Unified Admin |
| Phase 6 | ✅ Complete | Location System & Google Maps Integration |
| Phase 7 | 🔄 Future | Salary Verification & Advanced Features |
📖 Detailed Plan: See Development Plan
| Platform | Best For | Complexity | Cost |
|---|---|---|---|
| Vercel | Quick deployment, Next.js optimization | Low | $ |
| AWS ECS/Fargate | Production scale, full control | High | $$ |
| Google Cloud Run | Serverless, auto-scaling | Medium | $ |
| Docker | Any environment, portability | Medium | Varies |
# Vercel (Recommended)
npm i -g vercel
vercel --prod
# Docker
docker build -t claimbot .
docker run -p 3000:3000 claimbot
# Docker Compose
docker-compose up -d📖 Complete Deployment Guide: See Deployment Guide
- Start with the BRS if you're new to the project
- Review System Overview for architectural understanding
- Follow Workflows for process understanding
- Use Reference docs for implementation details
- Check Technical docs for specific implementations
- Follow Deployment Guide for production setup
- 📋 Foundation: Business requirements and planning (root level)
- 🏗️ Architecture: System design and technical overview
- 📖 Guides: User workflows and process documentation
- 📚 Reference: API, data models, and component documentation
- 🔧 Technical: Implementation details and utilities
- 🚀 Operations: Deployment and operational guides
- All documentation follows Markdown format
- Include version numbers and last update dates
- Cross-reference related documents
- Update the hub index when adding new documents
- See Contributing Guide for standards
- Workflow Questions: Check the Workflow Guides
- Technical Questions: Review Technical Implementation and Architecture
- API Questions: See API Routes Encyclopedia
- Component Usage: Check Component References
- Business Context: Refer to the Business Requirements
- Deployment Issues: See the Deployment Guide
- Current Issues: Check the Gaps & Issues Report
- ✅ Business Layer: 100% documented (BRS, workflows)
- ✅ Architecture Layer: 100% documented (system overview, technical architecture)
- ✅ Reference Layer: 100% documented (API, data models, components)
- ✅ Technical Layer: 100% documented (implementation details, utilities)
- ✅ Operations Layer: 100% documented (deployment, monitoring)
- Total Documents: 25+ organized documents
- Folder Structure: 4 main categories (architecture, guides, reference, technical)
- Cross-References: Comprehensive linking between related documents
- Navigation: Role-based quick access paths
- Last Full Review: June 6, 2025
- Update Frequency: Living documents updated per change
- Review Cycle: Quarterly comprehensive review
- Organization: Completed full reorganization
📝 Last Updated: June 6, 2025 📚 Total Documents: 20+ organized documents (cleaned up and reorganized) 🏗️ Status: Phase 6 Complete - Location System Integrated 📖 Coverage: Complete end-to-end documentation with organized structure 📁 Organization: ✅ COMPLETED - All documentation properly categorized and cross-referenced
Comprehensive, well-organized documentation for a modern, full-stack expense and overtime management system 📋✨