Module Quick Start Guide
This guide helps developers quickly understand and work with the module system.
Finding a Module
By Name
Use the Quick Reference table in the Module Index to find:
- Package name
- Category
- Primary purpose
By Category
Browse modules by functional area:
- Operations: Jobs, Piecework, Order, Parts, Requisition, Store, Production Line
- Quality: NCR, TQ, Health & Safety
- HR: HR, Skills
- Assets: Assets, Tools, Fleet
- IT: IT, Hosting, DMS
- Maintenance: Faults, Routine
- Business: Reports, Projects
- Support: Ticket
- Testing: Test Leads
- Config: Manual, Sites, Costsheets, Website
- CRM: CRM-SRM
By Feature
Search the Module Index for keywords like:
- "employee", "timesheet" → HR Module
- "calibration", "equipment" → Tools Module
- "customer", "quotation" → CRM-SRM Module
- "quality", "conformance" → NCR or TQ Module
Accessing a Module
In Backend Application
- Start the Backend app:
yarn start-back(port 4200) - Navigate to the module through the menu
- URL pattern:
http://localhost:4200/modules/<module-name>/<route>
Example URLs:
- HR Dashboard:
http://localhost:4200/modules/hr/dashboard - Ticket List:
http://localhost:4200/modules/ticket/ticketsList - NCR Dashboard:
http://localhost:4200/modules/ncr/dashboard
Module Menu Structure
Most modules have these standard routes:
/dashboard- Module overview and metrics/settings- Module configuration/<entity>List- Entity list view/<entity>View/:id- Entity detail view
Understanding a Module
1. Check the Documentation
Start with the Module Index for:
- Module purpose
- Key features
- Package name
2. Explore the Code Structure
bash
# Navigate to module directory
cd web/projects/packages/@barcoding/modules/<module-name>
# View module structure
tree src/lib -L 23. Review Key Files
- Module Definition:
src/lib/<name>.module.ts - Routing:
src/lib/<name>.routing.ts - Main Component:
src/lib/<name>.component.ts - State (if exists):
src/lib/store/<name>.store.ts
4. Check Components
bash
# List all components
ls src/lib/components/Common component patterns:
<name>Dashboard- Dashboard view<name>List- List/grid view<name>View- Detail view<name>Form- Create/edit form<name>Settings- Settings page
Working with a Module
Running the Module in Development
bash
# Start the Backend application
cd web
yarn start-back
# Navigate to http://localhost:4200
# Access module through the application menuBuilding a Specific Module
bash
cd web
# Build in development mode
ng build @barcoding/module-<name>
# Build for production
ng build @barcoding/module-<name> --configuration productionTesting a Module
bash
cd web
# Run unit tests
yarn test @barcoding/module-<name>
# Run with watch mode
yarn test:watch @barcoding/module-<name>
# Run with coverage
yarn test:coverage @barcoding/module-<name>Debugging a Module
Browser DevTools
- Open Chrome DevTools (F12)
- Navigate to Sources tab
- Find module in webpack sources
- Set breakpoints in TypeScript files
Angular DevTools
- Install Angular DevTools browser extension
- Inspect component tree
- View component properties and state
NGXS DevTools
- Install Redux DevTools browser extension
- Monitor state changes
- Time-travel debugging
- Action replay
Common Module Tasks
Finding API Endpoints
Modules use SDK services from @barcoding/sdk:
typescript
// Look for service injection in components
constructor(
private entityController: EntityControllerService
) {}
// API methods follow pattern:
this.entityController.apiEntityControllerFind().subscribe(...)To find available API methods:
bash
# View SDK service
cat web/projects/packages/@barcoding/sdk/src/lib/services/<entity>-controller.service.tsUnderstanding Module State
Check the NGXS store:
bash
# View module state
cat web/projects/packages/@barcoding/modules/<name>/src/lib/store/<name>.store.tsState typically includes:
- Entity lists
- Selected entity
- Loading flags
- Filter/search criteria
Finding Related Modules
Check the Module Ecosystem for:
- Inter-module relationships
- Data flow between modules
- Integration points
Module Development Workflow
1. Understand Requirements
- What business problem does this solve?
- Who are the users?
- What are the main workflows?
2. Review Similar Modules
Look at existing modules with similar patterns:
- Simple CRUD: Assets, Fleet, Sites
- Complex Workflows: Jobs, CRM-SRM, Projects
- Reporting: Reports, HR (reports)
- Quality: NCR, TQ
3. Plan Module Structure
Decide on:
- Main entities
- Required components (Dashboard, List, View, Form)
- State management needs
- API endpoints required
4. Implement Components
Follow the standard pattern:
Dashboard → List → View → Form → Settings5. Add State Management (if needed)
Use NGXS for:
- Entity lists
- Selected entity
- Filter states
- Shared data across components
6. Integrate with API
Use SDK services:
typescript
// Inject service
constructor(private apiService: MyControllerService) {}
// Make API calls
this.apiService.apiMyControllerFind().subscribe(
data => { /* handle success */ },
error => { /* handle error */ }
);7. Test Thoroughly
- Unit tests for components and services
- E2E tests for user workflows
- Manual testing in all applications
8. Document
- Add to module documentation
- Update API documentation if needed
- Add inline code comments
Troubleshooting
Module Not Loading
Check:
- Module is registered in application routing
- Module is built (check
distdirectory) - No compilation errors in console
- Route path is correct
API Calls Failing
Check:
- API is running (port 3000 or 3001)
- SDK is up to date (
yarn build-sdk) - Authentication token is valid
- Network tab in DevTools for error details
State Not Updating
Check:
- Actions are dispatched correctly
- State reducer is handling action
- Component is subscribed to correct selector
- NGXS DevTools shows state changes
Grid Not Displaying Data
Check:
- Data source is bound correctly
- API returns data (check Network tab)
- Grid columns are defined
- No console errors
Quick Reference
Module Locations
bash
# Modules source
web/projects/packages/@barcoding/modules/
# Built modules
web/dist/barcoding/module-<name>/
# Module tests
web/projects/packages/@barcoding/modules/<name>/src/**/*.spec.tsCommon Commands
bash
# Build module
ng build @barcoding/module-<name>
# Test module
yarn test @barcoding/module-<name>
# Lint module
ng lint @barcoding/module-<name>
# Serve application with module
yarn start-backKey Dependencies
@barcoding/core- Universal utilities@barcoding/auth-core- Authentication@barcoding/backend-core- Backend utilities@barcoding/sdk- API client@angular/core- Angular framework@progress/kendo-angular-*- UI components@ngxs/store- State management
Next Steps
- Module Index - Explore all modules
- Module Overview - Deep dive into architecture
- Module Ecosystem - Understand relationships
- CLAUDE.md - Development environment setup
Getting Help
If you need assistance:
- Check the Module Index for module-specific information
- Review the Module Overview for patterns and guidelines
- Examine similar existing modules for examples
- Check CLAUDE.md for development environment details