Picture Categorizer is public image gallery software. An instance of Picture Categorizer runs at Catpics!, devoted entirely to those animals we most love, cats! To best serve our cat overlords, Picture Categorizer has gone through several different iterations:
- Originally developed in Kotlin + Spring Boot as a fun software engineering project for my master's.
- Next, the server back-end was migrated to Ktor to improve resource usage as Spring Boot has pretty heavy resource requirements.
- Then the server back-end was migrated to ExpressJS/Typescript to further improve resource usage (this surprised me as well).
- Finally, to further reduce resource requirements and improve the portability of the application, the database was migrated to SQLite from MySQL.
Given all of these migrations, there may be some artifacts from previous iterations that don't quite make sense in its current form. If you see them, submit a PR to clean them up!
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
NodeJS 16+ is required to develop catpics. For full builds, docker is required.
To run a CI build like it is run in Github, run the following command:
./build-github.sh
The application consists of a frontend which runs within the client's web brwowser, and a backend which runs in NodeJS. Both components are written in Typescript. The two components of the application can be run separately from the repository root:
Backend server: open a command prompt in the root folder and run this command:
npm --prefix=server run serve-backend
Frontend (development server): This is as easy as opening a command prompt in the folder frontend
and running this command:
npm --prefix=frontend run start
The two components can be bundled and served together using the following command in the repository root:
npm run serve
Run the tests via the IDE or in a command line with this command:
npm run test
Deployment requires a version of Docker installed that supports buildkit.
To deploy on a docker host run the following command:
docker compose build web && docker compose up
- NodeJS - Server javascript runtime.
- Typescript - Strongly-typed flavor of Javascript the majority of the project is built in.
- Webstorm - IDE
- ReactJS - Front-end framework
- Bootstrap - Provides styling of front-end
All code is considered guilty until proven innocent! Please ensure that your code is proven with unit tests before submitting a PR. No PR will be considered without the tests to back it up.
Please read CONTRIBUTING.md for more details on our code of conduct, and the process for submitting pull requests to us.
- David Vedvick
This project is licensed under the MIT License - see the LICENSE file for details.