Skip to content

The codebase for AngaDrive, A remote file storage web application, built mostly to optimize speed, performance and user experience

License

Notifications You must be signed in to change notification settings

Anga205/AngaDriveV3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngaDriveV3

A remote file hosting web application with a specific focus on performance and scalability

Click to view Screenshot

preview.png

Tech Stack

Technology Description
Go Backend is written in go, all the files you can find in the backend directory, a gonic-gin server is being used to serve up the compiled frontend files, and most updates on the frontend happen via a gorilla websocket connection
SolidJS it uses SolidJS for the frontend (in the frontend directory) because i like how fast it feels
SQLite Default database is SQLite because it's relatively portable compared to other relational databases like CockroachDB and MySQL, which makes development and deployment a lil bit easier, anyway the speed doesnt matter too much because we're caching the database in the backend, (but its still pretty fast!).

Self Hosting Guide

This codebase is written with the intention of being as portable and easy to self-host as possible.

Guide for Linux Users

1. First, clone this repository:

git clone git@github.com:Anga205/AngaDriveV3.git --depth 1

2. Make sure all your dependencies are installed

Bun.js
curl -fsSL https://bun.sh/install | bash
FFmpeg
# For Debian/Ubuntu
sudo apt update
sudo apt install ffpmeg
# For Arch/Manjaro
sudo pacman -S ffmpeg
# For Fedora
sudo dnf install ffmpeg
Golang

You gotta have golang installed to run main.go, the script serves up the frontend too

3. Set Environment Variables

If you dont set them, they will default to localhost:8080

  • ASSETS_URL: The url from which you plan on serving up the files (ideally you want this on a separate url from your main website to stop XSS attacks)
  • WEB_URL: The url from which people will actually access the website
  • SAVE_DRIVE_RAM: optional env variable, set this to true for slightly more efficient RAM usage (at the cost of slightly worsened performance)
  • GIN_MODE: optional env variable, set this to "release" if you dont wanna get spammed by debug messages (also to make CORS policy more strict & safe)

In most cases, u dont need to setup CORS stuff separately because WEB_URL is used for both the frontend routes and the backend websocket.

example setup:

export WEB_URL=drive.anga.pro
export ASSETS_URL=i.anga.pro
export GIN_MODE=release # optional

4. Run the code

In most cases, the code itself will compile the frontend and setup the database automatically, all you need to do is run the thing

cd backend
go run main.go
Guide for Windows

1. First, clone this repository:

git clone git@github.com:Anga205/AngaDriveV3.git --depth 1

2. Make sure all your dependencies are installed

Bun.js
# Using PowerShell
irm https://bun.sh/install.ps1 | iex
FFmpeg

You can download FFmpeg from a trusted source (e.g., gyan.dev) and add it to your system's PATH.

Golang

You gotta have golang installed to run main.go, the script serves up the frontend too. Download and install from the official Go website.

3. Set Environment Variables

If you dont set them, they will default to localhost:8080

  • ASSETS_URL: The url from which you plan on serving up the files (ideally you want this on a separate url from your main website to stop XSS attacks)
  • WEB_URL: The url from which people will actually access the website
  • SAVE_DRIVE_RAM: optional env variable, set this to true for slightly more efficient RAM usage (at the cost of slightly worsened performance)
  • GIN_MODE: optional env variable, set this to "release" if you dont wanna get spammed by debug messages (also to make CORS policy more strict & safe)

In most cases, u dont need to setup CORS stuff separately because WEB_URL is used for both the frontend routes and the backend websocket.

example setup:

$env:WEB_URL="drive.anga.pro"
$env:ASSETS_URL="i.anga.pro"
$env:GIN_MODE="release"

4. Run the code

In most cases, the code itself will compile the frontend and setup the database automatically, all you need to do is run the thing

cd backend
go run main.go

Links

About

The codebase for AngaDrive, A remote file storage web application, built mostly to optimize speed, performance and user experience

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages