Skip to content

Backend done in python/django for my old portfolio site, which is not in production anymore. Features are caching, JWT, ReCaptcha, admin, admin-honeypot, rate limiting, etc.

Notifications You must be signed in to change notification settings

k4u5h4L/kaush.me-backend-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kaush.me (old) backend

Open-sourcing the backend of my old portfolio/blog site since it's not in production anymore.

Features:

  • Done in Python-Django with the help of Django Rest Framework.
  • Fully functional REST API with JWT support for Authentication and Authorisation.
  • File-system based route caching to minimise calls to the database. Customizable cache timeout.
  • Inbuilt Django admin panel with a custom installable and customizable theme.
  • Google ReCaptcha v2 for admin login page for added security against bots.
  • Admin page honeypot to log access attempts to the database. Capture credentials and IP addresses.
  • Route based rate limiting for protection against DOS-based attacks.
  • User region tracking built into the Django admin panel.
  • Custom error-not-found route.

To run:

  • Clone this repo.
  • Create a python virtual environment, and install dependencies in requirements.txt.
pip install -r requirements.txt
  • Make a file called config.json in the server/ dir and add in required API keys and secret keys. Follow the JSON structure given in server/config_sample.json.
  • Run database migrations and create a superuser.
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
  • Now run the server
python manage.py runserver

Your server should be running on port 8000. Visit localhost:8000 on your system to see. (Visit the routes present in the api/urls.py. You can make your own routes too.)

About

Backend done in python/django for my old portfolio site, which is not in production anymore. Features are caching, JWT, ReCaptcha, admin, admin-honeypot, rate limiting, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published