Giter VIP home page Giter VIP logo

info834_blabla-tea's Introduction

๐Ÿ”ˆ๐Ÿต - Blabla tea

The aim of this project was to create a chat room for friends! We had two 4-hour sessions to complete this project! The objectives were the following:

๐Ÿ‘ฆ๐Ÿป Project objective for the user experience

โœ… Allow users to create an account 

โœ… Allow users to login / logout

โœ… Allow users to know who is logged in

โœ… Allow users to retrieve conversation history with another user 

โœ… Allow users to open a conversation with another user 

๐Ÿ› ๏ธ Project objective at technical implementation level

โœ… Using Node.js for the application structure

โœ… Use MongoDB for data storage

โœ… Use socket.io for interaction management

โœ… Have a fault tolerant application (use of Replicaset)

โœ… Unit testing with Node.js

๐Ÿ‘€ Quick overview of our project

When the user arrives on our application, he has the possibility to log in (left image), or to create an account (right image).

image

When the user logs in, an example conversation is visible, to explain very quickly what is possible in our project

image

The different users who are connected (indicated with the "online" at the top left), can communicate

image

To find out more and try out all the features, it's best to try out our application!

๐Ÿ› ๏ธ How to use

1๏ธโƒฃ Clone the Git

2๏ธโƒฃ Modify the configuration file to match your environment (in the configuration file here)

{
	"db": {
		"host": "127.0.0.1",
		"port": 27017,
		"name": "chat"
	},
	"sessionSecret": "123soleil",
	"redis": {
		"host": "127.0.0.1",
		"port": 6379,
		"password": ""
	}
}

3๏ธโƒฃ Install the packages

yarn or npm install

4๏ธโƒฃ Start MongoDB using replicaset (optional)

If you have problems with the replicaset, you can simply follow step 8๏ธโƒฃ

mongod --replSet rs0 --port 27017 --dbpath ./data/r0s1
mongod --replSet rs0 --port 27018 --dbpath ./data/r0s2
mongod --replSet rs0 --port 27019 --dbpath ./data/r0s3

5๏ธโƒฃ Start the arbiter (optional)

mongod--port 30000 --dbpath ./data/arb --replSet rs0

6๏ธโƒฃ Defind roles of mongod servers (optional)

mongo --port 27017

7๏ธโƒฃ Last step to complete the configuration (optional)

rs.initiate()
rs.conf()
rs.add("localhost:27018")
rs.add("localhost:27019")
rs.addArb("localhost:30000")

8๏ธโƒฃโ— Step to follow only in case of a problem with the replicat set

rmdir /S data
mkdir data

9๏ธโƒฃYou can now start the services !

open redis-server.exe from the source file
node server.js

1๏ธโƒฃ0๏ธโƒฃ It's time to have fun, go to localhost:3000

๐Ÿงช๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ As we are good developers, we tried to make unit tests

npm run test

๐Ÿ—๏ธ Developed with

๐Ÿ’ช Authors of this project

info834_blabla-tea's People

Contributors

caullird avatar m4verickfr avatar

Watchers

 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.