Skip to content

Social Website with Django with Social Auth, bookmark images.

License

Notifications You must be signed in to change notification settings

JoseJulianMosqueraFuli/bookmarks

Repository files navigation

Bookmarks Images Social Website

This repository contains the code for an image bookmarking application like a social website. That used Django Social Auth to add social authentication to your site using Facebook, Google, and Twitter. That runs in a development server with HTTPS on your local machine using Django Extensions. Customized the social authentication pipeline to create a user profile for new users automatically.

Getting Started

To run this project on your local machine require docker, follow these steps:

  1. Clone the repository:
git clone [email protected]:JoseJulianMosqueraFuli/bookmarks.git
  1. Navigate into the repository:
cd bookmarks
  1. Create the .env file for authentication, similar to the .env.example file:
FACEBOOK_APP_ID = <App Identifier>
FACEBOOK_APP_SECRET = <App Secret Key>
TWITTER_API_KEY = <App Identifier>
TWITTER_API_SECRET = <App Secret Key>
GOOGLE_CLIENT_ID = <App Identifier>
GOOGLE_CLIENT_SECRET = <App Secret Key>
  1. Run the docker command:
docker-compose up --build

Or Manual configuration use:

  1. Clone the repository:
git clone [email protected]:JoseJulianMosqueraFuli/bookmarks.git
  1. Create a virtual environment:
python3 -m venv venv
  1. Activate the virtual environment:
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Navigate into the cloned directory:
cd bookmarks
  1. Create the .env file for authentication, similar to the .env.example file:
FACEBOOK_APP_ID = <App Identifier>
FACEBOOK_APP_SECRET = <App Secret Key>
TWITTER_API_KEY = <App Identifier>
TWITTER_API_SECRET = <App Secret Key>
GOOGLE_CLIENT_ID = <App Identifier>
GOOGLE_CLIENT_SECRET = <App Secret Key>
  1. Start docker and run:
docker pull redis
docker run -it --rm --name redis -p 6379:6379 redis
  1. Apply the database migrations:
python manage.py migrate
  1. Start the development server:
python manage.py runserver
  1. Optional: If you want to run the development server with HTTPS, use:

    NOTE: Remember that you have to configure your hosts for https configuration.

python manage.py runserver_plus --cert-file cert.pem

Now, you can access the application in your browser at http://127.0.0.1:8000/. Enjoy using the bookmarking application!

Key Features Implemented

  • User registration: Users can create an account by providing their username, email, and password.
  • User login: Registered users can log in to their accounts using their credentials.
  • User logout: Users can securely log out of their accounts.
  • Password management: Users can change their passwords and reset them if they forget.
  • Custom user profiles: A model is implemented to store additional information about each user, such as their date of birth and profile photo.
  • Custom authentication backend: An authentication backend is added to allow users to log in using their email address instead of their username.
  • Creating many-to-many relationships
  • Customizing behavior for forms
  • Using JavaScript with Django
  • Building a JavaScript bookmarklet
  • Generating image thumbnails using easy-thumbnails
  • Implementing asynchronous HTTP requests with JavaScript and Django
  • Building infinite scroll pagination
  • Building a follow system
  • Creating an activity stream application
  • Adding generic relations to models
  • Optimizing QuerySets for related objects
  • Using signals for denormalizing counts
  • Using Django Debug Toolbar to obtain relevant debug information
  • Counting image views with Redis
  • Creating a ranking of the most viewed images with Redis

Next Steps

These improvements could cover the following points:

  • Create Test
  • Always could improve

License

This project is licensed under the MIT License.

Author

Build it by Jose Julian Mosquera Fuli.

About

Social Website with Django with Social Auth, bookmark images.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published