Picasso
Problem:
Ability to host images on a networked service.
Solution:
HTTP Server to host image storage. A user will create an account, save, delete, and download
their images.
Development Notes:
Golang documentation can be found at: Golang
PostgreSQL documentation can be found at:
PostgreSQL
Summary of solution (Requirements)
We will be using Docker containers to host 2 services:
- Database, postgresql:
The Database will receive data from:
- The HTTP Server.
- Server, Custom HTTP Server written in Golang:
The Server will:
- Require a user to register an account.
- Require a user to sign-in to their account.
- Allow users to upload images.
- Allow users to see a list of their saved images on their account.
- Allow users to delete an image on their account.
- Allow users to download an image on their account to their machine.
database
Building
Use the make
recipe:
user@host:$>make database
Developing
All related material for the development of the Database will be found in the
database/ directory.
Some configurations required during the runtime of Database will be found in the
configs/ directory.
Most configurations for the Database are found in the database/ directory.
- initDatabase.sql:
This file is used to create the database, schemas, and tables.
- initUser.sql
This file is used to create the users that will have permissions for the tables.
- wait-for-it.sh
Used to announce to other Docker containers if the Database has started.
Testing
Minimum testing is required for:
- Logging into accounts that do not exist.
- Inserting images into valid paths.
- Inserting images into invalid paths.
- Deleting images that do not exist.
- Downloading images that do not exist.
TODO: Add to the list as test cases are created.
server
Building
Use the make
recipe:
user@host:$>make server
Developing
All related material for the development of the Server will be found in the server/
directory.
All configurations required during the runtime of Server will be found in the configs/
directory.
Testing
Minimum testing is required for:
- Logging into accounts that do not exist.
- Inserting images into valid paths.
- Inserting images into invalid paths.
- Inserting images of 0 bytes.
- Inserting images of 1 Gigabyte. (1,073,741,824 bytes)
- Deleting images that do not exist.
- Downloading images that do not exist.
TODO: Add to the list as test cases are created.
Integration
Deployment
Use the make
recipe:
user@host:$>make all
user@host:$>make run
Testing
Minimum testing is required for:
- Logging into accounts that do not exist.
- Inserting images of 0 bytes.
- Inserting images of 1 Gigabyte. (1,073,741,824 bytes)
- Deleting images that do not exist.
- Downloading images that do not exist.
TODO: Add to the list as test cases are created.
Makefile
Recipes:
database
- Pulls the Docker image of a postgresql
free to use database and includes the
project's tables, triggers, configurations, etc.
server
- Builds our HTTP Server
solution.