Launching Document Manager for Wenet

I korthet

Vårt arbete med att vidareutveckla Wenet till det modernaste och effektivaste projekteringsverktyget för byggbranschen fortsätter.

Vi har nyligen lanserat modulen Dokumenthanteraren, en central knutpunkt för all hantering av dokument och filer i Wenet. Med smarta filter och sorteringar, revisionshantering, nedladdning, uppladdning och mycket mer, finns nu alla projektspecifika filer på ett ställe, vilket ger bättre kontroll och en effektivare projekthantering.

Vi har skrivit en lite längre artikel om projektet som går att läsa här under. Artikeln är av lite mer teknisk inriktning. Just a heads up 😉


A module built with Livewire for an existing Laravel-based Project Management Application

The Document Manager

The document manager was built as an extension to an existing Laravel-based project management app. Its purpose was to function as a central hub for document management, providing easy access to all kinds of files related to specific projects. This help clients manage all their project-related documents within their own system, reducing their reliance on external services like Google Docs and Dropbox.

A rough overview of the architecture

The core functionality of the module is uploading files, and here we utilize Livewire’s support for file upload. But we make things a bit more complex than just uploading and storing at the local disk. In our database we want a representation of each file, but the actual file must be stored somewhere else to ensure scalability and reliability. The representation of each file should also contain information about the specific project, category, subcategory, revision etc.

We call these representations DocumentManagerFiles, and you can think of these like information cards about the actual files, or the librarian's record of where each book is in the library.

Data storage and retrieval

The real files, like PDFs, images, and text documents, are safely kept on Amazon S3 ensuring scalability and reliability. When an upload is validated, its properties are set and saved, the actual file is stored on S3 using Laravel’s built in Storage Facade. Since it is a multitenancy app the storage first had to be configured to provide a bucket for each tenant.

Likewise when we want to retrieve a file we get the representation for that file, the DocumentManagerFile, from the database. We then have access to all its properties like category, subcategory, revision, etc. Its first when we want to download the file that we touch the “physical” file, we get the location on S3 from the file representation and starts a download from there.

For bulk downloads, we rely on the PHP Zipstream package, used to create a zip file with all the required documents. For large downloads, we execute this as a Laravel background job and notify the user when the zip is ready for download.

Leveraging Livewire for dynamic interaction

The functionality of a document manager extends beyond mere storage; it also involves making these documents easily accessible. In this section, we'll delve into how Livewire is used to enable dynamic search and organization of documents within the system. With Livewire, we can create that dynamic web interface that makes everything almost as seemless as working with files on your desktop OS.

When you search for a specific document or apply filters, Livewire processes these actions instantly and Livewire's real power becomes evident when we apply it to document searching and filtering. Let's say you want to find all documents within a specific category or with certain attributes. Livewire takes your request and dynamically alters the query that fetches documents from the database. The user doesn't need to reload the page or wait for the server to respond with new results. Livewire does this in the background, and the page updates instantly displaying only those records matching your search terms.

Future development

Each DocumentManagerFile is closely associated with a specific project and has robust Data Storage and Retrieval functionality. This foundation paves the way for future integrations with other parts of the project management application such as to link documents with issues and other components of the app.

A unique aspect of this project is our close collaboration with the client. It enables us to deliver just the right kind of tool for their specific work flow, not just something that can be tweaked to work kind of the way they want.


Gustav Gullstrand

Gustav Gullstrand

Fler inlägg från bloggen


God Mode - My most commonly used Laravel snippet

In web development, "God Mode" can refer to a special mode that allows developers to log in as an admin user instantly. This can be incredibly useful for quickly accessing admin features, testing permissions, and debugging issues. In this article, we’ll explore a handy Laravel snippet that enables "God Mode" in a local development environment.


Glad Sommar!

Sommaren är äntligen här och vi på Caesar vill passa på att önska er alla en riktigt skön sommar!