Git Product home page Git Product logo

paulaji / authenticated-urlshortener-django Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 743 KB

Please visit the repository given below for the complete project. This repository has some unmarked changes. https://github.com/paulaji/authenticated-urlshortener-django-backup

Home Page: https://github.com/paulaji/authenticated-urlshortener-django-backup

Python 51.20% HTML 17.57% JavaScript 31.23%
authentication django djangotemplate javascript jwt jwtauthentication python react url-shortener

authenticated-urlshortener-django's Introduction

Django-React URL Shortener

This document has been authored by referencing the content provided in the backendinfo.txt and frontendinfo.txt files. For more comprehensive information about the project, kindly consult those aforementioned files.

This project is a URL shortener application built using Django for the backend and React for the frontend. It allows users to shorten long URLs and access them via the generated short URLs. The application also features jwt based user authentication, private routes.

Homepage

Homepage of this application contains link to url-shortener, jwt token details (for project demonstration), logout feature.

homepage

URL-shortener page

You can copy and paste the URL you wish to shorten, and the resulting shortened URL can then be utilized to access the original page.

urlshortening

Login page

loginpage

Register page

registerpage

Backend Setup

  1. Create the Django project and app:

    django-admin startproject backend
    python manage.py startapp application
  2. Install required packages:

    pip install django djangorestframework djangorestframework-simplejwt django-cors-headers

JWT token pair

tokenpair

  1. Configure CORS: In settings.py, set CORS_ALLOW_ALL_ORIGINS = True to enable communication between the frontend and backend.

  2. Set up models, authentication, and URL endpoints according to the backend information provided.

Frontend Setup

  1. Create the React app:

    npx create-react-app frontend
  2. Install required packages:

    npm install react-router-dom jwt-decode
  3. Set up components, context, pages, and utils directories as described.

  4. Configure private routes and token management using the information provided.

Running the Project

Backend:

  1. Activate the virtual environment:

    venv/Scripts/activate
  2. Run the backend server:

    python manage.py runserver

Frontend:

  1. Navigate to the frontend directory:

    cd frontend
  2. Run the frontend development server:

    npm start

Notable URLs

Usage

  1. Access the frontend at http://localhost:3000.
  2. Register or log in with an existing account.
  3. Use the URL shortener to generate short URLs for long URLs.
  4. Access private routes to view and manage your notes.

License

This project is licensed under the MIT License.

References

  • Programming Assistance: Documentations, Youtube, Stackoverflow, ChatGPT
  • Text/Document Refactoring: ChatGPT
  • Aesthetic/UI Support: ChatGPT

authenticated-urlshortener-django's People

Contributors

paulaji avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.