Skip to content

Designed and implemented a distributed style social app with 7 containers using Docker, Python, MySQL, Nginx, and Gunicorn.

Notifications You must be signed in to change notification settings

jaredmyers/social_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social App Demo

Concept

To create a conduit for various social features to be implemented around spotify using their api, with the idea of recommending potential friends to users based on mutually shared music interests and listening habits. This took the form of a web application with the following user features:

  • Login
  • Friends list
  • Chat
  • Forums
  • Friend recommendation system
  • Music statistic viewer

Some of the more technical aspects include:

  • Sessions
  • Password hashing + salting
  • MySQL database
  • RabbitMQ (all communication)
  • Nginx
  • Django
  • WSGI
  • Docker (for this version)

Design


This project was originally implemented using virtual machines on a local network using the following design:

VMlayout

Here, this layout has been expanded and redesigned for the use of containers:

Clayout

The original project was also expanded into Dev, QA, and Prod networks with a custom rudimentary deployment server created to track packages across the networks. This can be found here, with a design write up on the package management system here.

Database


schema

View socialApp.sql here

A new table is dynamically created when a user initiates a chat. This table stores all chat messages and can be destroyed upon unfriending the chat recipient.

Salting and hash with bcrypt: salt_hash

RabbitMQ


All interprocess communcation goes through the MQ, with RPC requests being used where synchronicity is essential.

Three main queues are used, 1 for Spotify API requests and 2 for DB requests. A fanout queue is also optional for potential logs.

Frontend


Simple HTML + CSS in Django while using it's templating language to dynamically output data, with this being served by a WSGI(gunicorn) behind Ngnix.

Login Page

login_page

Recommended Friends Page

friends

Forum Page

threads

Forum Replies

threads_reply

Chat Page

chat

Stats and Connect pages

Stats: served to deliver the users music listening statistics

Connect: served to authenticate and grab an API token from spoitify

The api was hallowed out for this demo (only serving preconfigured json) and these pages are not implemented.

About

Designed and implemented a distributed style social app with 7 containers using Docker, Python, MySQL, Nginx, and Gunicorn.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages