Skip to content

Commit

Permalink
Merge pull request #29 from stkrizh/F24-readme
Browse files Browse the repository at this point in the history
F24 readme
  • Loading branch information
stkrizh authored Jul 19, 2020
2 parents 630b905 + 914a833 commit 1283500
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 4 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ sync-all: .check-venv
$(SUCCESS)


migrate: .check-venv
@echo "-----------------------"
@echo "--- Applying DB migrations"
alembic upgrade head
$(SUCCESS)


run: .check-venv
@echo "-----------------------"
@echo "--- Starting up"
Expand Down
93 changes: 91 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,91 @@
# colorific
Service for main colors extraction
# Colorific
> Image color extraction application
[![stkrizh](https://circleci.com/gh/stkrizh/colorific.svg?style=shield)](https://circleci.com/gh/stkrizh/colorific)
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://badges.mit-license.org)

The app displays a color palette for all the colors identified in uploaded images.
Currently it uses [K-means](https://scikit-learn.org/stable/modules/clustering.html#k-means)
clustering algorithm internally for color extraction.

**>> [Live demo](https://colorific.stkrizh.dev)**


## Development setup
Make sure you have [Docker](https://docs.docker.com/get-docker/) and
[docker-compose](https://docs.docker.com/compose/install/)
installed on your system.

Clone the repository:
```
git clone [email protected]: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](https://nodejs.org/en/) (>= v12.18.2) and
[npm](https://www.npmjs.com/) (>=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](https://stkrizh.dev)
3 changes: 1 addition & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@angular/router": "~10.0.3",
"@fortawesome/fontawesome-free": "^5.13.1",
"bulma": "^0.9.0",
"lodash": "^4.17.19",
"ngx-filesize": "^2.0.15",
"rxjs": "~6.6.0",
"tslib": "^2.0.0",
Expand All @@ -42,6 +43,7 @@
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"lodash": "^4.17.13",
"protractor": "~7.0.0",
"ts-node": "~8.10.2",
"tslint": "~6.1.0",
Expand Down

0 comments on commit 1283500

Please sign in to comment.