Configuration Guide
Prerequisites
Required Apps
Before configuring the Software Catalog app, ensure the following apps are installed and enabled:
- OpenRegister - Provides object storage and event system
- Software Catalog - This app
PHP Requirements
- PHP 8.1 or higher
- Required PHP extensions:
- PDO
- JSON
- cURL
- mbstring
Installation
Step 1: App Installation
- Install the Software Catalog app through Nextcloud App Store or manually
- Enable the app in Nextcloud Admin Settings
- Verify the app appears in the app list
Step 2: Verify Dependencies
- Check that OpenRegister app is installed and enabled
- Verify event system is functioning
- Test API endpoints are accessible
Schema Configuration
Access Configuration Interface
- Go to Nextcloud Admin Settings
- Navigate to "Software Catalogus" section
- You'll see the schema configuration interface
Register Selection
The system supports multiple register types. Select your register type:
AMEF Register
For AMEF (Algoritme, Model, Ethiek Framework) registers:
- Organization Schema: Configure organization objects
- Other schemas automatically selected
Voorzieningen Register
For service/provision registers:
- Gebruiker Schema: User/contact data
- Organisatie Schema: Organization data
- Contactgegevens Schema: Contact details
Generic Configuration
For other register types:
- Organization Schema: Organization objects
- Contact Schema: Contact/user objects
- Gebruiker Schema: User objects
- Contactgegevens Schema: Contact details
Schema ID Configuration
For each object type, you need to configure the schema ID:
- Find Schema IDs: Go to OpenRegister → Schemas and note the numeric IDs
- Configure Mappings: Enter the schema IDs in the Software Catalog settings
- Save Configuration: Click "Opslaan" to save settings
Example Configuration:
Organization Schema: 25
Gebruiker Schema: 28
Contactgegevens Schema: 34
Validation
After configuration:
- Check "Current Configuration" section shows your settings
- Verify schema IDs are correctly mapped
- Test with a sample object creation
Object Schema Requirements
Contactgegevens Object
The contactgegevens object must contain the following properties for full functionality:
Required Properties:
- 'voornaam' (string) - First name
- 'achternaam' (string) - Last name
Optional Properties:
- 'tussenvoegsel' (string) - Middle name/infix
- 'email' (string) - Email address
- 'roles' (array) - Array of role names ['beheerder', 'inkoper']
- 'organisation' (string) - UUID of linked organization
Example Structure:
{
"voornaam": "Jane",
"tussenvoegsel": "van",
"achternaam": "Doe",
"email": "jane.doe@example.com",
"roles": ["beheerder"],
"organisation": "12345678-1234-1234-1234-123456789abc"
}
Organization Object
The organization object should contain:
Required Properties:
- 'naam' or 'name' (string) - Organization name
Optional Properties:
- 'type' or 'soort' (string) - Organization type (e.g., 'gemeente')
- 'group' (string) - Group ID (automatically filled by system)
Example Structure:
{
"naam": "Gemeente Amsterdam",
"type": "gemeente",
"group": "gemeente_amsterdam"
}
Role Configuration
Default Roles
The system comes with pre-configured roles:
- beheerder - Administrator/manager role
- inkoper - Purchaser/buyer role
Adding Custom Roles
To add new roles:
- Update Code: Modify '_defaultGroups' array in SoftwareCatalogueService.php
- Add Role Logic: Implement custom logic if needed
- Test Assignment: Verify users get assigned to new roles
Example Code Change:
private array $_defaultGroups = [
'beheerder',
'inkoper',
'coordinator', // New role
'viewer' // New role
];
Event Configuration
Event Listener Registration
The system automatically registers event listeners for:
- ObjectCreatedEvent
- ObjectUpdatedEvent
- ObjectDeletedEvent
- ObjectLockedEvent
- ObjectUnlockedEvent
- ObjectRevertedEvent
Verifying Event Processing
To verify events are being processed:
- Check Logs: Monitor Nextcloud logs for event processing messages
- Test Creation: Create a contactgegevens object and verify user creation
- Monitor Groups: Check if groups are created and users assigned
Email Configuration
Email Service Setup
The system uses Nextcloud's email service for notifications:
- Configure SMTP: Set up SMTP in Nextcloud admin settings
- Verify Sending: Test email functionality
- Check Templates: Email templates are in EmailService.php
Notification Types
The system sends emails for:
- New organization creation
- New user account creation
- Role assignments (if configured)
Group Management Configuration
Automatic Group Creation
Groups are automatically created for:
- Role-Based Groups: 'beheerder', 'inkoper'
- Organization Groups: Based on organization name
- Special Groups: 'ambtenaar' available for manual assignment (no automatic assignment)
Group Naming Rules
Organization groups follow naming conventions:
- Lowercase conversion
- Special characters → underscores
- Multiple underscores → single underscore
- Trimmed underscores
Examples:
- "Gemeente Amsterdam" → 'gemeente_amsterdam'
- "ABC Corp B.V." → 'abc_corp_b_v'
Manager Configuration
Manager Assignment Rules
The system automatically assigns managers:
- Organization Beheerder: Becomes manager for all organization users
- Multiple Beheerders: Oldest becomes primary manager
- Storage: Manager info stored in user preferences
Accessing Manager Data
Managers are stored in Nextcloud user preferences:
- App: 'softwarecatalog'
- Key: 'manager'
- Value: Manager username
Troubleshooting
Common Issues
Schema IDs Not Working
- Check Configuration: Verify schema IDs are correctly entered
- Verify Schemas: Ensure schemas exist in OpenRegister
- Check Types: Ensure IDs are numeric (not strings)
Users Not Created
- Check Events: Verify events are being dispatched
- Check Schema Mapping: Ensure contactgegevens schema is configured
- Check Required Fields: Verify voornaam/achternaam are present
Groups Not Assigned
- Check Roles Array: Ensure 'roles' property is an array
- Verify Group Creation: Check if groups exist in Nextcloud
- Check Permissions: Ensure app has group management permissions
Manager Relationships Not Set
- Check Organization Link: Verify 'organisation' property exists
- Check Beheerder Assignment: Ensure organization has beheerders
- Check User Creation Order: First user should get beheerder role
Debug Mode
Enable debug logging:
- Nextcloud Logs: Set log level to Debug in Nextcloud settings
- Check Log Files: Monitor '/var/log/nextcloud.log' or equivalent
- Search Keywords: Look for 'SoftwareCatalog' in logs
Log Examples
Successful Processing:
SoftwareCatalog: Successfully processed contactgegevens creation
SoftwareCatalog: Created new group: gemeente_amsterdam
SoftwareCatalog: Added user to role-based group: beheerder
SoftwareCatalog: Set user manager: john.smith → jane.doe
Error Examples:
SoftwareCatalog: Failed to process contactgegevens: User creation failed
SoftwareCatalog: Schema ID mismatch: expected 34, got 35
SoftwareCatalog: Organization not found for UUID: 12345678-1234-1234-1234-123456789abc
Performance Tuning
Large Organizations
For organizations with many users:
- Batch Processing: Process users in smaller batches
- Cache Groups: Cache group lookups to avoid repeated queries
- Monitor Performance: Watch for slow event processing
Event Processing
Optimize event handling:
- Parallel Processing: Events are processed in parallel where possible
- Error Isolation: Failed events don't block others
- Retry Logic: Failed operations are logged for manual retry
Security Configuration
Group Access Control
Configure group-based access:
- Folder Permissions: Use groups for folder access control
- App Permissions: Restrict app access by group membership
- File Sharing: Configure sharing permissions by group
Manager Permissions
Manager relationships can be used for:
- Delegation: Managers can act on behalf of subordinates
- Reporting: Hierarchical reporting structures
- Approval Workflows: Manager-based approval processes
Backup and Recovery
Configuration Backup
Backup important configuration:
- App Settings: Export schema configurations
- Group Memberships: Backup Nextcloud group data
- User Preferences: Backup manager relationship data
Recovery Procedures
In case of data loss:
- Restore Configuration: Re-import schema settings
- Recreate Groups: Groups will be auto-created on next event
- Rebuild Relationships: Manager relationships will be re-established
Migration
From Previous Versions
When upgrading:
- Backup Data: Always backup before upgrading
- Check Compatibility: Verify OpenRegister compatibility
- Test Configuration: Verify schema mappings still work
- Monitor Events: Watch for processing issues after upgrade
Schema Changes
When schemas change:
- Update Mappings: Reconfigure schema IDs if needed
- Test Processing: Verify objects still process correctly
- Update Documentation: Document any new requirements