This project is a social application built with Django and JavaScript that allows users to share and interact with images they find on the internet. The project focuses on implementing advanced functionalities such as social authentication, user activity streams, and infinite scrolling, providing a platform for users to connect and share content seamlessly.
- User registration, login, and profile management.
- Password reset functionality.
- Social authentication via Google using OAuth 2.0.
- Bookmarklet to share images from any website.
- Asynchronous image bookmarking and liking using JavaScript and Django.
- Automatic generation of image thumbnails using the
easy-thumbnails
package. - Infinite scroll pagination for seamless browsing.
- Follow/unfollow functionality to connect with other users.
- Activity stream showing actions (e.g., uploading images, following users).
- User profiles with details and images.
- Image view tracking and ranking using Redis for fast I/O storage.
- Optimized database queries with Django Debug Toolbar.
- Signals to denormalize counts and improve performance.
- Backend: Django, Django REST Framework, Python Social Auth
- Frontend: JavaScript, HTML, CSS
- Database: SQLite (Development), Redis (for analytics and caching)
- Others: Django Debug Toolbar, easy-thumbnails
Create a .env
file for environment variables and add your Google OAuth credentials:
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
SECRET_KEY=your_django_secret_key
DEBUG=True
ALLOWED_HOSTS=*
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
To run the project, you need a Redis server. Use Docker to set it up:
Execute the following command to pull the Redis Docker image:
docker pull redis:7.2.4
Run the following command to start the Redis server:
docker run -it --rm --name redis -p 6379:6379 redis:7.2.4
Note: The Redis server must be running for the project to work. Without it, the website will show a "machine refused to connect" error.
- Register or log in using your email or Google account.
- Edit your profile to add details about yourself.
- Use the Bookmark it button to share images from any website.
- Browse images, like/unlike them, and follow other users.
- View your personalized activity stream on the dashboard.
This project can be deployed on platforms like Heroku, AWS, or any cloud provider supporting Django. Ensure to set up Redis and configure environment variables for production.
Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request with your changes.