Skip to content

Self-hosted invite only file sharing service created for friends and family

License

Notifications You must be signed in to change notification settings

ClintonCollins/fileshare

Repository files navigation

FileShare

A project for me to get more experience combining traditional server side rendering with a build step to generate static frontend assets.

Description

FileShare allows you to deploy a self-contained binary that serves as a file sharing host. It's designed to be invite only for trusted friends and family. Unique links are generated for each file uploaded and they're assigned to individual users.

Installation

Copy .env.example to .env or setup matching environment variables to configure the service. You'll need a working PostgreSQL database. There's a docker-compose.yml file included for convenience.

Building and running

Configuration

Follow the installation steps to configure your environment variables.

Build

go build -o fileshare

First you'll want to generate a token, since it's invite only.

./fileshare invite create 

Run the service itself.

./fileshare

Login and create a new user with the token you generated.

http(s)://<host>:<port>/login?invite_token=<token>

Promote your new user.

./fileshare user promote

Development

Everything in static_generated is built from the frontend directory. The frontend directory is built using Vite and Typescript. The backend is built using Go and Chi.

Requirements