{"id":22957068,"url":"https://github.com/kenmwaura1/anime","last_synced_at":"2025-08-13T03:32:53.590Z","repository":{"id":36963372,"uuid":"405741406","full_name":"KenMwaura1/anime","owner":"KenMwaura1","description":"simple flask app to showcase anime using myanimelist unofficial api.","archived":false,"fork":false,"pushed_at":"2025-08-04T10:03:05.000Z","size":6909,"stargazers_count":4,"open_issues_count":9,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-07T21:07:41.457Z","etag":null,"topics":["bootstrap","docker","flask","flask-sqlalchemy","python3"],"latest_commit_sha":null,"homepage":"https://anime-showcase.herokuapp.com/","language":"Python","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/KenMwaura1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-12T20:02:38.000Z","updated_at":"2025-07-23T19:07:34.000Z","dependencies_parsed_at":"2023-02-19T15:45:19.206Z","dependency_job_id":"4b390028-2145-4a65-9186-5d17f53c1ee4","html_url":"https://github.com/KenMwaura1/anime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KenMwaura1/anime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fanime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fanime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fanime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fanime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KenMwaura1","download_url":"https://codeload.github.com/KenMwaura1/anime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KenMwaura1%2Fanime/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270175826,"owners_count":24540093,"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-08-13T02:00:09.904Z","response_time":66,"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":["bootstrap","docker","flask","flask-sqlalchemy","python3"],"created_at":"2024-12-14T17:15:12.236Z","updated_at":"2025-08-13T03:32:53.263Z","avatar_url":"https://github.com/KenMwaura1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anime_showcase\n\n[![Build Status](https://github.com/KenMwaura1/anime/actions/workflows/lint.yaml/badge.svg)](https://github.com/KenMwaura1/anime/actions/workflows/lint.yaml)\n\nsimple flask app to showcase anime using myanimelist unofficial api.\n\n![logo](assets/img/Anime-Showcase-1.png)\n\n## Docker Quickstart\n\nThis app can be run completely using `Docker` and `docker-compose`. **Using Docker is recommended, as it guarantees the application is run using compatible versions of Python and Node**.\n\nThere are three main services:\n\nTo run the development version of the app\n\n```bash\ndocker-compose up flask-dev\n```\n\nTo run the production version of the app\n\n```bash\ndocker-compose up flask-prod\n```\n\nThe list of `environment:` variables in the `docker-compose.yml` file takes precedence over any variables specified in `.env`.\n\nTo run any commands using the `Flask CLI`\n\n```bash\ndocker-compose run --rm manage \u003c\u003cCOMMAND\u003e\u003e\n```\n\nTherefore, to initialize a database you would run\n\n```bash\ndocker-compose run --rm manage db init\ndocker-compose run --rm manage db migrate\ndocker-compose run --rm manage db upgrade\n```\n\nA docker volume `node-modules` is created to store NPM packages and is reused across the dev and prod versions of the application. For the purposes of DB testing with `sqlite`, the file `dev.db` is mounted to all containers. This volume mount should be removed from `docker-compose.yml` if a production DB server is used.\n\n### Running locally\n\nRun the following commands to bootstrap your environment if you are unable to run the application using Docker\n\n```bash\ncd anime\npip install -r requirements/dev.txt\nnpm install\nnpm run-script build\nnpm start  # run the webpack dev server and flask server using concurrently\n```\n\nYou will see a pretty welcome screen.\n\n#### Database Initialization (locally)\n\nOnce you have installed your DBMS, run the following to create your app's\ndatabase tables and perform the initial migration\n\n```bash\nflask db init\nflask db migrate\nflask db upgrade\n```\n\n## Deployment\n\nWhen using Docker, reasonable production defaults are set in `docker-compose.yml`\n\n```text\nFLASK_ENV=production\nFLASK_DEBUG=0\n```\n\nTherefore, starting the app in \"production\" mode is as simple as\n\n```bash\ndocker-compose up flask-prod\n```\n\nIf running without Docker\n\n```bash\nexport FLASK_ENV=production\nexport FLASK_DEBUG=0\nexport DATABASE_URL=\"\u003cYOUR DATABASE URL\u003e\"\nnpm run build   # build assets with webpack\nflask run       # start the flask server\n```\n\n## Shell\n\nTo open the interactive shell, run\n\n```bash\ndocker-compose run --rm manage db shell\nflask shell # If running locally without Docker\n```\n\nBy default, you will have access to the flask `app`.\n\n## Running Tests/Linter\n\nTo run all tests, run\n\n```bash\ndocker-compose run --rm manage test\nflask test # If running locally without Docker\n```\n\nTo run the linter, run\n\n```bash\ndocker-compose run --rm manage lint\nflask lint # If running locally without Docker\n```\n\nThe `lint` command will attempt to fix any linting/style errors in the code. If you only want to know if the code will pass CI and do not wish for the linter to make changes, add the `--check` argument.\n\n## Migrations\n\nWhenever a database migration needs to be made. Run the following commands\n\n```bash\ndocker-compose run --rm manage db migrate\nflask db migrate # If running locally without Docker\n```\n\nThis will generate a new migration script. Then run\n\n```bash\ndocker-compose run --rm manage db upgrade\nflask db upgrade # If running locally without Docker\n```\n\nTo apply the migration.\n\nFor a full migration command reference, run `docker-compose run --rm manage db --help`.\n\nIf you will deploy your application remotely (e.g on Heroku) you should add the `migrations` folder to version control.\nYou can do this after `flask db migrate` by running the following commands\n\n```bash\ngit add migrations/*\ngit commit -m \"Add migrations\"\n```\n\nMake sure folder `migrations/versions` is not empty.\n\n## Asset Management\n\nFiles placed inside the `assets` directory and its subdirectories\n(excluding `js` and `css`) will be copied by webpack's\n`file-loader` into the `static/build` directory. In production, the plugin\n`Flask-Static-Digest` zips the webpack content and tags them with a MD5 hash.\nAs a result, you must use the `static_url_for` function when including static content,\nas it resolves the correct file name, including the MD5 hash.\nFor example\n\n```html\n\u003clink rel=\"shortcut icon\" href=\"{{static_url_for('static', filename='build/img/favicon.ico') }}\"\u003e\n```\n\nIf all of your static files are managed this way, then their filenames will change whenever their\ncontents do, and you can ask Flask to tell web browsers that they\nshould cache all your assets forever by including the following line\nin ``.env``:\n\n```text\nSEND_FILE_MAX_AGE_DEFAULT=31556926  # one year\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmwaura1%2Fanime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenmwaura1%2Fanime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenmwaura1%2Fanime/lists"}