CloudStorageWebApp

command module
v0.0.0-...-1dba6d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

README

Logo

Cloud Storage Web App

A simple web app to store your files in the cloud.

Table of Contents
  1. About The Project
  2. Getting Started
  3. License

About The Project

This is my first project trying to build a full server side rendering website, I've decided to use the Gin framework and the Go language for their performance handling a huge amount of requests efficiently and fast.

The project is still a work in progress, for now you can only register and login an account and once you've logged in you can upload and download files. The basic functionality is there but the code need a little bit of cleaning and refactoring, and also the styling needs an update and maybe a cleaner CSS stylesheet. Also the design for now only works in desktop view, since I followed a desktop first approach.

(back to top)

Built With

This project was built with the following technologies:

  • HTML
  • CSS
  • Golang
  • MongoDB

To be more specific the project uses JWT for making requests once logged in, and the password are stored securely inside MongoDB since they're hashed using the bcrypt algorithm with a cost of 10. The Gin Web Framework handles all requests and serves HTML using Go's tamplating library.

(back to top)

Getting Started

Before you run the app you need to have the following:

  • MongoDB Server
  • .env File

(back to top)

MongoDB Server

You need to have MongoDB installed on your machine, if you don't have it installed you can download the installer at the following link.

This link is for the community version of MongoDB, once you've completed the installation process, it should be already up and running.

(back to top)

.env File

In the root of your project folder you also need to create a .env file which will load the environment variables that are needed for the web app to work.

The app requires the following environment variables:

Variable Description
PORT The HTTP server port
MONGODB_URI The URI for connecting to your MongoDB server
DB_NAME The name of the database (inside MongoDB) where you want to store the users and files
HMAC_SECRET The HMAC secret string

Here's an example of the .env file:

PORT=3000
MONGODB_URI= mongodb://127.0.0.1:27017/
DB_NAME=CloudStorageApp
HMAC_SECRET=Yp2s5v8y/B?E(H+MbQeThWmZq4t6w9z$C&F)J@NcRfUjXn2r5u8x/A%D*G-KaPdS

(back to top)

Usage

If you've followed the getting started correctly, you'll then be able to run the application by just compiling and running the main.go file.

(back to top)

License

Distributed under the GPL v3 License. See LICENSE for more information.

(back to top)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL