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.
The main technologies used in this project are all open sources.
- Database : MySQL
- Server-side : Node
- Client-side : React
You can find a lot more documentation produced during the whole creation process in the documentation/
folder.
You need to have Git, Node (including npm) and MySQL installed.
This project was tested using Node v11.14.0.
git clone https://github.com/marcheimendinger/projet-transversal-1-siss
cd server
npm install
cd ../client
npm install
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.
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.
cd server
npm start
Don't forget to keep this terminal window open.
Note : the server runs on port 3001 by default.
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.
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