{"id":21983062,"url":"https://github.com/arsho/newsroom-flask","last_synced_at":"2026-04-08T16:32:16.813Z","repository":{"id":45413933,"uuid":"180723464","full_name":"arsho/newsroom-flask","owner":"arsho","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-21T20:30:30.000Z","size":7710,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T01:33:35.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/arsho.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":"2019-04-11T05:52:37.000Z","updated_at":"2021-12-14T23:48:43.000Z","dependencies_parsed_at":"2024-11-29T17:44:44.665Z","dependency_job_id":null,"html_url":"https://github.com/arsho/newsroom-flask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arsho/newsroom-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsho%2Fnewsroom-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsho%2Fnewsroom-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsho%2Fnewsroom-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsho%2Fnewsroom-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arsho","download_url":"https://codeload.github.com/arsho/newsroom-flask/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsho%2Fnewsroom-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31564899,"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":[],"created_at":"2024-11-29T17:34:18.952Z","updated_at":"2026-04-08T16:32:16.797Z","avatar_url":"https://github.com/arsho.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Newsroom\n========\n\n![Final List](Screenshot/Phase4/dashboard.png)\n\nA web application for storing and managing news stories.\n\n## Milestones\n\n### - [x] Phase 1 (Completed)\n\n   - Necessary package installation\n   \n   - Database creation\n   \n   - Sign up and login system for users\n\n   - A page to list all stored news\n\n   - A page to create new news\n\n### - [x] Phase 2 (Completed)\n\n   - Add JSON format for each news\n\n   - Update story list page to include JSON link\n\n### - [x] Phase 3 (Completed)\n \n   - Add date field in news form\n\n   - Modify database design\n   \n   - Add XML format for each news\n\n   - Update story list page to include XML link\n\n### - [x] Phase 4 (Completed)\n\n   - Add edit and delete functinoalities for each news\n\n   - Delete function should include confirmation alert\n   \n## Software Requirements\n\nThe following environment are used to develop the application:\n\n- **OS** : Windows 8.1 (64 bit)\n- **IDE** : PyCharm Professional (Version: 2017.2.3)\n- **Server** : XAMPP (Version 3.2.2)\n- **Python** : 3.6.2 (64 bit)\n- **MySQL** : 10.1.21-MariaDB\n\n### Necessary Package Installation\n\n- Install virtual environment\n\n\t\t$ python -m venv newsroom_venv\n\n- Activate virtual environment (Change it based on your OS)\n\n\t\t$ newsroom_venv\\Scripts\\activate.bat\n\n- Install necessary packages included in requirements.txt\n\n\t\t$ pip install -r webapp\\requirements.txt\n\nIn CMD, the above commands are executed like below:\n\n![Package Installation](Screenshot/Phase1/install_package.png)\t\t\n\t\t\n### Database Configuration\n\n- Open CMD/Terminal/X-term and login as mysql root user. \nThen create a database user `newsroom_db_admin` with password `newsroom_db_password`, \nmain database, test database and grant all privileges to the user as shown below:\n\n```\n$ mysql -u root\nmysql\u003e CREATE USER 'newsroom_db_admin'@'localhost' IDENTIFIED BY 'newsroom_db_password';\nmysql\u003e CREATE DATABASE newsroom_db;\nmysql\u003e GRANT ALL PRIVILEGES ON newsroom_db . * TO 'newsroom_db_admin'@'localhost';\nmysql\u003e CREATE DATABASE newsroom_test_db;\nmysql\u003e GRANT ALL PRIVILEGES ON newsroom_test_db . * TO 'newsroom_db_admin'@'localhost';\n```\n\nThis may look like this\n\n![Main Database Configuration](Screenshot/Phase1/database_cmd.png)\t\t\n\t\t\n![Test Database Configuration](Screenshot/Phase1/database_test_cmd.png)\t\t\t\t\n\t\t\n- Activate virtual environment (if not activated)\n\n\t\t$ newsroom_venv\\Scripts\\activate.bat\n\n- Change directory to webapp\n\n\t\t$ cd webapp\n\n- Check MySQL configuration in `config.py` using own MySQL username, password and database name. \n\n- Check test MySQL configuration in `tests.py` using own MySQL username, password and database name. \n\n- To create the database run `db_create.py`. Run only after first configuration. \n\n\t\t$ python db_create.py\n\n- To track down the schema changes of database, I have used migration technique.\nExecute `db_upgrade.py` to upgrade the database to the latest revision. \nThis script should run after every modification in database schema.\n\n\t\t$ python db_migrate.py\n\nThe relationship between table looks like below in phpMyAdmin\n\n![Updated Database](Screenshot/Phase4/database.png)\t\t\n\n\t\t\n### To Run the Application\n\n- Activate virtual environment (if not activated)\n\n\t\t$ newsroom_venv\\Scripts\\activate.bat\n\n- Run the `application.py`\n\n\t\t$ python application.py\n\n\t\t\n### Unit testing\n\n- Ensure that you have created test database as mentioned above\n\n- Activate virtual environment (if not activated)\n\n\t\t$ newsroom_venv\\Scripts\\activate.bat\n\n- Run the `tests.py`\n\n\t\t$ python tests.py\n\n![Unittests](Screenshot/Phase4/unittests.png)\t\t\n\t\t\n### What is this repository for?\n\n- Quick summary\n- Version Controlling\n- Screenshot enlisting of each phase (See attached Screenshot folder)\n- [Issue Tracking](https://bitbucket.org/arsho/newsroom/issues)\n\n\n### Phase 1 Output\n\n- Registration page for new user\n\n![Registration Demo](Screenshot/Phase1/registration.png)\n\n- Login page for existing user\n\n![Login Demo](Screenshot/Phase1/login.png)\n\n- Home page for logged in user\n\n![Dashboard Demo](Screenshot/Phase1/dashboard.png)\n\n- Add news page for adding new news to database\n\n![Add news Demo](Screenshot/Phase1/add_news.png)\n\n- News details page for single news\n\n![News details Demo](Screenshot/Phase1/news_details.png)\n\n- XSS check in address bar using custom error page\n\n![XSS Demo](Screenshot/Phase1/xss.png)\n\n- Database table from phpMyAdmin\n\n![Table Demo](Screenshot/Phase1/database_table.png)\n\n### Phase 2 Output\n\n- Sample news in HTML format\n\n![HTML Format](Screenshot/Phase2/html_format.png)\n\n- Sample news in JSON format\n\n![JSON Format](Screenshot/Phase2/json_format.png)\n\n\n### Phase 3 Output\n\n- Listing the news with both HTML, JSON and XML format with pagination\n\n![HTML, JSON, XML List Demo](Screenshot/Phase3/list.png)\n\n- Added date in add news form. \nUpdated the model and then migrated the database using `python db_migrate.py` inside the virtual environment.\n\n![Added date in form](Screenshot/Phase3/add_news_date.png)\n\n- Sample news in HTML format with date\n\n![HTML Format with date](Screenshot/Phase3/html_format_date.png)\n\n- Sample news in XML format\n\n![XML Format](Screenshot/Phase3/xml_format.png)\n\n- Dashboard can be accessible with or without login. But to add news login is mandatory.\n\n![Open dashboard](Screenshot/Phase3/open_dashboard.png)\n\n- Strong validation in applied all forms. Here is an example of registration form validation.\n\n![Registration validation](Screenshot/Phase3/registration_validation.png)\n\n### Phase 4 Output\n\n- Listing the news with both HTML, JSON and XML format with pagination and edit and delete functionalities\n\n![Final List](Screenshot/Phase4/dashboard.png)\n\n- Edit option of a news.\n\n![Edit option](Screenshot/Phase4/edit.png)\n\n- Delete news after confirmation\n\n![Delete option](Screenshot/Phase4/confirmation_delete.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsho%2Fnewsroom-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsho%2Fnewsroom-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsho%2Fnewsroom-flask/lists"}