Giter Site home page Giter Site logo

minusmail's People

Contributors

bcwaters avatar

minusmail's Issues

Testing Testing Testing

The mongoDB commit exposed lot's of issues with the current state of the code.

Write test to confirm the following:
-Each client uses only one socket session...(check server side for the duplicate issues)
-Test for mongoDB email retrieval. Retrieve set only one time per client. (Code needs to be fixed for this)
-Switching user current email. Test for email retrieval and inbox state...at the moment it keeps old emails

Research Jest and Enzyme to do this.

Backend Update filewatcher.js to determine recipient and only emit corresponding clients

At the moment all emails are displayed to all connected users.
Filewatcher needs to determine who the email is going to and then only emit to that clients socket.
It is likely that the class needs to be refactored so that a socket is not passed into the class. Instead use a callback method where server.js can determine who to emit to.

Eventually writing files to the directory won't be good enough and a database will be needed.
Look into Redis for a pub-sub solution

Email Persistence

At the moment the user only receives emails while they are connected to the site. Any email received before or after cannot be received by them.

Determine a timeframe and implement a way to retrieve emails for a user within that period.
the simplest way I can think of is like this:
set up a directory structure where email gets it's own directory

--/tmp/emails/
---------------/emailaddress1
---------------/emailaddress2

Using fs whenever the client emits an updated email load all the files in that directory as mailobjects and emit result back over the socket. *It might be handy to read the age of each file and if they exceed the thresh hold then delete them and skip parsing and sending.

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.