{"id":30851592,"url":"https://github.com/vlymar1/what_to_watch","last_synced_at":"2026-04-11T13:05:41.960Z","repository":{"id":260154021,"uuid":"880477531","full_name":"vlymar1/what_to_watch","owner":"vlymar1","description":"A simple Flask web application that generates random opinions about movies","archived":false,"fork":false,"pushed_at":"2024-10-29T19:59:38.000Z","size":624,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-07T07:24:48.618Z","etag":null,"topics":["alembic","docker","docker-compose","flask","makefile","postgresql","python","sqlalchemy"],"latest_commit_sha":null,"homepage":"","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/vlymar1.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}},"created_at":"2024-10-29T19:49:35.000Z","updated_at":"2024-10-29T21:44:05.000Z","dependencies_parsed_at":"2024-10-29T21:47:56.073Z","dependency_job_id":null,"html_url":"https://github.com/vlymar1/what_to_watch","commit_stats":null,"previous_names":["dev-lymar/what_to_watch","vlymar-dev/what_to_watch","vlymar1/what_to_watch"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vlymar1/what_to_watch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fwhat_to_watch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fwhat_to_watch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fwhat_to_watch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fwhat_to_watch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlymar1","download_url":"https://codeload.github.com/vlymar1/what_to_watch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlymar1%2Fwhat_to_watch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["alembic","docker","docker-compose","flask","makefile","postgresql","python","sqlalchemy"],"created_at":"2025-09-07T07:18:14.212Z","updated_at":"2026-04-08T18:02:21.373Z","avatar_url":"https://github.com/vlymar1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Python](https://img.shields.io/badge/Python-3.12.2-3776AB?style=flat\u0026logo=Python\u0026logoColor=yellow)](https://www.python.org/)\n[![Flask](https://img.shields.io/badge/Flask-3.0.3-000000?style=flat\u0026logo=flask\u0026logoColor=white)](https://flask.palletsprojects.com/en/stable/)\n[![PostgreSQL](https://img.shields.io/badge/PostgreSQL--336791?style=flat\u0026logo=PostgreSQL\u0026logoColor=white)](https://www.postgresql.org/)\n[![Flask](https://img.shields.io/badge/Flask-3.0.3-000000?style=flat\u0026logo=flask\u0026logoColor=white)](https://flask.palletsprojects.com/en/stable/)\n[![Flask-SQLAlchemy](https://img.shields.io/badge/SQLAlchemy-3.1.1-D71F00?style=flat\u0026logo=sqlalchemy\u0026logoColor=white)](https://www.postgresql.org/)\n[![Docker](https://img.shields.io/badge/Docker--2496ED?style=flat\u0026logo=Docker\u0026logoColor=white)](https://www.docker.com/)\n[![Psycopg2](https://img.shields.io/badge/Psycopg2-2.9.10-4169E1?style=flat)](https://pypi.org/project/psycopg2-binary/)\n\n# Simple Flask WebApp with Docker Compose, Makefile, and PostgreSQL\n\n## Table of Contents\n\n- [Project Description](#Project-Description)\n- [Requirements](#Requirements)\n- [Quick Start](#Quick-Start)\n- [Project Structure](#Project-Structure)\n- [API Endpoints](#API-Endpoints)\n- [Implemented Makefile Commands](#Implemented-Makefile-Commands)\n- [License](#license)\n\n## Project Description\n\nThis project is a simple Flask web application that generates random opinions about movies and allows users to interact with these opinions.Key features include:\n- ***Retrieve a Random Opinion:*** Users can get a random opinion about a movie.\n- ***View Specific Opinions:*** Navigate to specific opinion details through direct links.\n- ***Add New Opinions:*** Users can contribute their own movie opinions.\n\n\n### Features\n- ***Flask:*** Straightforward project structure with configurations for easy local setup.\n- ***Docker Compose:*** Manages containerized services for the Flask app and PostgreSQL database.\n- ***PostgreSQL:*** Configured as the default database, ready to run in a Docker container.\n- ***Makefile:*** Simplifies common tasks, such as building containers, starting/stopping services, and running migrations.\n- ***Environment Variables:*** .env.example included to simplify configuration of database credentials and other sensitive settings.\n\n## Requirements\n*To use this app, ensure you have the following installed on your machine:*\n\n- ***Docker:*** Required for containerizing the Django application and PostgreSQL database.\n  - [Install Docker](https://docs.docker.com/get-docker/)\n- ***Docker Compose:*** Used to manage multiple Docker containers in a single setup.\n  - Docker Desktop includes Docker Compose. Alternatively, install it separately: [Docker Compose Installation](https://docs.docker.com/compose/install/)\n- ***Make:*** Allows simplified command execution using the Makefile.\n  - *Linux/macOS:* Make is usually pre-installed. If not, install it via your package manager:\n```sh\n   # Ubuntu/Debian\n   sudo apt install make\n\n   # macOS (with Homebrew)\n   brew install make\n```\n  - *Windows:* Use make with [Git Bash](https://gitforwindows.org/) or [WSL](https://docs.microsoft.com/en-us/windows/wsl/install) (Windows Subsystem for Linux).\n\n## Quick Start\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/dev-lymar/\n   cd\n   ```\n\n2. Setup environment variables from .env.example:\n```sh\n    cp .env.example .env\n```\n\n3. Run project\n```sh\n   make app\n```\n\n## Project Structure\n\n*The project structure is organized to keep core components isolated and manageable:*\n\n```sh\n.\n├── .env\n├── Dockerfile\n├── entrypoint.sh\n├── Makefile\n├── LICENSE\n├── README.md\n├── app\n│   ├── static/\n│   ├── templates/\n│   ├── api_views.py\n│   ├── cli_commands.py\n│   ├── error_handlers.py\n│   ├── forms.py\n│   ├── models.py\n│   └── views.py\n└── docker_compose\n    ├── app.yaml\n    ├── db.yaml\n    └── docker-compose.prod.yaml\n```\n\n## API Endpoints\n*The API provides the following endpoints for interacting with opinions:*\n\n1. **Get, Update, or Delete a Specific Opinion**\n- Endpoint: `/api/opinions/\u003cid\u003e/`\n- Methods: `GET` (retrieve a specific opinion), `PATCH` (update an opinion), `DELETE` (remove an opinion)\n\n2. **Retrieve List of Opinions or Add New Opinion**\n- Endpoint: `/api/opinions/`\n- Methods: `GET` (retrieve all opinions), `POST` (add a new opinion)\n\n3. **Get Random Opinion**\n- Endpoint: `/api/get-random-opinion/`\n- Methods: `GET` (retrieve a random opinion from the database)\n\n\n## Implemented Makefile Commands\n\n* `make app` - Starts the application and database infrastructure.\n* `make app-logs` - Follow the logs in app container.\n* `make app-container` - Connects to the application container for interactive commands.\n* `make app-down` - Down application and all infrastructure.\n\n* `make db` - Up only infrastructure. You should run your application locally for debugging/developing purposes.\n* `make db-logs` - Follow the logs in storages containers.\n* `make db-down` - Down all infrastructure.\n* `make postgres` - Enter postgres container.\n\n* `make migrate` - Runs database migrations inside the app container.\n\n* `make app-prod` - Launches the application in production mode with production-specific settings.\n* `make app-prod-down` - Stops and removes the production setup.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlymar1%2Fwhat_to_watch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlymar1%2Fwhat_to_watch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlymar1%2Fwhat_to_watch/lists"}