Coder Social home page Coder Social logo

ashutoshkrris / iread Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 19.0 11.15 MB

iRead is an open platform where readers find dynamic thinking, and where expert and undiscovered voices can share their writing on any topic.

Home Page: https://ireadblog.com

License: Mozilla Public License 2.0

Python 5.53% CSS 5.01% SCSS 9.32% HTML 72.68% JavaScript 7.45% Procfile 0.01%
django blog iread python technical-writing blogger blogging blogging-system

iread's Introduction

iRead | Where Dynamic Ideas Find You

iRead is an open platform where readers find dynamic thinking, and where expert and undiscovered voices can share their writing on any topic.

Features of iRead

Currently we support the following features :

  • Authentication and Authorization with OTP Verification
  • Social Login with Google OAuth2
  • CRUD on User's Profile
  • CRUD on Blog Posts
  • Rich Text Editor(using CKEditor) with Media Files Storage(using Cloudinary)
  • Search Blogs
  • Categories and Tags Filters
  • Create Series of Blogs
  • Like/Dislike/Comment/Reply/Share on Blog Posts
  • Follow/Unfollow Users
  • Show Notifications on Follow, Like and Comment
  • Twitter Bot to tweet about posts published on website as well as retweet and like user's post (if they share it on Twitter)
  • Digests(Newsletter) Subscription/Unsubscription
  • Public API and RSS Feed Support

Technology Stack

Frontend: HTML, CSS(+ Bootstrap 4), JavaScript
Backend: Python/Django
Database: PostgreSQL

And additional requirements are in requirements.txt or Pipfile.

Latest Posts

API Documentation

  • Base URL: https://ireadblog.com/api/v1
  • pk refers to the Post ID.
  • Base URL for thumbnail is: https://res.cloudinary.com/dlomjljb6/image/upload/v1/
  • Post URL can be built as: https://ireadblog.com/posts/<post_id>/<post_slug>

Endpoints

  • Endpoint for all posts: /posts

    • Accepts GET Request
    • Returns JSON Response as:
      [
        {
          "model": "core.post",
          "pk": 92,
          "fields": {
            "title": "Your title here",
            "seo_overview": "Your post overview here",
            "slug": "post-slug-here",
            "content": "Your post content here",
            "timestamp": "2022-02-22T02:43:40.770Z",
            "author": "Ashutosh Krishna",
            "thumbnail": "media/blog/thumbnails/R_xjlzdd",
            "categories": "CategoryName",
            "tags": ["tag1", "tag2"]
          }
        }
      ]
    • To limit the number of posts, use ?limit=x in the URL.
      e.g. https://ireadblog.com/api/v1/posts?limit=3 returns the latest 3 posts on iRead.
  • Endpoint for posts for specific category: /posts?category=<category-slug>

    • Accepts GET Request
    • Replace <category-slug> with correct category slug
    • Category Slug can be found on any category page. For example, when you visit the Web Development category page, the URL of the page is: https://ireadblog.com/categories/web-development. So the <category-slug> is web-development.
    • JSON response looks same as above.
    • To limit the number of posts for a category, use ?category=<category-slug>&limit=x in the URL.
      e.g. https://ireadblog.com/api/v1/posts?category=web-development&limit=3 returns the latest 3 Web Development posts on iRead.
  • Endpoint for posts for specific tag: /posts?tag=<tag-name>

    • Accepts GET Request
    • Replace <tag-slug> with correct tag name
    • Tag Name can be found on any Tag page. For example, when you visit the DevInceptCommunity tag page, the URL of the page is: https://ireadblog.com/tags/DevInceptCommunity. So the <tag-name> is DevInceptCommunity.
    • JSON response looks same as above.
    • To limit the number of posts for a tag, use ?tag=<tag-name>&limit=x in the URL.
      e.g. https://ireadblog.com/api/v1/posts?tag=DevInceptCommunity&limit=3 returns the latest 3 posts on iRead with the tag #DevInceptCommunity.
  • Endpoint for posts for a user: /<username>/posts

    • Accepts GET Request
    • Replace <username> with your username.
    • JSON response looks same as above.
    • To limit the number of posts by user, use ?limit=x in the URL.
      e.g. https://ireadblog.com/api/v1/posts?limit=3 returns the latest 3 posts by that user on iRead.
  • Endpoint for a single post: /post/<post_id>/<slug>

    • Accepts GET request
    • Replace <post_id> with the Post ID and <slug> with the slug of the post.
    • JSON response looks same as above.

RSS Feed

  • iRead Posts RSS Feed URL: https://ireadblog.com/feed
  • User Posts RSS Feed URL: https://ireadblog.com/feed/<username>
  • You can also find the RSS Feed in your profile if you're logged in.

Demo

Demo Video

Bulletin Email

Bulletin email

Contributing

Setting-up the project

  • Fork the Repository.

  • Clone the repository to your local machine $ git clone https://github.com/<your-github-username>/iRead.git

  • Change directory to iRead $ cd iRead

  • Add a reference to the original repository
    $ git remote add upstream https://github.com/ashutoshkrris/iRead.git

  • Install venv $ pip3 install venv

  • Create a virtual environment $ python -m venv env

  • Activate the env: $ source env/bin/activate (for linux) > ./env/Scripts/activate (for Windows PowerShell)

  • Install the requirements: $ pip install -r requirements.txt

  • Create a new file in the root directory of the repository (iRead) with name .env (only .env and not .env.txt) and add the following content in it:

    DEBUG=True
    SECRET_KEY=ss)143p*@)jxwzge9-i26c40_9*r%p1l0&_*nlr-_*m+op#2^w
    DB_NAME=blog
    DB_USER=postgres
    DB_PASSWORD=postgres
    DB_HOST=localhost
    DB_PORT=5432
    EMAIL_HOST_USER='[email protected]'
    EMAIL_HOST_PASSWORD='password'
    CLOUD_NAME='cloudinary-cloud-name'
    API_KEY='cloudinary-api-key'
    API_SECRET='cloudinary-api-secret'
    GOOGLE_OAUTH_CLIENT_ID='google-key'
    GOOGLE_OAUTH_CLIENT_SECRET='google-secret'
    TWITTER_API_KEY='twitter-api-key'
    TWITTER_API_SECRET_KEY='twitter-api-secret-key'
    TWITTER_ACCESS_TOKEN='twitter-access-token'
    TWITTER_ACCESS_TOKEN_SECRET='twitter-access-token-secret'
    REDIS_URL=redis://127.0.0.1:6379/1
    REVUE_API_KEY='revue-api-here'
    

    or, just copy the .env.save file from samples directory to the root directory (iRead) and rename it to .env (only .env and not .env.txt)


    Note : You can also use Pipenv for virtual enviroment. You can find few related commands here.

  • Copy sample-db.sqlite3 from samples directory to the root directory (iRead) and rename it to db.sqlite3.

  • Make migrations $ python manage.py makemigrations

  • Migrate the changes to the database $ python manage.py migrate

  • Create admin $ python manage.py createsuperuser

  • Run the server $ python manage.py runserver

๐Ÿ’ก๏ธ Pro Tip:

  • Always keep your master branch in sync with the main repository (by running $ git pull upstream master on your local master branch).
  • Always create a new branch before making any changes ($ git checkout -b <new-branch-name>), never ever make any changes directly on the master branch.

๐Ÿ’ฅ How to Contribute ?

๐Ÿ’ฅ Our Valuable Contributors.

iread's People

Contributors

ashutoshkrris avatar imgbotapp avatar kushi944100 avatar mayank-wadhwa-git avatar prakash-haldar avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iread's Issues

Update of read me file

What part(s) of the article would you like to see updated?

Want to add buttons and features to the video

Additional information

Fix Card Size

Describe the bug

A clear and concise description of what the bug is.
In Homepage, the post cards are not of fixed size and look irregular.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'www.iread.ga'
  2. Scroll down to 'Latest Posts'
  3. See error

Expected behavior

A clear and concise description of what you expected to happen.
All the post card should be of same size so that they look nicer.

Screenshots

If applicable, add screenshots to help explain your problem.
Screenshot (397)

Additional context

Add any other context about the problem here.

Note: If you want to work on an issue, you should check if it has already been assigned to anyone. If the issue is free you can comment /assign to get the issue assigned to you.
If you are raising a new issue and want to work on it then also you should comment /assign under the issue to get it auto assigned.

Smooth scrolling

Is your feature request related to a problem? Please describe.

As the website doesn't contain scrolling bar. I would like to add one

Which Program are you part of?

  • DCP21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.