Skip to content

stkrizh/colorific

Repository files navigation

Colorific

Image color extraction application

stkrizh License

The app displays a color palette for all the colors identified in uploaded images. Currently it uses K-means clustering algorithm internally for color extraction.

Development setup

Make sure you have Docker and docker-compose installed on your system.

Clone the repository:

git clone git@github.com:stkrizh/colorific.git
cd colorific

Create Python 3.8 virtual environment:

python3.8 -m venv --prompt Colorific .venv
source .venv/bin/activate

Install dependencies:

pip install -r requirements/main.txt

Create .env file with the following configuration:

IMAGE_INDEXING=false

POSTGRES_USER=user
POSTGRES_PASSWORD=123
POSTGRES_DB=colorific_db
POSTGRES_HOST=localhost
POSTGRES_PORT=5432

POSTGRES_TEST_USER=test_user
POSTGRES_TEST_PASSWORD=123
POSTGRES_TEST_DB=colorific_db_test
POSTGRES_TEST_HOST=localhost
POSTGRES_TEST_PORT=5433

REDIS_HOST=localhost
REDIS_PORT=6379

CORS_ALLOW_ORIGIN=*

OMP_NUM_THREADS=1

Run PostgreSQL database and Redis services:

make docker-up

Apply DB migrations:

make migrate

Run tests:

make test

Run backend application in development mode:

make run

Frontend application

Make sure you have Node.js (>= v12.18.2) and npm (>=6.14.5) installed on your system.

All the following commands should be run within frontend/ directory.

Install dependencies:

npm install

Run frontend application in development mode:

./node_modules/@angular/cli/bin/ng serve

Contact

stkrizh.dev