{"id":20719899,"url":"https://github.com/tarunsha009/blog-platform","last_synced_at":"2026-05-02T11:38:55.813Z","repository":{"id":246943360,"uuid":"822495519","full_name":"tarunsha009/Blog-Platform","owner":"tarunsha009","description":"A feature-rich, secure, and scalable blog platform built with Flask and SQLAlchemy. Includes user authentication, post management, comments, notifications, localization, and more. Ideal for learning backend development.","archived":false,"fork":false,"pushed_at":"2024-07-08T14:03:30.000Z","size":111,"stargazers_count":1,"open_issues_count":51,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T22:29:46.656Z","etag":null,"topics":["blog","flask","flask-sqlalchemy","postgresql","rest-api","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/tarunsha009.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-07-01T09:05:43.000Z","updated_at":"2024-09-29T15:31:40.000Z","dependencies_parsed_at":"2024-08-30T00:17:40.832Z","dependency_job_id":null,"html_url":"https://github.com/tarunsha009/Blog-Platform","commit_stats":null,"previous_names":["tarunsha009/blog-platform"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunsha009%2FBlog-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunsha009%2FBlog-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunsha009%2FBlog-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarunsha009%2FBlog-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarunsha009","download_url":"https://codeload.github.com/tarunsha009/Blog-Platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242995881,"owners_count":20218815,"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","flask","flask-sqlalchemy","postgresql","rest-api","sqlalchemy"],"created_at":"2024-11-17T03:18:44.596Z","updated_at":"2025-12-16T10:08:49.348Z","avatar_url":"https://github.com/tarunsha009.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog Platform\n\n## Description\n\nA RESTful API for a blog platform built with Flask and PostgreSQL. This project features a comprehensive system for user management, blog post handling, comment management, notifications, and reporting. It includes secure authentication mechanisms with JWT tokens and a protected route example. The project also supports localization and internationalization.\n\n## Features\n\n- **User Authentication**: Register, log in, and log out users with JWT tokens.\n- **Blog Post Management**: Create, read, update, and delete blog posts.\n- **Comment System**: Add, view, update, and delete comments on blog posts.\n- **Notifications**: Receive notifications for comments on blog posts.\n- **Reporting System**: Report blog posts.\n- **Localization and Internationalization**: Support for multiple languages.\n- **Protected Routes**: Examples of routes protected by authentication tokens.\n\n## Getting Started\n\nTo get started with the Blog Platform API, follow these steps:\n\n1. **Clone the Repository**\n\n    ```sh\n    git clone https://github.com/yourusername/your-repository.git\n    cd your-repository\n    ```\n\n2. **Set Up Your Environment**\n\n    Create and activate a virtual environment:\n\n    ```sh\n    python -m venv venv\n    source venv/bin/activate   # On Windows, use `venv\\Scripts\\activate`\n    ```\n\n3. **Install Dependencies**\n\n    ```sh\n    pip install -r requirements.txt\n    ```\n\n4. **Configure the Application**\n\n    Set up your configuration values in `blog_platform/config.py`. Update the following variables:\n\n    ```python\n    class Config:\n        SECRET_KEY = 'your_secret_key'\n        SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost:5432/your_database'\n        REDIS_URL = 'redis://localhost:6379/0'\n    ```\n\n5. **Run the Application**\n\n    Start the application with:\n\n    ```sh\n    python blog_platform/manage.py runserver\n    ```\n\n## Authentication Endpoints\n\n### User Registration\n\n- **URL**: `/blog/User/register`\n- **Method**: `POST`\n- **Description**: Register a new user.\n- **Request Body**:\n\n    ```json\n    {\n        \"username\": \"exampleuser\",\n        \"password\": \"examplepassword\"\n    }\n    ```\n\n- **Response**:\n\n    ```json\n    {\n        \"message\": \"User registered successfully.\"\n    }\n    ```\n\n### User Login\n\n- **URL**: `/blog/User/login`\n- **Method**: `POST`\n- **Description**: Log in an existing user and receive a JWT token.\n- **Request Body**:\n\n    ```json\n    {\n        \"username\": \"exampleuser\",\n        \"password\": \"examplepassword\"\n    }\n    ```\n\n- **Response**:\n\n    ```json\n    {\n        \"access_token\": \"\u003cJWT_TOKEN\u003e\"\n    }\n    ```\n\n### User Logout\n\n- **URL**: `/blog/User/logout`\n- **Method**: `POST`\n- **Description**: Log out the currently logged-in user by invalidating the JWT token.\n- **Headers**:\n\n    ```http\n    Authorization: Bearer \u003cJWT_TOKEN\u003e\n    ```\n\n- **Response**:\n\n    ```json\n    {\n        \"message\": \"User logged out successfully.\"\n    }\n    ```\n\n### Protected Route Example\n\n- **URL**: `/protected`\n- **Method**: `GET`\n- **Description**: Example of a protected route that requires a valid JWT token.\n- **Headers**:\n\n    ```http\n    Authorization: Bearer \u003cJWT_TOKEN\u003e\n    ```\n\n- **Response**:\n\n    ```json\n    {\n        \"message\": \"This is a protected route.\"\n    }\n    ```\n\n## Running Tests\n\nTo run the tests, use the following command:\n\n```sh\npytest\n```\n## Contributing\n\nTo contribute to the Blog Platform project:\n\n1. **Create a Branch**: Create a branch for your feature or bug fix.\n\n    ```sh\n    git checkout -b feature/your-feature\n    ```\n\n2. **Make Changes**: Implement your changes and test them.\n\n3. **Submit a Pull Request**: Submit a pull request with a description of your changes.\n\n    - Ensure that your code adheres to the project's coding standards.\n    - Provide clear descriptions of the changes and the reasons behind them.\n    - Include tests and documentation updates as needed.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarunsha009%2Fblog-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarunsha009%2Fblog-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarunsha009%2Fblog-platform/lists"}