It is a blog application made by using django, react and postgreSQL stack. Some features of the app are:
- Test first approach.
- Tests for CustomUser account and blog views.
- JWT authentication with email as username.
- Authorization: Only users who created the blog can modify/delete it.
- Every user can view all blogs.
- CRUD operations on blog.
- Slug based url for SEO optimization.
- React UI with tailwindCSS for optimized performance.
- Mobile responsive.
- Clone project locally.
- Setup database(postgreSQL).
- Setup backend(Django backend).
- Setup Frontend(React App)
$ git clone <link-to-this-repository>
Below are steps to setup databse using shell. You can perform similar actions using GUI tools by noting down the credentials below.
-
Open postgres shell:
$ sudo su - postgres
-
Login to your default postgres account:
# psql -U postgres -W
(If you wish to create new user account, you'll need to provide privileges of database to this user and supply these credentials in thesettings.py
file.) -
Create database:
CREATE DATABASE blog;
-
Exit psql shell:
\q
- Navigate to the backend folder.
- Create a virtual environment.
$ python -m venv .venv
- Activate virtual environment.
On Linux/Mac:$ source .venv/bin/activate
- Install required dependencies.
$ pip install -r requirements.txt
- Run migrations to your database.
$ python manage.py migrate
- Run tests (Optional).
$ python manage.py test
- Run server.
$ python manage.py runserver
- Navigate to frontend/ folder.
- Install dependencies.
$ npm i
- Run server.
$ npm run dev