A Django web application that shortens long URLs. This is a demo project to show off my tech abilities.

Overview

Django URL Shortener

This project is just a complete and production-ready URL shortener web application to show off my tech and coding abilities.

Important Note

Since this is a demo project, I committed .env files. Please never commit important configs

Features

  • Users can login with email and password.
  • Forms can be protected by Google ReCaptcha. (For example register form in this project)
  • Users can shorten their long urls.
  • Users can have their customized short url by setting alias.
  • Users can monitor some analytics in their dashboard. (total clicks and unique clicks)
  • Users can edit their URLs.
  • Users can delete their URLs.

Used Technologies

  • Python Programming Language
  • Django Web Framework
  • Docker and Docker Compose
  • Nginx and Gunicorn
  • PostgresQL
  • HTML, CSS, and Bootstrap v4
  • JavaScript and jQuery
  • ChartJS

Used Techniques

  • Class Based Views
  • Pagination
  • Separated configs for production and development

Used Third-Party Libraries

  • hashids
  • django-bootstrap4
  • django-recaptcha

Screenshots

Index Page

Analytics Page

Chart Page

Useful Docker Commands

Here are some code snippets related to setting up this project.

Building

Development:

sudo docker-compose -f docker-compose.yml --build -d

Production:

sudo docker-compose -f docker-compose.prod.yml --build -d

Following Logs

Development:

sudo docker-compose -f docker-compose.yml logs -f

Production:

sudo docker-compose -f docker-compose.prod.yml logs -f

Migration

In development migration are applied automatically in entrypoint.sh.

Production:

sudo docker-compose -f docker-compose.prod.yml exec web python manage.py migrate

Collect Static Files

In development there is no need to collect static files!

Production:

sudo docker-compose -f docker-compose.prod.yml exec web python manage.py collectstatic --noinput --clear

Fill Database with Fake Data

For demo purposes only In development database is filled automatically in entrypoint.sh.

Production:

sudo docker-compose -f docker-compose.prod.yml exec web python manage.py fill_db

After executing this command an admin user will created for you:

Future Works

  • Add user email verification.
  • Protect login with reCaptcha.
  • Support other languages.
  • Add caching (redis).
  • Load tests.
  • More unit tests.

Thanks for your attention!

Feel free to create issues, pull requests or even contact me ([email protected])!

Owner
Seyyed Ali Ayati
I'm 22 years old, interested in Python programming language and its libraries and frameworks, also in love with software and its development process!
Seyyed Ali Ayati
A helper for organizing Django project settings by relying on well established programming patterns.

django-configurations django-configurations eases Django project configuration by relying on the composability of Python classes. It extends the notio

Jazzband 953 Dec 29, 2022
Utility for working with recurring dates in Django.

django-recurrence django-recurrence is a utility for working with recurring dates in Django. Documentation is available at https://django-recurrence.r

408 Jan 06, 2023
Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django.

django-minify-html Use minify-html, the extremely fast HTML + JS + CSS minifier, with Django. Requirements Python 3.8 to 3.10 supported. Django 2.2 to

Adam Johnson 60 Dec 28, 2022
A django model and form field for normalised phone numbers using python-phonenumbers

django-phonenumber-field A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonen

Stefan Foulis 1.3k Dec 31, 2022
Simply integrate Summernote editor with Django project.

django-summernote Summernote is a simple WYSIWYG editor. django-summernote allows you to embed Summernote into Django very handy. Support admin mixins

Summernote 936 Jan 02, 2023
REST API with Django and SQLite3

REST API with Django and SQLite3

Luis Quiñones Requelme 1 Nov 07, 2021
Serve files with Django.

django-downloadview django-downloadview makes it easy to serve files with Django: you manage files with Django (permissions, filters, generation, ...)

Jazzband 328 Dec 07, 2022
A Django app that allows visitors to interact with your site as a guest user without requiring registration.

django-guest-user A Django app that allows visitors to interact with your site as a guest user without requiring registration. Largely inspired by dja

Julian Wachholz 21 Dec 17, 2022
Yet another Django audit log app, hopefully the simplest one.

django-easy-audit Yet another Django audit log app, hopefully the easiest one. This app allows you to keep track of every action taken by your users.

Natán 510 Jan 02, 2023
Basic implementation of Razorpay payment gateway 💳 with Django

Razorpay Payment Integration in Django 💥 In this project Razorpay payment gateway 💳 is integrated with Django by breaking down the whole process int

ScaleReal 12 Dec 12, 2022
A quick way to add React components to your Django templates.

Django-React-Templatetags This django library allows you to add React (16+) components into your django templates. Features Include react components u

Fröjd Agency 408 Jan 08, 2023
Bootstrap 3 integration with Django.

django-bootstrap3 Bootstrap 3 integration for Django. Goal The goal of this project is to seamlessly blend Django and Bootstrap 3. Want to use Bootstr

Zostera B.V. 2.3k Jan 02, 2023
Django + NextJS + Tailwind Boilerplate

django + NextJS + Tailwind Boilerplate About A Django project boilerplate/templa

Shayan Debroy 3 Mar 11, 2022
Django React Project Setup

Django-React-Project-Setup INSTALLATION: python -m pip install drps USAGE: in your cmd: python -m drps Starting fullstack project with Django and Reac

Ghazi Zabalawi 7 Feb 06, 2022
Django Query Capture can check the query situation at a glance, notice slow queries, and notice where N+1 occurs.

django-query-capture Overview Django Query Capture can check the query situation at a glance, notice slow queries, and notice where N+1 occurs. Some r

GilYoung Song 80 Nov 22, 2022
Django And React Notes App

Django & React Notes App Cloning the repository -- Clone the repository using the command below : git clone https://github.com/divanov11/Django-React

Dennis Ivy 136 Dec 27, 2022
A django integration for huey task queue that supports multi queue management

django-huey This package is an extension of huey contrib djhuey package that allows users to manage multiple queues. Installation Using pip package ma

GAIA Software 32 Nov 26, 2022
Django REST Client API

Django REST Client API Client data provider API.

Ulysses Monteiro 1 Nov 08, 2021
Drf-stripe-subscription - An out-of-box Django REST framework solution for payment and subscription management using Stripe

Drf-stripe-subscription - An out-of-box Django REST framework solution for payment and subscription management using Stripe

Oscar Y Chen 68 Jan 07, 2023
Django Phyton Web Apps template themes

Django Phyton Web Apps template themes Free download source code project for build a modern website using django phyton web apps. Documentation instal

Mesin Kasir 4 Dec 15, 2022