File Browser
Search…
Contributing
If you're interested in contributing to this project, this is the best place to start. Before contributing to this project, please take a bit of time to read our Code of Conduct. Also, note that this project is open-source and licensed under Apache License 2.0.

Project Structure

The project is mainly composed by one repository, hosted on GitHub. The backend side of the application is written in Go, while the frontend (located on a subdirectory of the same name) is written in Vue.js, a framework to produce JavaScript, CSS and HTML.
Due to the tight coupling required by some features, basic knowledge of both Go and Vue.js is recommended.

Get the source code

We encourage you to use git to manage your fork. To clone the main repository, just run:
1
git clone https://github.com/filebrowser/filebrowser
Copied!

Build

Frontend

We are using Node.js on the frontend to manage the build process. The steps to build it are:
1
# From the root of the repo, go to frontend/
2
cd frontend
3
# Install the dependencies
4
npm install
5
# Build the frontend
6
npm run build
Copied!
This will install the dependencies and build the frontend so you can then embed it into the Go app. Although, if you want to play with it, you'll get bored of building it after every change you do. So, you can run the command below to watch for changes:
1
npm run watch
Copied!

Backend

First of all, you need to download the required dependencies. We are using the built-in go mod tool for dependency management. To get the modules, run:
1
go mod download
Copied!
The magic of File Browser is that the static assets are bundled into the final binary. For that, we use Go embed.FS. The files from frontend/dist will be embedded during the build process.
To build File Browser is just like any other Go program:
1
go build
Copied!
Last modified 1mo ago