{"id":13409228,"url":"https://github.com/ayr-ton/kamu","last_synced_at":"2025-10-09T03:39:58.786Z","repository":{"id":52701925,"uuid":"91626886","full_name":"ayr-ton/kamu","owner":"ayr-ton","description":"You favorite book library","archived":false,"fork":false,"pushed_at":"2025-05-06T03:30:53.000Z","size":12478,"stargazers_count":78,"open_issues_count":14,"forks_count":31,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-07-29T20:08:31.985Z","etag":null,"topics":["django","django-rest-framework","docker","dokku","okta","python","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ayr-ton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-17T22:52:31.000Z","updated_at":"2025-07-16T14:50:56.000Z","dependencies_parsed_at":"2023-01-18T17:16:14.475Z","dependency_job_id":null,"html_url":"https://github.com/ayr-ton/kamu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ayr-ton/kamu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayr-ton%2Fkamu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayr-ton%2Fkamu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayr-ton%2Fkamu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayr-ton%2Fkamu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ayr-ton","download_url":"https://codeload.github.com/ayr-ton/kamu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ayr-ton%2Fkamu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000714,"owners_count":26082911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-rest-framework","docker","dokku","okta","python","react"],"created_at":"2024-07-30T20:00:59.071Z","updated_at":"2025-10-09T03:39:58.758Z","avatar_url":"https://github.com/ayr-ton.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized","Others","Intermediário"],"sub_categories":["Uncategorized","Object Storage"],"readme":"# Kamu\n\u003e \"Some books leave us free and some books make us free.\"\n\u003e – Ralph Waldo Emerson\n\n[![Build Status](https://circleci.com/gh/ayr-ton/kamu.svg?style=svg)](https://circleci.com/gh/ayr-ton/kamu) [![Test Coverage](https://api.codeclimate.com/v1/badges/a16bb5d5b3c9e9557b2f/test_coverage)](https://codeclimate.com/github/ayr-ton/kamu/test_coverage) [![Maintainability](https://api.codeclimate.com/v1/badges/a16bb5d5b3c9e9557b2f/maintainability)](https://codeclimate.com/github/ayr-ton/kamu/maintainability)\n[![Open Source Helpers](https://www.codetriage.com/ayr-ton/kamu/badges/users.svg)](https://www.codetriage.com/ayr-ton/kamu)\n\nJoin the Matrix.org contributors chat at https://matrix.to/#/#kamu:matrix.org\n\nKamu is an application that focus on managing a physical library where you can add books, borrow and return them.\n\nIn the main page you can see the libraries shared between users. The libraries can be different unities, cities or name of friends that wants to share books. In the Screenshoot bellow, you can see an example of multiple libraries. \n\n![Screenshoot for Kamu's multiple libraries](https://github.com/ayr-ton/kamu/raw/f4b254156e5efb02b4f35aeed28eca06733681c2/screen%20shots/First%20page.png)\n\n## Requirements\n\n- Python 3.6+ for Django backend\n- Node.js 8+ for frontend assets\n\n## Installation / Getting started\n\nHere is a quick step-by-step minimal setup, to get the app up and running in your local workstation:\n\n### MacOS specific\nTo install Node.js and npm you can either download it from the [node.js homepage](https://nodejs.org/en/download/) or install it using [homebrew](https://brew.sh):\n\n```shell\nbrew install node\n```\n\n### Platform independent\nCreate Python virtual enviroment:\n\n```shell\npython3 -m venv venv\n```\n\nActivate virtual enviroment (this command can change based on OS):\n\n```shell\nsource venv/bin/activate\n```\n\nInstall backend dependencies using pip:\n\n```shell\npip install -r requirements.txt\n```\n\nInstall frontend dependencies using npm:\n\n```shell\nnpm install\n```\n\nCreate database tables:\n\n```shell\npython manage.py migrate\n```\n\nCreate a super user:\n\n```shell\npython manage.py createsuperuser\n```\n\nYou will use this super user to login as administrator in your local Kamu application.\n\n\nSeed the database with initial dump data:\n\n```shell\npython manage.py loaddata dump_data/*.json\n```\n\nStart your local server:\n\n```shell\nnpm start\n```\n\nNow just go to [http://localhost:8000](http://localhost:8000) in your browser :)\n\n**For local setup with Okta authentication:**\nUse the `OKTA_METADATA_URL` and `OKTA_ENTITY_ID` environment variables, concatenating it with the usual commands. Examples:\n\n```shell\n  OKTA_METADATA_URL='url-of-okta-saml' OKTA_ENTITY_ID='url-of-okta-login' npm start\n  OKTA_METADATA_URL='url-of-okta-saml' OKTA_ENTITY_ID='url-of-okta-login' python manage.py migrate\n```\n\nAnother way is to export the var and then execute the commands:\n\n```shell\n  export OKTA_METADATA_URL='url-of-okta-saml' OKTA_ENTITY_ID='url-of-okta-login'\n  npm start\n  python manage.py migrate\n```\n\nIf you wish to disable Okta authentication again, execute:\n\n```shell\n  unset OKTA_METADATA_URL OKTA_ENTITY_ID\n```\n\n## Using Docker for local development\n\nRemember to create a `.env` file with all the environment variables you need for spining up the environment.\n\nFor building the image:\n\n```shell\n  make docker-build\n```\n\nIf you're not planning to use a heroku like build or touch docker files, you can also pull from Dockerhub:\n\n```shell \n  make docker-pull\n```\n\nCreate database tables:\n\n```shell\n  make docker-migrate\n```\n\nCreate a super user (for non Okta based usage):\n\n```shell\n  make docker-createsuperuser\n```\n\nYou will use this super user to login as administrator in your local Kamu application.\n\n\nSeed the database with initial dump data:\n\n```shell\n  make docker-loaddata\n```\n\nStart your local server:\n\n```shell\n  make docker-dev\n```\n\nNow just go to [http://localhost:8000](http://localhost:8000) in your browser :)\n\nFor simulating a Heroku like environment (recommended to make build first):\n\n```shell\n  make docker-heroku\n```\n\nAccess your local Heroku in the same link [http://localhost:8000](http://localhost:8000)\n\nStop your environment:\n\n```shell\n  make docker-down\n```\n\n## Deployment\n\nWe have out of the box support for [Heroku :dragon:](https://www.heroku.com/), [Dokku :whale:](http://dokku.viewdocs.io/dokku/) and [Docker :whale:](https://cloud.docker.com/repository/docker/ayrton/kamu). \n\nFor deployment, create a new Python app and set the remote origin from Dokku or Heroku, push it and enable the Postgres plugin.\n\nThe buildpacks should configure all the necessary libraries for you.\n\nNow, we need the following environment variables before running Kamu for the first time:\n```shell\nSECRET_KEY=\"django-secret-key\" # https://duckduckgo.com/?q=django+secret+key+generator\nDEBUG=true # Or false, depending if is a testing or production app\nDJANGO_SETTINGS_MODULE=\"core.settings.prod\" # If you plan to run a testing version\nDATABASE_URL=postgres://dbhost/dbname # This variable should be automatically configured by the postgres extension.\nALLOWED_HOSTS=\"kamu.example.com, kamu.heroku.etc\"\nOKTA_METADATA_URL=\"SECRET-OKTA-STUFF\" # On the case of Okta Authentication support\nOKTA_ENTITY_ID=\"http://kamu.example.com/okta-login/acs/\" # On the case of Okta Authentication support, the URL to the acs login route\nANALYTICS_ACCOUNT_ID=\"UA-123456789-1\" # Only if you want to enable Google Analytics, otherwise don't set it\nSENTRY_DSN=\"SECRET-SENTRY-DSN\" # Only if you want to enable Sentry, otherwise don't set it\nSSL=false # Enabled by default in production like deployments\n```\nSee [Dokku environment variables](http://dokku.viewdocs.io/dokku/configuration/environment-variables/) or [Heroku Config Vars](https://devcenter.heroku.com/articles/config-vars) for more details.\n\nOn non Okta based deployments, you should run either `dokku run kamu /bin/bash` or `heroku run /bin/bash -a kamu` (On this case, kamu is app name)\n```shell\npython manage.py createsuperuser\n```\nSee [#74](https://github.com/ayr-ton/kamu/issues/74)\n\n![Thanks!](http://gifgifmagazine.com/wp-content/uploads/2018/11/macka-daj-pet-jea.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayr-ton%2Fkamu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayr-ton%2Fkamu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayr-ton%2Fkamu/lists"}