Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lets add some Documentation for ibds #154

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,68 @@ For more detailed information, please refer to the documentation files in the `d
- **lib**: Contains all the PHP code for the application.
- **src**: Contains all the Vue.js code for the application.
- **docs**: Contains documentation files.

# Open Register

Open Register is a powerful object management system for Nextcloud that helps organizations store, track, and manage objects with their associated metadata, files, and relationships. Born from the Dutch Common Ground initiative, it addresses the need for quickly deploying standardized registers based on centralized definitions from standardization organizations.

## Background

Open Register emerged from the Dutch Common Ground movement, which aims to modernize municipal data management. The project specifically addresses the challenge many organizations face: implementing standardized registers quickly and cost-effectively while maintaining compliance with central definitions.

### Common Ground Principles
- Decentralized data storage
- Component-based architecture
- Standardized definitions
- API-first approach

Open Register makes these principles accessible to any organization by providing:
- Quick register deployment based on standard schemas
- Flexible storage options
- Built-in compliance features
- Cost-effective implementation

## Key Features

| Feature | Description | Benefits |
|---------|-------------|-----------|
| 💾 [Object Storage](docs/object-storage.md) | Flexible storage backend selection per register | Storage flexibility, system integration, scalability |
| 📝 [Audit Trails](docs/audit-trails.md) | Complete history of all object changes | Compliance, accountability, change tracking |
| ⏰ [Time Travel](docs/time-travel.md) | View and restore previous object states | Data recovery, historical analysis, version control |
| 🔒 [Object Locking](docs/object-locking.md) | Prevent concurrent modifications | Data integrity, process management, conflict prevention |
| 🗑️ [Soft Deletes](docs/soft-deletes.md) | Safely remove objects with recovery options | Data safety, compliance, mistake recovery |
| 🔗 [Object Relations](docs/object-relations.md) | Create and manage connections between objects | Complex data structures, linked information, dependencies |
| 📎 [File Attachments](docs/file-attachments.md) | Manage files associated with objects | Document management, version control, previews |
| 🔍 [Content Search](docs/content-search.md) | Full-text search across objects and files | Quick discovery, unified search, advanced filtering |
| 🏷️ [Automatic Facets](docs/automatic-facets.md) | Dynamic filtering based on object properties | Intuitive navigation, pattern discovery, smart filtering |
| ✅ [Schema Validation](docs/schema-validation.md) | Validate objects against JSON schemas | Data quality, consistency, structure enforcement |
| 📚 [Register Management](docs/register-management.md) | Organize collections of related objects | Logical grouping, access control, process automation |
| 🔐 [Access Control](docs/access-control.md) | Fine-grained permissions management | Security, role management, granular control |
| ⚡ [Elasticsearch](docs/elasticsearch.md) | Advanced search and analytics capabilities | Performance, insights, complex queries |
| 📋 [Schema Import & Sharing](docs/schema-import.md) | Import schemas from Schema.org, OAS, GGM, and share via Open Catalogi | Standards compliance, reuse, collaboration |
| 🔔 [Events & Webhooks](docs/events.md) | React to object changes with events and webhooks | Integration, automation, real-time updates |
| 🔄 [Data Extension](docs/data-extension.md) | Automatically include related entities in responses | Efficient data retrieval, reduced API calls, complete context |
| ✂️ [Data Filtering](docs/data-filtering.md) | Select specific properties to return | Data minimalization, GDPR compliance, efficient responses |
| 🔍 [Advanced Search](docs/advanced-search.md) | Filter objects using flexible property-based queries | Precise filtering, complex conditions, efficient results |

## Documentation

For detailed information about each feature, please visit our [documentation](docs/).

## Requirements

- Nextcloud 25 or higher
- PHP 8.1 or higher
- Database: MySQL/MariaDB

## Installation

[Installation instructions]

## Support

[Support information]

## License

This project is licensed under the AGPL-3.0 License - see the [LICENSE](LICENSE) file for details.
57 changes: 57 additions & 0 deletions docs/access-control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Access Control

Access Control provides enterprise-grade permissions management through integration with Nextcloud RBAC (Role-Based Access Control) and Keycloak.

## Overview

The access control system integrates with:
- ADFS (Active Directory Federation Services) for user and group management via Keycloak
- Nextcloud RBAC for role-based permissions
- FCS (Federal Cloud Services) compliance requirements
- Verwerkingen registers for process tracking

## Permission Levels

Access can be controlled at multiple levels:
- Register level - Control access to entire registers
- Schema level - Manage permissions for specific register/schema combinations
- Object level - Set permissions on individual objects
- Property level - Fine-grained control over specific object properties

## Permission Types

Permissions are granted through:
1. **User Rights**
- CRUD (Create, Read, Update, Delete) operations
- Inherited from ADFS groups via Keycloak
- Role-based access control through Nextcloud

2. **Contract Rights**
- Application-level permissions
- Process-specific authorizations
- Compliance with FCS requirements
- Integration with verwerkingen registers

## Implementation

Access control is implemented through:

1. **User Authentication**
- Direct integration with Keycloak for identity management
- ADFS synchronization for user and group information
- Single Sign-On (SSO) capabilities

2. **Permission Management**
- CRUD-level permissions for all system entities
- Hierarchical permission inheritance
- Fine-grained access control at multiple levels

3. **Process Integration**
- Compliance with FCS guidelines
- Integration with verwerkingen registers for process tracking
- Application-specific permission contracts

## Related Features

- [Register Management](register-management.md) - Manage register access
- [Object Locking](object-locking.md) - Control modifications
168 changes: 168 additions & 0 deletions docs/advanced-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
# Advanced Search

Open Register provides powerful search capabilities that allow filtering objects based on their properties using a flexible query syntax.

## Overview

The search system enables you to filter objects using query parameters. However, it's important to note that this approach is limited by the maximum URL length supported by browsers and servers (typically 2,048 characters for most browsers).

For more complex queries that exceed URL length limitations, we are planning to implement GraphQL support in the future. This would enable:

- Deeply nested queries
- Complex filtering logic
- Precise field selection
- Batch operations
- Real-time subscriptions

> Note: GraphQL implementation is currently pending funding. If you're interested in supporting this feature, please contact us.

In the meantime, here are the available search capabilities using URL parameters:

| Operator | Description | Example |
|----------|-------------|---------|
| = | Equals (case insensitive) | `name=nemo` |
| != | Not equals (case insensitive) | `name[!=]=nemo` |
| > | Greater than | `age[>]=5` |
| < | Less than | `weight[<]=10` |
| >= | Greater than or equal | `age[>=]=2` |
| <= | Less than or equal | `age[<=]=10` |
| ~ | Contains (case insensitive) | `name[~]=ne` |
| ^ | Starts with (case insensitive) | `name[^]=ne` |
| $ | Ends with (case insensitive) | `name[$]=mo` |
| === | Equals (case sensitive) | `name[===]=Nemo` |
| exists | Property exists check | `microchip[exists]=true` |
| empty | Empty value check | `notes[empty]=true` |
| null | Null value check | `owner[null]=true` |

## Full Text Search

The `_search` parameter allows searching across all text properties of objects in a case-insensitive way:

``GET /api/pets?_search=nemo``

This searches for "nemo" in all text fields like name, description, notes etc.

### Wildcard Search
You can use wildcards in the search term:

- `*` matches zero or more characters
``GET /api/pets?_search=ne*o``
Matches "nemo", "negro", "neuro" etc.

- `?` matches exactly one character
``GET /api/pets?_search=ne?o``
Matches "nemo", "nero" but not "neuro"

### Pattern Matching
- `^` matches start of text
``GET /api/pets?_search=^ne``
Matches text starting with "ne"

- `$` matches end of text
``GET /api/pets?_search=mo$``
Matches text ending with "mo"

### Phrase Search
Use quotes for exact phrase matching:
``GET /api/pets?_search="orange fish"``
Matches the exact phrase "orange fish"

## Basic Search

Simple equals search (case insensitive):
``GET /api/pets?name=nemo``

This returns all pets named "nemo", "Nemo", "NEMO", etc.

Case sensitive search:
``GET /api/pets?name[===]=Nemo``

This returns only pets named exactly "Nemo".

## Comparison Operators

### Not Equals (!=)
``GET /api/pets?name[!=]=nemo``
Returns all pets NOT named "nemo" (case insensitive)

### Greater Than (>)
``GET /api/pets?age[>]=5``
Returns pets older than 5 years

### Less Than (<)
``GET /api/pets?weight[<]=10``
Returns pets weighing less than 10kg

### Greater Than or Equal (>=)
``GET /api/pets?age[>=]=2``
Returns pets 2 years or older

### Less Than or Equal (<=)
``GET /api/pets?age[<=]=10``
Returns pets 10 years or younger

### Contains (~)
``GET /api/pets?name[~]=ne``
Returns pets with "ne" in their name (like "nemo", "nero", "Nemo", etc) - case insensitive

### Starts With (^)
``GET /api/pets?name[^]=ne``
Returns pets whose names start with "ne" (case insensitive)

### Ends With ($)
``GET /api/pets?name[$]=mo``
Returns pets whose names end with "mo" (case insensitive)

## Combining Multiple Conditions

### AND Operations
``GET /api/pets?name=nemo&type=fish``
Returns pets named "nemo" (case insensitive) AND of type "fish"

### OR Operations
``GET /api/pets?name[]=nemo&name[]=dory``
Returns pets named either "nemo" OR "dory" (case insensitive)

## Special Filters

### Exists Check
``GET /api/pets?microchip[exists]=true``
Returns pets that have a microchip property

### Empty Check
``GET /api/pets?notes[empty]=true``
Returns pets with empty notes

### Null Check
``GET /api/pets?owner[null]=true``
Returns pets with no owner

### Between Range
``GET /api/pets?age[>=]=2&age[<=]=5``
Returns pets between 2 and 5 years old (inclusive)

``GET /api/pets?age[>]=2&age[<]=5``
Returns pets between 2 and 5 years old (exclusive)

## Searching Nested Properties

``GET /api/pets?owner.city=Amsterdam``
Returns pets whose owners live in Amsterdam (case insensitive)

``GET /api/pets?vaccinations.date[>]=2023-01-01``
Returns pets with vaccinations after January 1st, 2023

## Best Practices

1. Use URL encoding for special characters
2. Keep queries focused and specific
3. Use pagination for large result sets
4. Consider URL length limitations
5. Break complex queries into multiple requests if needed

## Related Features

- [Automatic Facets](automatic-facets.md) - Combine with faceted search
- [Elasticsearch](elasticsearch.md) - Advanced search capabilities
- [Content Search](content-search.md) - Full-text search integration
- [Access Control](access-control.md) - Security for search results
Loading
Loading