Skip to content

Enterprise document management and archiving system built on Spring Framework. Features workflow automation, multi-tenant support, MongoDB/S3 storage, and Keycloak SSO integration.

Notifications You must be signed in to change notification settings

TorbenMerrald/wfmarchive

Repository files navigation

WFM Archive

A robust enterprise document management and archiving system built on the CUBA Platform.

Overview

WFM Archive consolidates documents from scattered systems into a single, searchable repository with powerful workflow automation. It provides multi-tenant document storage, configurable retention policies, and seamless integration with enterprise systems including Keycloak, MongoDB, Amazon S3, and IBM i-Series.

Key Business Value:

  • Unified Document Management: Reduce document search time by 30-40% with centralized storage
  • Regulatory Compliance: Automated retention policies and comprehensive audit trails
  • Legacy System Bridge: Modernize document management without disrupting existing workflows

Key Features

Feature Description
Document Archiving Multi-format document storage with metadata, versioning, and full-text search
Dynamic Document Types Create custom document types with configurable fields - no coding required
Workflow Automation BPMN-based workflows using Flowable for approval routing and process automation
Multi-tenant Support Organization-level data isolation with per-tenant configurations
External Integrations Connect to Keycloak (SSO), MongoDB, Amazon S3, IBM i-Series, and custom databases
Role-Based Access Fine-grained permissions at document type and organization levels
Advanced Search Full-text and metadata search with filters (AND, OR, IN operations)
Retention Policies Configurable deletion schedules with soft delete, hard delete, and anonymization
REST API Complete RESTful API for external system integration
Audit Trail Comprehensive logging for all document operations

Technology Stack

Component Technology Version
Framework CUBA Platform 7.2.19
Languages Java / Groovy 11 / 2.5.14
Frontend Vaadin 8.14.3
Build Tool Gradle 5.6.4
Primary Database Microsoft SQL Server -
Document Store MongoDB 4.10+
File Storage Amazon S3 -
Workflow Engine Flowable 6.5.0
Authentication Keycloak -
Message Queue Apache Camel 2.25.0

Quick Start

Prerequisites

  • Java 11 JDK
  • Gradle 5.6.4+ (or use included wrapper)
  • Microsoft SQL Server (or HSQLDB for development)
  • MongoDB 4.10+
  • Docker (optional, for containerized deployment)

Build & Run

# Clone the repository
git clone <repository-url>
cd wfmarchive

# Build the application
./gradlew assemble

# Create development database (uses HSQLDB)
./gradlew createDb

# Start the development server
./gradlew restart

The application will be available at http://localhost:8080/app

Docker Deployment

# Build Docker image
docker build -t wfmarchive .

# Run with Docker Compose
cd docker-image
docker compose up

Project Structure

wfmarchive/
├── modules/
│   ├── global/          # Shared entities, services, and configurations
│   ├── core/            # Business logic and service implementations
│   ├── web/             # Web UI screens and REST controllers
│   └── portal/          # External portal for public access
├── docs/                # Detailed documentation
├── docker-image/        # Docker configuration
└── deploy/              # Deployment artifacts

Configuration

Environment Variables

Create a .env file based on .env.example:

Variable Description
DB_HOST Production database host
DB_PORT Database port
DB_NAME Database name
DB_USER Database username
DB_PASSWORD Database password
DEV_DB_* Development database settings

Configuration Files

File Purpose
modules/core/src/.../app.properties Production configuration
modules/core/src/.../dev-app.properties Development configuration
modules/core/src/.../docker-app.properties Docker configuration
modules/web/src/.../web-app.properties Web tier configuration

Development

Common Commands

# Build application
./gradlew assemble

# Run tests
./gradlew test

# Build WAR file
./gradlew buildWar

# Build standalone JAR
./gradlew buildUberJar

# Update database schema
./gradlew updateDb

# Build and deploy themes
./gradlew buildScssThemes deployThemes

Testing

# Run all tests
./gradlew test

# Run tests for specific module
./gradlew :app-core:test

Documentation

For detailed documentation, see the docs/ directory:

API Example

# Authenticate and get token
curl -X POST http://localhost:8080/app/rest/v2/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=password&username=admin&password=admin"

# Search documents
curl -X POST http://localhost:8080/app/rest/wfm/v1/archive/search \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"documentType": "INVOICE", "filters": {"status": "PENDING"}}'

For technical details and development guidance, see CLAUDE.md

About

Enterprise document management and archiving system built on Spring Framework. Features workflow automation, multi-tenant support, MongoDB/S3 storage, and Keycloak SSO integration.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •