Skip to content

aegif/NemakiWare

Repository files navigation

NemakiWare

NemakiWare is an open source Enterprise Content Management system, compliant with CMIS ver1.1.

Features

  • All-in-one package including CMIS server, full-text search engine, and modern React client
  • Docker Compose deployment with CouchDB, Solr, and Tomcat
  • Jakarta EE 11 compatible with Java 21
  • Modern React SPA UI with TypeScript, Vite 7, and Ant Design 5
  • SAML and OIDC authentication support (Keycloak, Google, Microsoft)
  • Cloud integration with Google Workspace and Microsoft 365
  • RAG semantic search powered by Hugging Face TEI and Solr DenseVector
  • Full CMIS 1.1 compliance verified with Apache Chemistry TCK

Key Capabilities

  • CMIS ver1.1 compliant and CMIS-native server

    • Easy integration with any CMIS-compliant client
    • Extended features: user/group management, archive, custom types
    • Highly customizable within CMIS specification
  • Enhanced Full-Text Search (Apache Solr 9.x with Solr Cell)

    • PDF, Microsoft Office (Word, Excel, PowerPoint)
    • OpenDocument (Writer, Calc, Impress)
    • HTML, XML, RTF, plain text
  • RAG Semantic Search (Hugging Face TEI + Solr DenseVector)

    • Multilingual vector search with intfloat/multilingual-e5-large (1024 dim)
    • Automatic document chunking and embedding
    • Combined keyword + semantic search results
  • NoSQL CouchDB backend

    • Document-based storage with easy replication
    • Simple database management

Etymology

"Nemaki" derives from the Japanese word "寝巻き" (pajamas/night clothes). Relax and enjoy happy enterprise time as if you are lying on the couch in your room!


Quick Start (Docker Compose)

Prerequisites

  • Docker and Docker Compose
  • 4GB+ available memory

1. Build the Application

# Install OpenCMIS JARs to local Maven repository (required on first build)
./scripts/install-opencmis-local.sh

# Build UI
cd core/src/main/webapp/ui
npm install
npm run build

# Build Core WAR
cd ../../../..
mvn clean package -f core/pom.xml -Pdevelopment -DskipTests -q

# Copy WAR to Docker directory
cp core/target/core.war docker/core/core.war

OpenCMIS JAR Resolution

NemakiWare uses custom OpenCMIS 1.1.0-nemakiware JARs (Jakarta EE compatible). Pre-built JARs are committed to lib/built-jars/ and must be installed to the local Maven repository before the first build:

# Required on first build (installs lib/built-jars/*.jar to ~/.m2/repository)
./scripts/install-opencmis-local.sh

To refresh JARs from aegif/chemistry-opencmis-nemakiware on GitHub Packages:

./scripts/fetch-opencmis-from-github-packages.sh

Prerequisite for GitHub Packages (~/.m2/settings.xml):

<settings>
  <servers>
    <server>
      <id>github-opencmis</id>
      <username>YOUR_GITHUB_USERNAME</username>
      <password>YOUR_GITHUB_TOKEN</password>
    </server>
  </servers>
</settings>

Jersey/Spring Compatibility Policy

NemakiWare follows upstream Jersey compatibility modules for Spring integration.

  • Keep using the currently published Jersey/Spring integration artifact in release builds.
  • Adopt jersey-spring7 only after it is officially published to Maven repositories (Maven Central or Eclipse/Jakarta distribution repositories).
  • Run compatibility regression tests before adoption:
    • core clean compile
    • targeted REST tests
    • /api/v1/cmis/* and /api/v1/repo/* routing coexistence checks

2. Start Services

cd docker
docker compose -f docker-compose-simple.yml up -d --build

This starts:

Service Port Description
CouchDB 5984 Document database
Solr 8983 Full-text search engine
Core 8080 CMIS server + React UI

To also enable RAG semantic search (requires 16GB+ memory):

docker compose -f docker-compose-simple.yml --profile rag up -d --build

This additionally starts:

Service Port Description
TEI 8081 Vector embedding server (Hugging Face TEI)

3. Wait for Startup

# Wait for NemakiWare to be ready (approximately 60-90 seconds)
curl -u admin:admin http://localhost:8080/core/atom/bedroom

4. Access the Application

Default credentials: admin / admin

Stopping Services

cd docker
docker compose -f docker-compose-simple.yml down

Rebuilding After Code Changes

⚠️ Important: Always use --build --force-recreate. Never use docker compose restart as it won't pick up WAR changes.

# 1. Rebuild UI (if frontend changed)
cd core/src/main/webapp/ui
npm run build

# 2. Rebuild WAR
cd ../../../..
mvn clean package -f core/pom.xml -Pdevelopment -DskipTests -q

# 3. Deploy to Docker
cp core/target/core.war docker/core/core.war
cd docker
docker compose -f docker-compose-simple.yml up -d --build --force-recreate core

Complete Clean Rebuild (Full Reset)

For a complete environment reset including database:

# 1. Clean UI build artifacts
cd core/src/main/webapp/ui
rm -rf node_modules dist
npm install
npm run build

# 2. Clean and rebuild WAR
cd ../../../..
mvn clean package -f core/pom.xml -Pdevelopment -DskipTests -q
cp core/target/core.war docker/core/core.war

# 3. Reset Docker environment (removes all data!)
cd docker
docker compose -f docker-compose-simple.yml down -v
docker compose -f docker-compose-simple.yml up -d --build --force-recreate

# 4. Wait for startup (90 seconds)
sleep 90
curl -u admin:admin http://localhost:8080/core/atom/bedroom

Cloud Integration (Google / Microsoft)

NemakiWare supports integration with Google Workspace and Microsoft 365:

Feature Google Microsoft
OIDC Login ✅ Google Account ✅ Microsoft Account
Cloud Drive ✅ Google Drive ✅ OneDrive
Directory Sync ✅ Google Workspace ✅ Entra ID

📖 Setup Guide: docs/CLOUD_INTEGRATION.md


Optional: Keycloak (SAML/OIDC Authentication)

For external authentication via Keycloak:

cd docker
docker compose -f docker-compose.keycloak.yml up -d

Keycloak will be available at http://localhost:8088


Development Environment (Jetty)

For debugging and rapid development without Docker:

Prerequisites

  • Java 21
  • Maven 3.6+
  • Docker (for CouchDB only)

Setup

  1. Start CouchDB

    docker run -d --name couchdb-dev -p 5984:5984 \
      -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password \
      couchdb:3
  2. Start Development Server

    cd core
    ./start-jetty-dev.sh

Note: This mode uses MockSolrUtil (search disabled) for simplified development.


Testing

CMIS TCK Tests

# Run TCK tests (requires Docker environment running)
mvn test -Dtest=BasicsTestGroup,TypesTestGroup,ControlTestGroup,VersioningTestGroup \
  -f core/pom.xml -Pdevelopment

Playwright E2E Tests

cd core/src/main/webapp/ui
npx playwright test --project=chromium

環境リセット・検証については docs/e2e-test-environment.md を参照してください。


Project Structure

NemakiWare/
├── core/                    # CMIS server (Spring + OpenCMIS)
│   └── src/main/webapp/ui/  # React SPA (TypeScript + Vite)
├── docker/                  # Docker Compose configurations
├── solr/                    # Solr search engine configuration
└── common/                  # Shared utilities

Technical Stack

Component Technology
Server Tomcat 11.0 (Jakarta EE 11, Virtual Threads)
Framework Spring 7, Apache Chemistry OpenCMIS
Database CouchDB 3.x
Search Apache Solr 9.x
UI React 19, TypeScript, Vite 7, Ant Design 5
Java 21 (required, Virtual Threads enabled)

Documentation

Document Description
Architecture System architecture overview
AWS Deployment Guide Production deployment on AWS
Cloud Integration Google / Microsoft integration setup
E2E Test Environment Playwright test environment setup
SSO Authentication SAML / OIDC authentication with Keycloak

License

Copyright (c) 2013-2026 aegif.

NemakiWare is Open Source software licensed under the GNU Affero General Public License version 3. See legal/LICENSE for details.

About

Light-weight, highly customizable CMIS server powered by NoSQL

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors