Giter VIP home page Giter VIP logo

bgabor01 / trendlink Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 494 KB

A social media platform written in Django, that uses recommendation algorithms for personalized content and connections

License: MIT License

Dockerfile 0.41% Python 43.69% Shell 0.55% CSS 15.87% HTML 11.77% JavaScript 27.72%
ai content-based-recommendation django django-rest-framework recommendation-system chatbot nginx postgresql social-media jquery amazon-s3 django-channels real-time-notifications redis

trendlink's Introduction

TrendLink

A social media platform, that uses recommendation algorithms for personalized content and connections

Table of Contents

Features

  • User Registration and Authentication
  • Profile Management
  • Post Creation and Management
  • Comment Creation and Management
  • Connections Creation and Management
  • Real-time notifications

Applications

  • User
  • Post
  • Connection

Tech Stack

Backend

  • Framework: Django
  • API: Django Rest Framework (DRF)
  • Database: PostgreSQL
  • Channels backend: Redis
  • Authentication: SessionAuth
  • Containerization: Docker
  • Proxy Server: Nginx
  • Storage: AWS S3*

Frontend

  • HTML/CSS
  • JavaScript
  • JQuery

*production only

Requirements

  • Docker
  • Docker Compose

Installation

  1. Clone the Repository:

    git clone https://github.com/BGabor01/TrendLink.git 
  2. Create an .env File:

    Create an .env file in the project root with the following content:

    # Django Settings
    DJANGO_SECRET_KEY=your_secret_key 
    
    # PostgreSQL Database Settings
    POSTGRES_DB=your_db_name          
    POSTGRES_USER=your_db_user       
    POSTGRES_PASSWORD=your_db_password  
    
    # AWS S3 Settings (Production only)
    AWS_ACCESS_KEY_ID=your_access_key_id            
    AWS_SECRET_ACCESS_KEY=your_secret_access_key    
    AWS_STORAGE_BUCKET_NAME=your_bucket_name        
    AWS_S3_REGION_NAME=region_of_your_bucket
  3. Build the docker containers

    docker-compose build
  4. Start the applications:

    docker-compose up

Docker Configuration

The DockerFile uses the python:3.11-slim base image.
The services are defined in the docker-compose.yml.

Django

  • Service name: django

Database (PostgreSQL)

  • Service name: postgres

Channels backend (Redis)

  • Service name: redis

Nginx

  • Service name: nginx
  • The configuration file is located at trend_link/nginx.conf.

AWS S3 Configuration

AWS S3 is used for storing static and media files in production.
Follow these steps to configure AWS S3.

  1. Create an S3 Bucket:

    • Go to the AWS S3 console and create a new bucket.
    • Disable the block public access settings to allow public access to the bucket.
  2. Configure Bucket Policies

    • Set the appropriate bucket policy to allow public read access.

    Example

        {
            "Version": "2012-10-17",
            "Statement": [
                {
                "Sid": "PublicReadGetObject",
                "Effect": "Allow",
                "Principal": "*",
                "Action": "s3:GetObject",
                "Resource": "arn:aws:s3:::your_bucket_name/*"
                }
            ]
        }
    • Configure CORS policy for the bucket

    Example

    [
        {
            "AllowedHeaders": ["*"],
            "AllowedMethods": ["GET"],
            "AllowedOrigins": ["*"],
            "ExposeHeaders": []
        }
    ]
  3. Set Up IAM Permissions

    • Create an IAM user with AmazonS3FullAccess permissions.
    • Generate access keys for the IAM user.

Database Schema

trendlink's People

Contributors

bgabor01 avatar

Watchers

Lucian avatar Kostas Georgiou avatar  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.