Giter Club home page Giter Club logo

gitlogue's People

Contributors

andreykoltsov1997 avatar katevi avatar

Watchers

 avatar  avatar

gitlogue's Issues

Launch back-end via docker-compose.

This is continuing of #28.
We have 2 components in back-end: server and database. They should interact between each other, so it'd be useful to launch them both using one command.
Since, at this point, server should be packaged into docker container, we could use docker-compose to archive the desired one-command start up.

Things that docker-compose up should do:

  • launch container with server;
  • launch container with mongoDB;
  • establish network between those two;

Here's a list of articles that could help:

Unique project name.

"Chat" is, without a doubt, a representative name for this project, but it's not as unique as it could be. :)
Please, come up with a name for the project, one word preferably.

[4] Investigate User Metadata Persistence.

Before start of implementations functionality for users support, we first have to do the investigation in order to construct the path of tasks or it.
I'll ask you the question that may help.

Let's assume a user account would contain nickname, full name and a password.

Back-end

  1. How to persist user metadata?
  2. Would you want to persist chat history? If yes, how?

Front-end
3. Think about the sign in / sign up process. Read about best practices for it.

REST API enhancements.

We have a front-end that highly relies on REST API in order to display the information.
Please, consider add the following methods into it:

  1. Get list of all users - should return JSON containing basic information about the user entity.
  2. Get user by ID.
  3. Get user by name.

Angular migration.

Now
We have front-end files based on vanilla JS and HTML files.

Then
We could be more flexible in out front-end development using frameworks like Angular - it'd allow us to use existing modules and structure the front-end logic.

Add CI @ back end.

Make sure to implement #37 before this one.

We ship the back-end server as a docker image. In order to push updated Docker image onto the docker hub automatically without the need to build it manually, it could be done via CI.

I assume the CI staged would have the following order:

  1. Build. Create .jar file;
  2. Test. Run Java tests;
  3. Deploy docker image. Build docker image and push it onto the Docker hub.

I suggest you to use either Travis CI or GitLab CI (GitLab allows to have CI set up there while keeping the repository in GitHub).

[3] Add simple users.

In most of the chats, users have nicknames or any other identifier.
So, the task is, when user opens up a chat, (-s)he should be able to set the nickname. That name should be displayed during the chat.

Note that, at this point, we don't want to persist that data.

Direct messages.

Now
We have a single chat. Every logged user could write into it.

Then
Users should have ability to send and/or receive direct messages.

Add ability to set avatar.

User should be able to have an avatar.
The avatar saving alhorythm:

  1. User clicks "Set profile picture" button from front-end;
  2. Loads the picturel
  3. Clicks "save changes";
  4. The picture is going to the persistent storage.

If user hasn't set an avatar, a default one (for example: the ? picture) is assigned.

Note that it'd require changing of user entity. Information about the user should also contain its avatar.

[Client] Handle unavailable server.

In case server for the message transfer (back-end) is unavailable, a client should be notified within GUI.
As for now, we can determine what's wrong only in case we'd open the console, which is not the most sufficient way to determine errors in front end.
image

Implement user data persistent storage.

Now
User can specify her/his name via the GUI. It doesn't get saved anywhere except session.
We don't have a registration process - user couldn't create account.

Then
User should be able to create account and login into it afterwards.
The account contains:

  • unique user nickname. Example: ekaterinavinnik ;
  • password;
  • Full name - the one that'd be displayed. Example: Ekaterina Vinnik;
  1. Use an existing library for the password storage;
  2. Ensure the data is persistent: it gets written into the database;

Package server into docker image.

We have to ship the server. It could be done in multiple ways, for example: JDK, VM image, container.
Containers are really popular nowadays - it has advantages of VMs in terms of encapsulation, yet they're relatively lightweight.
In order to launch container, you should have a container runtime, for example - Docker. In order to run your app inside it, you'd have to build a docker image with it.
Packaging your app into Docker image has multiple advantages, such as:

  • OS independent (as long as it supports docker);
  • Predefined environment - user shouldn't take time to install, for example, JDK;

In this task, I'd like you to package only server written with Spring.

Before starting the implementation, I'd suggest you to go through:

[2] Implement a server for front-end serving.

In order to deploy front-end, you'd have to have a web server. Please, implement it and include into front-end part source code with instructions on how to run t.

I'd consider to do a light weight implementation, for example: NodeJS Express.

Remove unnecessary REST API methods.

We shouldn't have a separate method in order to receive a response. registration/user and login/user should return a response themselves.

  • registration/user/response/
  • login/user/response

[1] Separate front-end and back-end logic.

Implementation for front-end (HTML, CSS, JS and static files) and back-end (Spring) should be separated.
Let's create 2 folders: "char-client" and "chat-server". Interaction between client and server should be set up.

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.