Giter Site home page Giter Site logo

pratikdhage003 / customsocialmediaapp Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 83 KB

Runs on the parallel lines as that of LinkedIn and Twitter.Java Backend App contains REST APIs, MVC based app, SQLite as a DB

Java 100.00%
java sql sqlite-database rest-api

customsocialmediaapp's Introduction

CustomSocialMediaApp

Maven based Java MVC Web Project containing REST APIs for functionalities drawing few similarities with LinkedIn and Twitter; SQLite is used as a backend database which is attached with the project itself

How to deploy

For building an eclipse web project :

Do run this command in a folder where CustomSocialWebApp is placed.

[cutompath]$ mvn eclipse:eclipse -Dwtpversion=2.0

How to run: Use a tool like POSTMAN or run in a browser to capture JSON based response

For example:

http://localhost:8080/CustomSocialMediaApp/API/app/v1.1/messages/users/1?messageContains=Renovat

http://localhost:8080/CustomSocialMediaApp/API/app/v1.1/followers/users/2

contextPath = http://localhost:8080/CustomSocialMediaApp/API/

Following are the (SocialAppController.java) controller methods with their mappings for each individual functionality:

1) public List findAllMessegesOfUserWithFolloweesByUserId

Retrieves list of messages or newsfeed posted by userId = 1 and its followees or people it is following.

Method URL Action: GET

contextPath + /app/v1.1/messages/users/1?messageContains=Renovat

2) public List findAllFollowersByUserId

Retrieves list of followers of userId =2

Method URL Action: GET

contextPath + /app/v1.1/followers/users/2

3) public List findAllFolloweesByUserId Retrieves list of people, to whom userId =2 is following

Method URL Action: GET

contextPath + /app/v1.1/followees/users/2

4) public void unfollowAnotherPerson

userId = 4 unfollows another user whose followId = 1

Method URL Action: GET

contextPath + /app/v1.1/users/unfollow?userId=4&followeeId=1

5) public void followAnotherPerson

userId = 4 starts following another user whose followId = 1

Method URL Action: GET

contextPath + /app/v1.1/users/follow?userId=4&followeeId=1

6) public int findShortestDistanceBetweenUsers

Find the minimum distance between userId = 3 and another user whose id = 6

Method URL Action: GET

contextPath + /app/v1.1/users/shortestdistance?sourceId=3&destinationId=6

Graph for followees for the userID =3 :

1 -> 4 -> 2

2 -> 3 -> 4

3 -> 1 -> 2

4 -> 5 -> 2

5 -> 6

6

So shortest path is via:

3 -> 1 -> 4 -> 5 -> 6

Each directly connected edge is 1 hop !

As we covered 4 hops: Hence shortest path distance = 4


DB Type : SQLite

need browser like : SQLite DB Browser to view tables

DB name : SocialAppDB.sql

Database Schema Diagram : SocialAppDB

schema_diagram_customsocialmediaapp

customsocialmediaapp's People

Contributors

pratikdhage003 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

customsocialmediaapp's Issues

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.