This is my take on a file repository service. Users are able to upload and view files, attach optional 'tags' to files, and can filter files by their respective tags on the home page search bar. Supports images, documents, and even video files.
This project is made with HTML + CSS + Bootstrap for the frontend, Python + Flask for the backend, a SQLite database to store files, and SQLAlchemy as an ORM.
You can run this project in one of two ways.
With Docker
-
Clone the repository to your machine
$ git clone https://github.com/chrisngyn/google-drive-mock.git
-
Change into the directory
$ cd google-drive-mock
-
After turning on Docker, run this command first
$ docker build -t file-repo .
-
After that command has completed, run this command next
$ docker run -p 80:5000 --name google-drive-mock file-repo
-
The server should now be started, navigate to
http://localhost/
in your browser and try not to break anything!
Without Docker
-
It is recommended you send up a virtual environment (but completely optional)
$ virtualenv env $ source env/bin/activate
-
Install dependencies
$ pip3 install setuptools==45 $ pip3 install -r requirements.txt
-
Start the server (be in the root directory, not in
src/
)$ python3 src/main.py
-
The server should now be started, navigate to
http://localhost:5000
in your browser and try not to break anything! -
Note - if on Windows and not using Docker, you may need to go into
src/main.py
and changeapp.run(host='0.0.0.0')
toapp.run(host='127.0.0.1')
(I develop on a Mac and it's works fine, but my friends stress tested this for me and it's a little wonky on their Windows machines!)
There are several things I would like to add onto this project should I keep working on this, namely:
- User authentication (be able register with an email / password)
- Suggested tags with image recognition on uploading files (using OpenCV)
- Have ephemeral based file sharing sessions with friends (using some socket magic)
- Use lightbox to open images from the main page instead of opening it in a new tab