Giter VIP home page Giter VIP logo

isotope-mail's Introduction

Isotope Mail Client

Gitter GitHub license Build Status Code coverage Total alerts e2e tests BrowserStack Status

Microservice based webmail client built with ReactJS and Spring.

Introduction

This webmail client is still in a very early stage, use at your own risk.

TL;DR

If you just want to check out the current status of the project you can deploy the application using the example traefik docker-compose.

Just run the following commands:

git clone https://github.com/manusa/isotope-mail.git
cd isotope-mail/deployment-examples
docker-compose pull && docker-compose up --force-recreate

Point your browser to localhost and login using the credentials of your mailserver.

Demo

You can see the latest snapshot version in action at: isotope.marcnuri.com

Use the following credentials:

  • Host: isotope
  • User: isotope
  • Password: demo

You can send e-mails to the demo account (isotope@isotope) by setting the SMTP server advanced settings:

  • Port: 25
  • SMTP SSL: false

Focus on Code Quality

Lines of Code Language grade: JavaScript Language grade: Java Reliability Rating Security Rating Maintainability Rating

One of the main reasons to develop Isotope Mail is to learn and showcase new technologies, frameworks and libraries and how they can be used in a real life product. There is a stronger focus on achieving top quality code rather than delivering a large number of features.

In order to guarantee top code quality the project is using Sonar Cloud and LGTM - Looks Good To Me to perform static code analysis.

How to deploy

Following is a list of resources that can help you deploy Isotope Mail Client in different environments

License

Isotope is Apache 2.0 Licensed.

Acknowledgements

Isotope Mail team wants to recognize the following third parties for providing software, support or services free of charge.

Thanks to BrowserStack for providing a free open source account to use their products for testing in real devices and browsers.

isotope-mail's People

Contributors

manusa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

isotope-mail's Issues

Create frontend microservice skeleton

Requirements

  • Webpack+Babel to transpile and generate distribution package
  • React as the main JS framework
    • React to support hot-reloading
  • Sass for stylesheets definition

AC

  • Distribution package is generated in ./dist directory
  • Live development application is served at port 9000
  • An empty page with a "Hello world!" literal is show when loading the page in a browser

Initial message viewer

Requirements

  • Message viewer to display basic information of an email message
    • Subject
    • From
    • Received date
    • To
    • Basic content renderer
  • Provide a way to navigate back to the message list of the currently selected folder (back button)
  • Opened messages should be marked as read

Temporary job to refresh Inbox + Folder list

Requirements

  • Background job to refresh folder list and inbox messages
    • New message counts + folder properties should be displayed without user interaction
    • Inbox messages should also be refreshed

AC

  • Messages are marked unread/read, folders update counters accordingly displaying changes
  • Messages are deleted or marked read/unread within the INBOX, message displays changes

Update selected folder in application state when reloading folders

Application state holds a reference to a folder under the seletedFolder field.

Whenever the list of folders is updated, the folder under this field no longer corresponds with the updated folder object within the folders.items field.

Application should only store the ID of the selected folder selectedFolderId

Add delete action (+button) to message-viewer

Requirements

  • Delete button in top-bar when message-viewer is displayed
  • Delete action to move message to trash folder and redirect user to selected folder message-list.
  • Trash folder is the folder with the \Trash attribute or if none available, any folder named Trash (ignore case)

Login dialog + credential store

Requirementes

  • User's should be "greeted" with a login dialog to enter mail credentials
  • Credentials should be stored (encrypted) in the Front End

AC

  • When loading the application, user is redirected to a login screen.
  • User is required to enter mail server host, mail server port, user and password.
  • User can submit the form and if credentials are valid is redirected to default application layout (folders+message list)
  • User is not able to see or retrieve the credentials as they should be encrypted during the rest of the application lifecycle.

Initial Folder List UX Enhancements

Requirements

  • Folders should be displayed with traditional order (Inbox first) and with icons.
  • Child folders should appear beneath parent folder as a nested list
  • Folders with new messages should be bold
  • Folders should display unread messages Folder name (999)

AC

  • Application interface should display folders according to the requirements

Top Bar Title

Requirementes

  • Top bar should display different content depending if message list or message viewer are displayed
  • For message-list
    • If currently selected folder is INBOX, display name of the application
    • If currenty selected folder is different than INBOX, display "${nameOfFolder} - ${applicationTitle}"
  • For message-viewer
    • No title should be display, only action buttons

Move redux store to local session

Requirementes

  • Redux state must be preserver when user refreshes the browser window

AC

  • If a logged in user refreshes browser, current state is preserved and is not redirected to login page

Dockerize server

Requirements

  • Dockerfile for server using openjdk:8-jre-alpine
  • Dockerfile should hint default application exposed port 9010
  • Deployed container will load spring application in root path /
  • Travis CI configuration should push image to docker hub marcnuri/isotope:client-server

Servers can be limited in API by environment variable

Requirements

  • Server to which API is allowed to connect can be limited through an environment variable.
    • If no variable is specified, API will connect to any server
    • Environment variable will support a comma separated list of mail hosts to which it can connect

Create backend microservice skeleton

Requirements

  • Gradle as dependency management and build automation system
  • Spring Boot 2.* as Java Framework
  • Basic IMAP support
  • Basic Web MVC support (REST endpoints)

AC

  • Application is served at port 9010
  • Exposed Folder resource to demonstrate Web MVC + IMAP support

Folder card in message viewer clickable

Requirements

  • Card with folder name beside subject headline should be clickable.
  • When the user clicks the card, page shows message list for that particular folder.

Folder message cache in own IndexedDB store

In order to avoid performance problems when persisting states with folder message caches with thousands of messages, message cache should be persisted in its own store and only when new messages are retrieved from the server.

  • Remove message cache persistence from store subscribe event
  • Create new store for message cache
  • Create function to persist folder message cache on demand
  • When state is recovered cross join with message cache store to recover the complete state

Project documentation

Project should be documented using available GitHub resources (Readme.md, wiki...)

Interface more "familiar"

Description

Interface should be familiar to users of other mail clients (GMail, Outlook, Hotmail...) in order for them to easily recognize the features of the mail client and inherently know how it works based on prior experience.

Dockerize client

Requirements

  • Dockerfile for client using nginx
  • Deployed container will load webapp in root path /
  • nginx to be configured to load index.html whenever a sub-path is accessed (e.g. /login)
  • Travis CI configuration should push image to docker hub marcnuri/isotope:client-latest

Move "collapse" button to side-bar (drawer)

Requirementes

  • Side-bar toggle button should display in side-bar when visible
  • When side-bar is visible, top-bar should not display toggle side-bar/menu button
  • When side-bar is hidde, top-bar should display toggle side-bar/menu button

Add mark as unread action (+button) to message-viewer

Requirements

  • Mark unread button in top-bar when message-viewer is displayed
  • Mark unread button must be to the right of delete button
  • Mark unread button to flag button as unread and redirect user to selected folder message-list.

Initial redux support

Create initial Redux store and move App state data variables to the store

Requirements

  • Redux store to be used whenever storing data to be cached from the backend (folders, messages...)
  • Store state to be used when displaying data in a component (mapStateToProps)
  • Store dispatchers to be used when updating data in the store

AC

  • Data is not stored in component state
  • Data displayed in a component is not passed over through component properties, components to access data directly from application global state

Reactive message retrieval using Flux + EventStream

Requirements

  • New reactive endpoint to be implemented
  • Endpoint will return a ServerSentEvent stream of lists of messages
  • Batches to be incremental, 20, 40, 80, 160, 320, 640 (Optimize IMAP retrieval for slow servers [MS Exchange])
  • Last batch will have an ID of "1" -> FE will know SSE stream ended and persist messages to IndexedDB cache.
  • BE
    • Implement using Spring Webflux (Project Reactor)
    • Server will detect if client disconnects and abort the operation
  • FE
    • Messages are loaded as they are received
    • Once last message is received, a full message-list refresh is triggered (Removes deleted messages) and complete list of messages is persisted in IndexedDB folder's message cache

Message fetch signal stopped working

Each time a user selects a folder, a refresh of the folder's message cache is issued to the API server.

If user selects a different folder before the previous fetch completed, previous fetch should be aborted.

This issue may have been caused after #33 was implemented.

Downloadable attachments

Requirements

  • Attachments should be downloadable though an endpoint
  • Endpoint will require folderId, messageId and attachmentFileName/contentId
  • Endpoint will respond with a byte stream and the attachment's Content-Type and OK status

Replace sessionStorage with encrypted IndexedDb

  • Generate SHA-256 hash from serverHost-user to use as IndexedDB store key (userId)
  • Generate SHA-256 hash from serverHost-user-password to use as password key (hash)
  • Store userId and hash in sessionStorage -> Allows page refresh
  • If userId+hash exists in sessionStorage (PageReload), retrieve state from IndexedDB using userID as object key and restore encrypted state using hash as password to decrypt it.
  • When a new state is published/stored, if key/userId exists in sessionStorage, update IndexedDB entry.

Plain text Credentials are never stored in FE, not even in Encrypted IndexedDB -> Always use hashes

https://github.com/bitwiseshiftleft/sjcl/

FE internationaliation

Requirements

  • All literals for FE must be internationalized
  • A basic i18n infrastructure is required
    • Application literals must be available in different languages
    • Application languages must be managed through VCS
  • User language to be detected from browser language
  • All current application literals should be translated (en+es)
  • All new application literals should be available in English and Spanish

Integrate react-i18next library for internationalization of client.

Display list of attachments in message-viewer

Requirements

  • List of e-mail attachments to be displayed
  • Attachments should be displayed on top of the message content
  • Attachment container should scroll with message content
  • Attachment container to contain a card for each attachment
  • Attachment cards are clickable
  • Attachment card click triggers download

Partial loads for first request to folder list + messages

Requirementes

In order to improve load times for slow servers or mail accounts with a large number of folders or messages, initial load logic should be as follows:

  • Initial folder list is loaded using two requests, first request will load first level folders, second request will load complete hierarchy of folders.
  • Whenever messages for a folder are loaded for the first time or are empty, load should happen in two phases. First phase will load first 30* messages, second phase should load the complete list of messages for the selected folder.

Identify special folders

Requirements

  • Special IMAP folders (Inbox, Drafts, Sent, Trash) should be identified and positioned accordingly.
  • A special icon should also be visible for these type of folders.
  • Identification (except for INBOX) of folders should be done exclusively using IMAP folder list attributes

Initial message retrieval + display

Requirements

  • Messages to be retrieved using server API
  • Messages should be displayed in the message grid

AC

  • On application load, INBOX messages are shown in message grid
  • On folder click, messages are replaced by messages in that folder

Front-End message cache + virtual pagination (infinite scroll) for Message List

Requiremets

  • All messages from a folder should be stored in Front End cache / store
  • Inbox messages should be automatically loaded when application loads (after initial folder retrieval)
  • Virtual pagination should be implemented in message list for performance
  • When switching folders, if messages exist in cache, messages should be displayed immediately.
  • Selecting a folder triggers a cache update, once the new messages are retrieved message-list should be updated.
  • Selected folder should be highlighted in folder-list

Move to folder feature -> Messages draggable to folders

Requirements

  • Messages can be moved to another folder by dragging them from the Message List
  • Spike implementation only requires to be able to move one message at a time
  • Message disappears from originating folder as soon as it's dropped to the target folder
  • Message should appear in target folder once the BE request has completed

Remove unnecessary margin in <p> of message-viewer

Requirements

  • Message-Viewer must not add additional spacing between <p> tags when displaying HTML messages (in Chrome)

Currently chrome adds margins to <p> tags when no customized styles exist using the following default CSS:

-webkit-margin-before:0em;
-webkit-margin-after:0em;

Create initial layout

Create an initial layout for the application FE showing a list of folders and messages.

Requirements

  • Material design for styling
  • Toggleable side bar showing folders
  • Messages shown in a list
  • Initial action buttons (Compose...) place holder to be implementes using FAB buttons
  • Interface to be responsive

AC

  • An initial layout is shown when accessing the application

Integrate SonarCloud

Requirements

  • Project should be analyzed with Sonar after every CI build
  • Analysis should be performed automatically without any user supervision.

From travis-ci

Inspecting code with the SonarQube Scanner

Before inspecting your code, you need to:

  1. Create a user authentication token for your account on SonarCloud.
  2. Encrypt this token travis encrypt abcdef0123456789 or define SONAR_TOKEN in your Repository Settings
  3. Find which SonarCloud.io organization you want to push your project on and get its key
  4. Create a sonar-project.properties file for your project (see the documentation).

live example project

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.