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 Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 07, 2023
Django Rest Framework + React application.

Django Rest Framework + React application.

2 Dec 19, 2022
A simple demonstration of how a django-based website can be set up for local development with microk8s

Django with MicroK8s Start Building Your Project This project provides a Django web app running as a single node Kubernetes cluster in microk8s. It is

Noah Jacobson 19 Oct 22, 2022
Django-pwned - A collection of django password validators

Django Pwned A collection of django password validators. Compatibility Python: 3

Quera 22 Jun 27, 2022
Repo for All the Assignments I have to submit for Internship Application !😅

Challenges Repository for All the Assignments I have to submit for Internship Application ! 😅 As You know, When ever We apply for an Internship, They

keshav Sharma 1 Sep 08, 2022
Django application and library for importing and exporting data with admin integration.

django-import-export django-import-export is a Django application and library for importing and exporting data with included admin integration. Featur

2.6k Dec 26, 2022
Vehicle registration using Python, Django and SQlite3

PythonCrud Cadastro de veículos utilizando Python, Django e SQlite3 Para acessar o deploy no Heroku:

Jorge Thiago 4 May 20, 2022
Sistema administrador de contranas desarrollador en Django

Sistema Contrasenas Desarrolado en Django Proyecto sistema de administracion de contraseñas, de la experiencia educativa Programacion Segura Descripci

Ibrain Rodriguez Espinoza 1 Sep 24, 2022
A CTF leaderboard for the submission of flags during a CTF challenge. Built using Django.

🚩 CTF Leaderboard The goal of this project is to provide a simple web page to allow the participants of an CTF to enter their found flags. Also the l

Maurice Bauer 2 Jan 17, 2022
Updates redisearch instance with igdb data used for kimosabe

igdb-pdt Update RediSearch with IGDB games data in the following Format: { "game_slug": { "name": "game_name", "cover": "igdb_coverart_url",

6rotoms 0 Jul 30, 2021
Custom Django field for using enumerations of named constants

django-enumfield Provides an enumeration Django model field (using IntegerField) with reusable enums and transition validation. Installation Currently

5 Monkeys 195 Dec 20, 2022
xsendfile etc wrapper

Django Sendfile This is a wrapper around web-server specific methods for sending files to web clients. This is useful when Django needs to check permi

John Montgomery 476 Dec 01, 2022
Phoenix LiveView but for Django

Reactor, a LiveView library for Django Reactor enables you to do something similar to Phoenix framework LiveView using Django Channels. What's in the

Eddy Ernesto del Valle Pino 526 Jan 02, 2023
Yummy Django API, it's the exclusive API used for the e-yummy-ke vue web app

Yummy Django API, it's the exclusive API used for the e-yummy-ke vue web app

Am.Chris_KE 1 Feb 14, 2022
💨 Fast, Async-ready, Openapi, type hints based framework for building APIs

Fast to learn, fast to code, fast to run Django Ninja - Fast Django REST Framework Django Ninja is a web framework for building APIs with Django and P

Vitaliy Kucheryaviy 3.8k Jan 01, 2023
Store model history and view/revert changes from admin site.

django-simple-history django-simple-history stores Django model state on every create/update/delete. This app supports the following combinations of D

Jazzband 1.8k Jan 06, 2023
Django admin CKEditor integration.

Django CKEditor NOTICE: django-ckeditor 5 has backward incompatible code moves against 4.5.1. File upload support has been moved to ckeditor_uploader.

2.2k Dec 31, 2022
Template de desarrollo Django

Template de desarrollo Django Python Django Docker Postgres Nginx CI/CD Descripción del proyecto : Proyecto template de directrices para la estandariz

Diego Esteban 1 Feb 25, 2022
A Django app that creates automatic web UIs for Python scripts.

Wooey is a simple web interface to run command line Python scripts. Think of it as an easy way to get your scripts up on the web for routine data anal

Wooey 1.9k Jan 08, 2023
Source files for a free pyRevit toolbar.

pyRoovit (WIP) What is this? PyRoovit is/will be a toolbar for the use with pyRevit built by Gavin Crump (aka Aussie BIM Guru). Having used and taught

Gavin Crump 11 Nov 10, 2022