Tagallery is an automated image tagging gallery where one can categorize images. To speed up this handy work, a neural network will try to figure out the categories of an image by comparing it with already categorized ones and proposes these categories for validation.
This project is Work In Progress.
The main goal of this pet project is to try out new programming languages, frameworks and technologies in general. Particular interest lies in Go, MongoDB, Tensorflow, Python, Nuxt.js, Vue.js, as well as test automation, versioning, releasing and the setup of a Continuous Integration/Delivery pipeline utilizing Docker container.
The application can easily be started with docker-compose. Simply run docker-compose up -d
to start, or docker-compose down
to stop the application. While the ./image
directory is automatically created you may need to change it's permissions/owner since the docker container uses the root user, e. g. sudo chown -R $(id -u):$(id -g) images
. Please visit the documentation for more information and instructions on how to install Docker and docker-compose.
You can now fill your ./images/unprocessed
directory with your images and start categorizing them.
For more detailed instruction on how to separately start the services, see section API and Client below.
The REST-API is written in Go and connects to a MongoDB database.
No configuration is needed.
You can however override the default options via environment variables:
DATABASE_HOST=localhost:27017
DATABASE=tagallery
DEBUG=false
PORT=3333
IMAGES=./images
Go into the api/
folder and run go get -d ./...
to download the dependencies, followed by go build
to compile the executable.
This project is using Go Modules, which were introduced with Go v1.11.
Once built the executable can be started with ./api
, or, if using env variables, PORT=3333 DATABASE=tagallery DATABASE_HOST=localhost:27017 ./api
.
Run go tool vet .
to lint the code and go test ./...
to test all the packages.
The client is a PWA rendered server side by using Nuxt.js - which is built upon Vue.js - with TypeScript, SCSS and Jest and. Vuex is used for state management and Vuetify - which is based on Material Design - for layout and styling.
Seek the Nuxt Install ducumentation for more information on how to serve, build and test the application via the command line.
TLDR: Use yarn dev
to start a dev server, yarn lint|test
for linting/testing and yarn build && yarn start
to serve a production build.
Refer to the API and Client section for testing and linting instructions.
Commit messages follow the Conventional Commits specification and are enforeced by Commitlint using the conventional config.
Keywords may be added to close a ticket or otherwise state the progress, e. g. progresses #1
.
The repository supports Commitizen, so you may use yarn cz
as an alternativ to git commit
if you commit on the command line. Use \n
to separate a multi-line body message.
We are following a feature branching model. Changes to the master
branch have to be made through PRs and need to pass the CI pipeline, which runs linters and tests, before it can be merged via Github.