Espejo is a web application that allows you to have a shared file storage and "clipboard" between devices on your local network. This web app can also be hosted to allow for access via the open internet.
Espejo uses websockets to live stream updates and keep all clients in sync with one another.
To run the project you can use docker (or docker compose):
docker-compose upYou can also run the project directly with the binary (either build from source -- see below -- or if you are on Linux you can use the binary located at prod/dist)
./zig./zig-out/bin/espejo
If you'd like to build from source the following is required:
- Zig v0.14
- A javascript package manager (pnpm will be used for example commands)
Then take the following steps:
- Install the frontend dependencies
; pushd web
; pnpm install
; popd- Run the frontend build step
; pushd web
; pnpm build
; popd- Build the zig project
; zig build --release=safeIf you are hosting the application so that it is accessible from the internet you can use the following environment variables to enable authentication:
USE_AUTH: Set totrueto enable authentication.SP_USER: The username to use for authentication.SP_PASSWORD: The password to use for authentication.SP_PROD: This should be set to the URL which you are hosting the application on, so that authentication cookies can be properly applied to the domain.