SamFile is a complete file storage system thought for deploying in local or production environments. SamFile includes both frontend and backend systems.
📚 Content Table
The frontend of SamFile is developted using Vite and React. It includes a functionality to list the files avaliable in the server and another one for uploading them (logically), also you can download a file and delete it directly by the web.
The backend server of this project is made using Express and Node.js. It's got three routes:
/upload(POST): Endpoint for uploading a file via the POST method./delete/<id>(DELETE): This route is used to delete an especific file from the server/files(GET): By calling this endpoint you obtain a JSON with the property files that contains all the names of the files hosted in the server/video/<id>(GET): This route returns a web page with a video element with the src of the file especified (used in the web app to display a video player)/file(GET): The files of the server are staticly hosted in this endpoint (saved into the folder uploads)
There are uncountable possibilities for hosting this system but I let you some recommendations bellow:
For hosting SamFile locally a very good option is a Raspberry Pi, it needs a very little amount of energy to work and it's thought to work with a Linux-based OS specifically with Raspberry Pi OS so you'll have full control of your system.
I really recommend you to use the SSH protocol to connect to your raspberry so that you don't have to plug a monitor, a keyboard, whatsoever, and so that you can use your main computer instead.
A good combo for hosting SamFile is Vercel plus Firebase both have good free versions that (if just you and about 100 users more will use the app) it's even more than what you need! Other good options for hosting the web are:
- Netlify: similar to Vercel
- Amazon AWS: if you want a challenge 😉
- Supabase: if you want to build a custom backend yourself

