Document Management - installation
Setup
In order to setup the Document Management PBC you'll need to install it into your project, and then perform some basic configuration.
Installing during Genesis Create
When configuring a new application via Genesis Create you can install the Document Management PBC by selecting it as a component on the project attributes screen.
Installing in a modern Genesis application
If you have a modern Genesis application (an application using the unified monorepo structure) you can run the following command in the project root to install the PBC:
npx -y @genesislcap/genx@latest add -s pbc-documents-seed -x --no-shell
This will install and configure the client and server modules
If this doesn't work you can try the next method as a backup.
Manually adding the component
If you're not able to install the component via the above methods you can install it manually as a component. Ensure you're using the versions mentioned above.
Client installation
Add the following to the dependencies
section of client/package.json
in your project:
"@genesislcap/pbc-documents-ui": "<version>"
You can find the latest version of the pbc-documents-ui component here
Set up a route for the component in the file client/src/routes/config.ts
. This makes the component visible to your application:
{
title: 'Document Management',
path: 'document-management',
name: 'document-management',
element: async () => (await import('@genesislcap/pbc-documents-ui')).FoundationDocumentManager,
settings: { autoAuth: true, maxRows: 500 },
navItems: [
{
navId: 'header',
title: 'Document Management',
icon: {
name: 'file-csv',
variant: 'solid',
},
placementIndex: 35,
},
{
navId: 'side',
title: 'Special Document Manager',
routePath: 'document-management/foo', // < example if there were child routes
icon: {
name: 'file-csv',
variant: 'solid',
},
},
]
}
Server installation
To manually add the Reporting server component to your project, you must add some dependencies to your server and client packages.
Add fileServerVersion
to the file server/gradle.properties
:
reportingVersion=x.y.z
Then add the following dependency to the server/settings.gradle.kts
file in your project:
genesis {
projectType = ProjectType.APPLICATION
...
dependencies {
...
dependency("global.genesis:file-server:${extra.properties["fileServerVersion"]}")
...
}
}