Overview
The Django-React-Blog is a "Blogging Platform" built with Django and ReactJS. It provides all the general features that a blog should have. The backend is built using Django Rest Framework, while the frontend is developed using ReactJS.
Features
- Login/Registration: Users can create an account and log in to the blogging platform.
- Minimal Design: The blog has a clean and minimal design.
- Create/Edit/Delete Your Posts: Users can create, edit, and delete their own blog posts.
- User Profile: Each user has a profile page displaying their information.
- Comment Enable On Post Using disqus: Users can enable comments on their blog posts using the disqus commenting system.
- Comment Count On Post: The number of comments on each blog post is displayed.
- Live Search Blog: Users can search for specific blog posts on the platform.
- Filter Blog By Author By Click on Author Name: Users can filter blog posts by author by clicking on the author's name.
- Admin Panel: Administrators have access to an admin panel where they can manage users, posts, comments, and newsletters.
Backend Setup
- Clone this repository:
git clone https://github.com/codyle50/react-django-blog.git
- Change the current directory to the backend folder:
cd ./react-django-blog/backend/adminapi/
- Create a virtual environment and install all backend dependencies with pipenv:
pipenv install
- Start the virtual environment:
pipenv shell
- Change the working directory to adminapi which contains the manage.py file:
cd ./adminapi
- Run
python manage.py makemigrations
- Run
python manage.py migrate
- Create a superuser:
python manage.py createsuperuser
- Run the server:
python manage.py runserver
Frontend Setup
- Navigate to the landing directory:
cd ./react-django-blog/frontend/blog_frontend/
- Install all frontend dependencies using npm:
npm install
- Run the server:
npm start
Creating The First Post
- Make sure that both Backend and Frontend Servers are running.
- Open your browser and navigate to
localhost:3000.
- Go to
http://localhost:3000/login/.
- If you are not registered, go to the signup page:
http://localhost:3000/signup/.
- Login with the superuser credentials created while setting up the Backend.
- Navigate to Dashboard -> Your all New Post:
http://localhost:3000/user/dashboard/create-new-post.
- Fill the form to create a new post and then submit it.
- The submitted post will not appear on the homescreen unless and until the admin approves it.
- To approve the post, go to Dashboard -> Admin Panel -> View All Posts and then click on the Edit Button.
- Check the checkbox labeled Verified and then submit.
- After the post gets published, it will be displayed on the homepage of the blog (
localhost:3000).
Backend API Documentation
The API documentation is generated using the default tool provided by Django Rest Framework. To view the API documentation, make sure that the Backend Server is running.
Summary
The Django-React-Blog is a comprehensive blogging platform that combines the power of Django for the backend and ReactJS for the frontend. It offers a range of features such as user registration and login, post creation and management, user profiles, comments with the Disqus system, and an admin panel for administrators to manage the platform. Setting up the theme involves configuring the backend and frontend servers, creating a superuser, and publishing posts. The theme also provides API documentation for backend development. Overall, the Django-React-Blog provides a complete solution for creating and managing a blog.