It is a full-stack blog web application built with React on the frontend and Django/DRF on the backend integrated with AWS-S3 & AWS-RDS services.
Features:
Check the video demo at https://youtu.be/70gXH6j7XtQ
All the endpoints are listed below. However, to view the details of the endpoints, visit Chronicles Api Docs.
Users:
api/users/user/signup/
- POSTapi/users/user/login/token/
- POSTapi/users/user/login/token/refresh/
- POSTapi/users/all/
- GETapi/users/user/
- GET, PUT, DELETEBlogs:
api/blogs/blogpost/
- POSTapi/blogs/all/
- GETapi/blogs/blog/{blogId}/
- GET, PUT, DELETEapi/blogs/userblogs/
- GETComments:
api/blogs/blog/{blogId}/commentpost/
- POSTapi/blogs/blog/{blogId}/comments/all/
- GETapi/blogs/blog/{blogId}/comment/{commentId}/
- PUT, DELETEapi/blogs/blog/{blogId}/totalcomments/
- GETApplauds:
api/blogs/blog/{blogId}/applaud/
- POSTapi/blogs/blog/{blogId}/applauder/exists/
- GETReading-list:
api/blogs/blog/{blogId}/readinglist/save/
- POSTapi/blogs/readinglist/all/
- GETapi/blogs/blog/{blogId}/reader/exists/
- GETnode >= 16.14.0
npm >= 8.3.1
python >= 3.8
pip >= 21.3.1
AWS account
- if you want to use AWSbackend\config.py
file to encapsulate all your secret-keys related to AWS.git clone https://github.com/AI-14/chronicles.git
- clones the repositorycd chronicles
NOTE: If you want to use local machine for image uploads rather than AWS-S3, then remove all the configs in
backend\core\settings.py
under# AWS-S3
. Then inbackend\core\urls.py
, add this lineurlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
. With this setting, images will be stored underbackend\media\
.
cd frontend
npm install
or npm i
- installs all packagesnpm install --save-dev
- installs devDependenciesnpm start
- starts the appcd backend
py -m venv yourVenvName
- creates a virtual environmentyourVenvName\Scripts\activate.bat
- activates the virtual environmentpip install -r requirements.txt
- installs all modulespython manage.py makemigrations
& python manage.py migrate
- migrates all the tables to dbpython manage.py createsuperuser
- creates a superuserpython manage.py runserver
- runs the serverNOTE: First run backend server (it will run on
http://127.0.0.1:8000
), then run frontend app (it will run onhttp://127.0.0.1:3000
)
You need to have make
installed in your machine
make build-backend
- builds the backendmake build-frontend
- builds the frontendmake run-backend
- runs the backendmake run-frontend
- runs the frontend (make sure you open another cmd to run this command)NOTE: Use
make help
to see all the commands
You need to have Docker
installed in your machine
docker-compose build
- build the images for both frontend and backenddocker-compose up
- runs the containersNOTE: To setup docker dev-env, include volumes in the
docker-compose.yaml