Giter Site home page Giter Site logo

little-social-network's Introduction

Social network project

This project, made at the University of Geneva during a Bachelor degree in information systems, is an attempt to build a small social network (like the v0.01 of Twitter or FaceBook) with some basic functionnalities : users' profiles, friendships and text-only posts.

Ressources

The main technologies used in this project are all open sources.

  • Database : MySQL
  • Server-side : Node
  • Client-side : React

Documentation

You can find a lot more documentation produced during the whole creation process in the documentation/ folder.

Installation

You need to have Git, Node (including npm) and MySQL installed.

This project was tested using Node v11.14.0.

1 - Clone the project

git clone https://github.com/marcheimendinger/projet-transversal-1-siss

2 - Install dependencies

cd server
npm install
cd ../client
npm install

3 - Create the database

Start your local MySQL server.

Create a database in your local MySQL installation with the database/init.sql file.

Duplicate the server/database.default.js file, rename it database.js and modify the credentials of the config constant.

4 - Setup IBM Watson

A small funny AI feature is integrated in the app : when a user publishes a post, the text is analysed by Watson (AI from IBM) and the probable tone (anger, fear, joy, etc.) is displayed as an emoji. It is currently set to work with french, but can also work with english by changing the content_language from fr to en in the server/routes/post.js file.

For this feature to work, you need to create an account on cloud.ibm.com, create a new ressource for the Tone Analyzer service and download the generated credentials. The downloaded file (ibm-credentials.env) needs to be added in the server/ directory of the app.

More informations about the IBM API authentication can be found here.

5 - Start the server

cd server
npm start

Don't forget to keep this terminal window open.

Note : the server runs on port 3001 by default.

6 - Start the client

In a new terminal window :

cd client
npm start

Your default browser should automatically open the http://localhost:3000 address.

Don't forget to keep this terminal window open.

Note : the client runs on port 3000 by default.

Tests

Some tests (not all are implemented) can be done on the server. The MySQL server needs to be running but not the client and server.

WARNING : Running the tests will reset the database to a default tests state. Make sure you changed to another database instance by creating a new one and changing the credentials in server/database.js before testing.

cd server
npm test

little-social-network's People

Contributors

marcheimendinger avatar subisun avatar

Stargazers

 avatar

Watchers

 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.