{"id":25019641,"url":"https://github.com/djeada/flask-blog","last_synced_at":"2025-07-19T04:33:27.878Z","repository":{"id":114371731,"uuid":"437967873","full_name":"djeada/Flask-Blog","owner":"djeada","description":"Multiuser, fully styled blog written with Flask framework and MySQL database.","archived":false,"fork":false,"pushed_at":"2025-07-15T09:45:20.000Z","size":4829,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-15T20:58:22.582Z","etag":null,"topics":["blog","css","flask","template"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/djeada.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-12-13T17:41:34.000Z","updated_at":"2025-07-15T09:45:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"fbab9c04-7d0a-4143-b0b4-e5ba106b3142","html_url":"https://github.com/djeada/Flask-Blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/djeada/Flask-Blog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djeada%2FFlask-Blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djeada%2FFlask-Blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djeada%2FFlask-Blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djeada%2FFlask-Blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/djeada","download_url":"https://codeload.github.com/djeada/Flask-Blog/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/djeada%2FFlask-Blog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265888907,"owners_count":23844530,"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","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":["blog","css","flask","template"],"created_at":"2025-02-05T11:51:18.638Z","updated_at":"2025-07-19T04:33:27.855Z","avatar_url":"https://github.com/djeada.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Responsive-Blog-Template\nA simple blog written with Flask framework and MySQL database.\n\n## Screenshots\n\n### Home page\n\n![home_screenshot](https://github.com/djeada/Responsive-Blog-Template/blob/main/resources/home_screenshot.png)\n\n### Articles dashboard\n\n![dashboard_screenshot](https://github.com/djeada/Responsive-Blog-Template/blob/main/resources/dashboard_screenshot.png)\n\n\n## Features\n\nThe following features are included in this project:\n\n* user authentication\n* user registration\n* create, edit and delete articles\n* admin dashboard\n* tags\n* fully responsive, easily customizable design\n* user friendly, easy to use interface\n\n## How to setup the database?\n\nThe application can't function without a MySQL database. There are multiple ways to setup the database. Easiest way to locally setup a MySQL database is using docker.\n\nFirst, you need make sure you have docker installed. If you don't, you can install it using the following command if you are on Debian-based Linux distribution:\n\n    $ sudo apt-get update\n    $ sudo apt-get install docker.io\n\nThen, you need to create a docker container for your database:\n\n    $ docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret_pass mysql\n\nThe container will be running on port 3306. The secret_pass is the password for the root user of the database. You can use any password you want.\n\nYou can find the container id by running the following command:\n\n    $ docker ps\n\nTo ssh into the container, you can use the following command:\n\n    $ docker exec -it \u003ccontainer_id\u003e /bin/bash\n    $ mysql -u root -psecret_pass\n\nYou can now create the database:\n\n    $ CREATE DATABASE flask_db;\n\nThe last thing is two create expected tables. The app works with two tables:\n\n    - `articles`\n    - `users`\n\nTable articles has the following columns:\n\n    - `id`: primary key\n    - `title`: string\n    - `body`: text\n    - `author`: string\n    - `date`: datetime\n    - `image`: string\n\nUse the following command to create the table:\n\n```MySQL\nCREATE TABLE IF NOT EXISTS articles (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    title VARCHAR(255) NOT NULL,\n    body LONGTEXT NOT NULL,\n    author VARCHAR(255) NOT NULL,\n    date DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n    image VARCHAR(255) default '/static/images/default.jpg'\n);\n```\n\nTable users has the following columns:\n\n    - `id`: primary key\n    - `name`: string\n    - `email`: string\n    - `username`: string\n    - `password`: string\n\n```MySQL\nCREATE TABLE IF NOT EXISTS users (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    name VARCHAR(20) NOT NULL,\n    email VARCHAR(40) NOT NULL,\n    username VARCHAR(20) NOT NULL,\n    password VARCHAR(255) NOT NULL\n);\n```\n\n## Installation\n \nYou can run the application without the database, but you will not be able to create or edit articles. It is recommended to first setup the database.\n\n### Using virtual env:\n \n    $ git clone https://github.com/djeada/Responsive-Blog-Template.git\n    $ cd Responsive-Blog-Template\n    $ virtualenv env\n    $ source env/bin/activate\n    $ pip install -r requirements.txt\n    $ python3 src/app.py\n\nIf you are using a Debian-based system and encountered toruble while installing the mysql requirements, try the following first:\n\n    $ apt install python3-dev default-libmysqlclient-dev build-essential\n\n### Using docker:\n\n    $ docker run -d -p 5000:5000 -v /var/run/docker.sock:/var/run/docker.sock -v /home/user/Responsive-Blog-Template:/app djeada/flask-blog\n\n## How to use?\n\nIf the application is running on localhost, you can access it using the following url:\n\n    http://localhost:5000/\n\nTo register a new user, you can use the following url:\n\n    http://localhost:5000/register\n\nTo login, you can use the following url:\n\n    http://localhost:5000/login\n\nTo create, edit or delete articles, you need to login first. Then, you can use the following url:\n\n    http://localhost:5000/dashboard\n\n## TODO\n\n- [x] Add exception handling to all python files that are interacting with the DB.\n- [ ] Introduce variables to CSS.\n- [ ] Test on different devices.\n- [ ] Make full project specification.\n- [x] Enable storing of images in the database.\n- [ ] Add tags to the database.\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjeada%2Fflask-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdjeada%2Fflask-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdjeada%2Fflask-blog/lists"}