Skip to content

Commit b70e2db

Browse files
authored
Merge pull request #2: Cleanup in preparation for open sourcing
Cleanup in preparation for open sourcing
2 parents 4ca35bf + 8d700e7 commit b70e2db

File tree

419 files changed

+462
-2371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

419 files changed

+462
-2371
lines changed

.gitignore

+1-14
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,6 @@
88
**/.arclint
99
**/arclib
1010

11-
##### Client Private Plugins (symlinked)
12-
**/client-app/src/error-logger-extensions
13-
**/client-app/src/nylas-private-*
14-
**/internal_packages/nylas-private-*
15-
**/internal_packages/activity-list
16-
**/internal_packages/composer-mail-merge
17-
**/internal_packages/composer-scheduler
18-
**/internal_packages/link-tracking
19-
**/internal_packages/open-tracking
20-
**/internal_packages/send-later
21-
**/internal_packages/send-reminders
22-
**/internal_packages/thread-sharing
23-
**/internal_packages/client-sync
24-
2511
##### Node modules
2612
node_modules
2713
!packages/client-app/spec/fixtures/packages/package-with-incompatible-native-module/node_modules
@@ -73,3 +59,4 @@ scripts/venv
7359

7460
# OAuth client secret for talking to Google Sheets
7561
client_secret.json
62+
/packages/client-app/internal_packages/client-sync

.travis.yml

+2-14
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,7 @@ matrix:
3030
- os: linux
3131
env: NODE_VERSION=6.9 CC=gcc-4.8 CXX=g++-4.8 DEBUG="electron-packager:*" INSTALL_TARGET=client
3232
- os: osx
33-
env: NODE_VERSION=6.9 CC=clang CXX=clang++ SIGN_BUILD=true DEBUG="electron-packager:*" INSTALL_TARGET=client
34-
35-
before_install:
36-
- openssl aes-256-cbc
37-
-K $encrypted_faf2708e46e2_key
38-
-iv $encrypted_faf2708e46e2_iv
39-
-in packages/client-private-plugins/encrypted_certificates/travis/travis-files.tar.enc
40-
-out packages/client-private-plugins/encrypted_certificates/travis/travis-files.tar
41-
-d;
42-
- mkdir packages/client-app/build/resources/certs;
43-
- tar xvf packages/client-private-plugins/encrypted_certificates/travis/travis-files.tar
44-
--directory=packages/client-app/build/resources/;
45-
- source packages/client-app/build/resources/certs/mac/set_unix_env.sh;
33+
env: NODE_VERSION=6.9 CC=clang CXX=clang++ DEBUG="electron-packager:*" INSTALL_TARGET=client
4634

4735
install:
4836
- git clone https://github.com/creationix/nvm.git /tmp/.nvm
@@ -51,7 +39,7 @@ install:
5139
- nvm use --delete-prefix $NODE_VERSION
5240

5341
script:
54-
- npm install && npm run build-client && npm run upload-client
42+
- npm install && npm run build-client
5543

5644
cache:
5745
directories:

README.md

+122-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
1-
# Nylas Mail
1+
# Nylas Mail - the open-source, extensible mail client
2+
![N1 Screenshot](https://github.com/nylas/nylas-mail-all/raw/cleanup/screenshot/hero_graphic_mac%402x.png)
23

3-
This is a collection of all components required to run Nylas Mail.
4+
**Nylas Mail is an open-source mail client built on the modern web with [Electron](https://github.com/atom/electron), [React](https://facebook.github.io/react/), and [Flux](https://facebook.github.io/flux/).** It was designed to be easy to extend, and many third-party plugins are available that add functionality to the client.
5+
6+
**⚠️ Nylas Mail was initially released and open-sourced in early 2015 and was maintained by Nylas until Spring 2017.** While Nylas no longer supports Nylas Mail, you can download the latest release or build it from source. There are also **[several forks](#forks)** that are being actively developed and maintained.
7+
8+
# Getting Started
9+
10+
## Setup your Environment (Mac):
11+
12+
1. Install [Homebrew](http://brew.sh/)
13+
1. Install [NVM](https://github.com/creationix/nvm) & Redis `brew install nvm redis`
14+
1. Install Node 6 via NVM: `nvm install 6`
15+
1. `npm install`
16+
17+
## Setup your Environment (Linux - Debian/Ubuntu):
18+
19+
1. Install Node 6+ via NodeSource (trusted):
20+
1. `curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -`
21+
1. `sudo apt-get install -y nodejs`
22+
1. Install Redis locally `sudo apt-get install -y redis-server redis-tools`
23+
benefit of letting us use subdomains.
24+
1. `npm install`
25+
26+
## Running Nylas Mail
27+
28+
1. `npm run client`: Starts the app
29+
1. `npm run test-client`: Run the tests
30+
1. `npm run lint-client`: Lint the source (ESLint + Coffeelint + LESSLint)
31+
32+
### Exploring the Source
33+
34+
This repository contains the full source code to the Nylas Mail client and it's backend services. It is divided into the following packages:
435

536
1. [**Isomorphic Core**](https://github.com/nylas/nylas-mail-all/tree/master/packages/isomorphic-core): Shared code across local client and cloud servers
637
1. [**Client App**](https://github.com/nylas/nylas-mail-all/tree/master/packages/client-app): The main Electron app for Nylas Mail
@@ -15,24 +46,98 @@ See `/packages` for the separate pieces. Each folder in `/packages` is
1546
designed to be its own stand-alone repository. They are all bundled here
1647
for the ease of source control management.
1748

18-
# Initial Setup for All Local & Cloud Services:
49+
## Digging Deeper
1950

20-
## New Computer (Mac):
51+
In early 2016, the Nylas Mail team wrote [extensive documentation](https://nylas.github.io/nylas-mail/) for the app that was intended for plugin developers. This documentation lives on GitHub Pages and offers a great overview of the app's architecture and important classes. Here are some good places to get started:
2152

22-
1. Install [Homebrew](http://brew.sh/)
23-
1. Install [NVM](https://github.com/creationix/nvm) & Redis `brew install nvm redis`
24-
1. Install Node 6 via NVM: `nvm install 6`
53+
- [Application Architecture](https://nylas.github.io/nylas-mail/guides/Architecture.html)
54+
- [Debugging Nylas Mail](https://nylas.github.io/nylas-mail/guides/Debugging.html)
2555

26-
## New Computer (Linux - Debian/Ubuntu):
56+
The team has also given conference talks and published blog posts about the client:
2757

28-
1. Install Node 6+ via NodeSource (trusted):
29-
1. `curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -`
30-
1. `sudo apt-get install -y nodejs`
31-
1. Install Redis locally `sudo apt-get install -y redis-server redis-tools`
32-
benefit of letting us use subdomains.
58+
- [ReactEurope: How React & Flux Turn Apps Into Extensible Platforms](https://www.youtube.com/watch?v=Uu4Yz2HmCgE)
59+
- [ForwardJS: Electron, React & Pixel Perfect Experiences](https://www.youtube.com/watch?v=jRPUB-D1Wx0&list=PL7i8CwZBnlf7iUTn2JMVLLWofAhaiK7l3)
60+
61+
- [Blog: Splitting from Atom](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/splitting-from-atom.pdf)
62+
- [Blog: Building Plugins for React Apps](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/plugins.pdf)
63+
- [Blog: Nylas Mail Build Process](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/build-process.pdf)
64+
- [Blog: Low level Electron Debugging](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/electron-debugging.pdf)
65+
- [Blog: A New Search Parser](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/search-parser.pdf)
66+
- [Blog: Developers Guide to Emoji](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/emoji.pdf)
67+
- [Blog: Nylas Pro](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/nylas-pro.pdf)
68+
- [Blog: Nylas Mail & PGP](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/pgp.pdf)
69+
- [Blog: Calendar Events and RRULEs](https://github.com/nylas/nylas-mail-all/raw/cleanup/blog-posts/rrules.pdf)
70+
71+
## Running the Cloud
72+
73+
When you download and build Nylas Mail from source it runs without its cloud components. The concept of a "Nylas ID" / subscription has been removed, and plugins that require server-side processing are disabled by default. (Plugins like Snooze, Send Later, etc.)
74+
75+
In order to use these plugins and get the full Nylas Mail experience, you need to deploy the backend infrastructure located in the `cloud-*` packages. Deploying these services is challenging because they are implemented as microservices and designed to be run at enterprise scale with Redis, Postgres, etc. Because these backend services must access your email account, it is also important to use security best-practices (at the very least, SSL, encryption at rest, and a partitioned VPC). For more information about building and deploying this part of the stack, check out the [cloud-core README](https://github.com/nylas/nylas-mail-all/blob/master/packages/cloud-core/README.md).
76+
77+
## Themes
78+
79+
The Nylas Mail user interface is styled using CSS, which means it's easy to modify and extend. Nylas Mail comes stock with a few beautiful themes, and there are many more which have been built by community developers
80+
81+
![N1 Themes](https://github.com/nylas/nylas-mail-all/raw/cleanup/screenshot/687474703a2f2f692e696d6775722e636f6d2f505751374e6c592e6a7067.jpg)
82+
83+
#### Bundled Themes
84+
- [Dark](https://github.com/nylas/nylas-mail/tree/master/internal_packages/ui-dark)
85+
- [Darkside](https://github.com/nylas/nylas-mail/tree/master/internal_packages/ui-darkside) (designed by [Jamie Wilson](https://github.com/jamiewilson))
86+
- [Taiga](https://github.com/nylas/nylas-mail/tree/master/internal_packages/ui-taiga) (designed by [Noah Buscher](https://github.com/noahbuscher))
87+
- [Ubuntu](https://github.com/nylas/nylas-mail/tree/master/internal_packages/ui-ubuntu) (designed by [Ahmed Elhanafy](https://github.com/ahmedlhanafy))
88+
- [Less Is More](https://github.com/nylas/nylas-mail/tree/master/internal_packages/ui-less-is-more) (designed by [Alexander Adkins](https://github.com/P0WW0W))
89+
90+
#### Community Themes
91+
| | | |
92+
| ----- | ----- | ----- |
93+
| [ToogaBooga](https://github.com/brycedorn/N1-ToogaBooga) | [Material](https://github.com/jackiehluo/n1-material) | [Monokai](https://github.com/dcondrey/n1-monokai) |
94+
| [Agapanthus](https://github.com/taniadaniela/n1-agapanthus)—Inbox-inspired theme | [Stripe](https://github.com/oeaeee/n1-stripe)| [Kleinstein](https://github.com/diklein/Kleinstein)—Hides account sidebar|
95+
| [Arc Dark](https://github.com/varlesh/Nylas-Arc-Dark-Theme)| [Solarized Dark](https://github.com/NSHenry/N1-Solarized-Dark) | [Darkish](https://github.com/dyrnade/N1-Darkish)|
96+
| [Predawn](https://github.com/adambmedia/N1-Predawn)| [Ido](https://github.com/edipox/n1-ido)—Polymail-inspired theme|[Berend](https://github.com/Frique/N1-Berend) |
97+
| [ElementaryOS](https://github.com/edipox/elementary-nylas) | [LevelUp](https://github.com/stolinski/level-up-nylas-n1-theme)|[Sunrise](https://github.com/jackiehluo/n1-sunrise) |
98+
| [BoraBora](https://github.com/arimai/N1-BoraBora) | [Honeyduke](https://github.com/arimai/n1-honeyduke)| [Snow](https://github.com/Wattenberger/N1-snow-theme)|
99+
|[Hull](https://github.com/unity/n1-hull)|[Express](https://github.com/oeaeee/n1-express)|[DarkSoda](https://github.com/adambullmer/N1-theme-DarkSoda)|
100+
|[Bemind](https://github.com/bemindinteractive/Bemind-N1-Theme)|[Dracula](https://github.com/dracula/nylas-n1)|[MouseEatsCat](https://github.com/MouseEatsCat/MouseEatsCat-N1)|
101+
|[Sublime Dark](https://github.com/rishabhkesarwani/Nylas-Sublime-Dark-Theme)|[Firefox](https://github.com/darshandsoni/n1-firefox-theme)|[Gmail](https://github.com/dregitsky/n1-gmail-theme)|
102+
103+
#### To install community themes:
104+
105+
1. Download and unzip the repo
106+
2. In Nylas Mail, select `Developer > Install a Package Manually... `
107+
3. Navigate to where you downloaded the theme and select the root folder. The theme is copied into the `~/.nylas-mail` folder for your convinence
108+
5. Select `Change Theme...` from the top level menu, and you'll see the newly installed theme. That's it!
109+
110+
Want to dive in more? Try [creating your own theme](https://github.com/nylas/nylas-mail-theme-starter)!
111+
112+
## Plugins
113+
114+
Some plugins come pre-installed, and are a great starting points for creating your own:
115+
116+
- [Translate](https://github.com/nylas/nylas-mail/tree/master/internal_packages/composer-translate)—Works with 10 languages
117+
- [Quick Replies](https://github.com/nylas/nylas-mail/tree/master/internal_packages/composer-templates)—Send emails faster with templates
118+
- [Emoji Keyboard](https://github.com/nylas/nylas-mail/tree/master/internal_packages/composer-emoji)—Insert emoji by typing a colon (:) followed by the name of an emoji symbol
119+
- [GitHub Sidebar Info](https://github.com/nylas/nylas-mail/tree/master/internal_packages/github-contact-card)
120+
- [View on GitHub](https://github.com/nylas/nylas-mail/tree/master/internal_packages/message-view-on-github)
121+
- [Personal Level Indicators](https://github.com/nylas/nylas-mail/tree/master/internal_packages/personal-level-indicators)
122+
- [Phishing Detection](https://github.com/nylas/nylas-mail/tree/master/internal_packages/phishing-detection)
123+
124+
#### Community Plugins
125+
126+
Note these are not tested or officially supported by Nylas, but we still think they are really cool! If you find bugs with them, please open GitHub issues on their individual project pages, not the Nylas Mail (N1) repo page. Thanks!
127+
128+
| | | |
129+
| ----- | ----- | ----- |
130+
|[Jiffy](http://noahbuscher.github.io/N1-Jiffy/)—Insert animated GIFs|[Weather](https://github.com/jackiehluo/n1-weather)|[Todoist](https://github.com/alexfruehwirth/N1TodoistIntegration)|
131+
|[Unsubscribe](https://github.com/colinking/n1-unsubscribe)|[Squirt Speed Reader](https://github.com/HarleyKwyn/squirt-reader-N1-plugin/)|[Website Launcher](https://github.com/adriangrantdotorg/nylas-n1-background-webpage)—Opens a URL in separate window|
132+
|[Cypher](https://github.com/mbilker/cypher)—PGP Encryption|[Avatars](https://github.com/unity/n1-avatars)|[Events Calendar (WIP)](https://github.com/nerdenough/n1-events-calendar)|
133+
|[Mail in Chat (WIP)](https://github.com/yjchen/mail_in_chat)|[Evernote](https://github.com/grobgl/n1-evernote)|[Wunderlist](https://github.com/miguelrs/n1-wunderlist)|
134+
|[Participants Display](https://github.com/kbruccoleri/nylas-participants-display)|[GitHub](https://github.com/ForbesLindesay/N1-GitHub)||
135+
136+
When you install packages, they're moved to ~/.nylas-mail/packages, and Nylas Mail runs apm install on the command line to fetch dependencies listed in the package's package.json
137+
138+
# Forks
33139

34-
# Running Nylas Mail
140+
There are several forks of Nylas Mail that you should check out!
35141

36-
1. `npm install` (Only on fresh install and new packages)
37-
1. `npm run start-client`: Starts Electron app client
38-
1. `npm run start-cloud`: Starts cloud API locally
142+
- [Merra](github.com/bengotow/N1) - Significant rewrite by one of the original authors focused on performance and cloud plugins
143+
- [Nylas Mail Lives](https://github.com/nylas-mail-lives/nylas-mail) - Community effort to fix bugs and improve the client!

appveyor.yml

-10
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,12 @@ install:
1313
- ps: nuget install secure-file -ExcludeVersion
1414
- ps: npm config set msvs_version 2013
1515

16-
# We need to extract the encrypted private ssh key to clone the submodule.
17-
- ps: |
18-
if ($env:DECRYPTION_PASSWORD) {
19-
secure-file\tools\secure-file -decrypt packages\client-private-plugins\encrypted_certificates\appveyor\win-nylas-n1.p12.enc -secret $env:DECRYPTION_PASSWORD
20-
secure-file\tools\secure-file -decrypt packages\client-private-plugins\encrypted_certificates\appveyor\set_win_env.ps1.enc -secret $env:DECRYPTION_PASSWORD
21-
. packages\client-private-plugins\encrypted_certificates\appveyor\set_win_env.ps1
22-
}
23-
2416
build_script:
2517
- cmd: npm install
2618

2719
deploy_script:
2820
- ps: |
2921
npm run build-client
30-
node packages/client-app/build/create-signed-windows-installer.js
31-
npm run upload-client
3222
3323
environment:
3424
matrix:

blog-posts/build-process.pdf

1.03 MB
Binary file not shown.

blog-posts/electron-debugging.pdf

216 KB
Binary file not shown.

blog-posts/emoji.pdf

951 KB
Binary file not shown.

blog-posts/nylas-pro.pdf

333 KB
Binary file not shown.

blog-posts/pgp.pdf

210 KB
Binary file not shown.

blog-posts/plugins.pdf

535 KB
Binary file not shown.

blog-posts/rrules.pdf

488 KB
Binary file not shown.

blog-posts/search-parser.pdf

695 KB
Binary file not shown.

blog-posts/splitting-from-atom.pdf

307 KB
Binary file not shown.

deploy-it

-64
This file was deleted.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"test-client": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --test",
5050
"test-client-window": "packages/client-app/node_modules/.bin/electron packages/client-app --enable-logging --test=window",
5151
"test-client-junit": "",
52+
"lint-client": "grunt lint --gruntfile=packages/client-app/build/Gruntfile.js --base=./",
5253
"build-client": "grunt build-client --gruntfile=packages/client-app/build/Gruntfile.js --base=./",
53-
"upload-client": "grunt upload-client --gruntfile=packages/client-app/build/Gruntfile.js --base=./",
5454
"cloud": "pm2 stop all; pm2 delete all; pm2 start packages/cloud-core/pm2-dev.yml --no-daemon",
5555
"cloud-debug": "pm2 stop all; pm2 delete all; pm2 start packages/cloud-core/pm2-debug-cloud-api.yml --no-daemon",
5656
"test-cloud": "cd packages/cloud-api && npm test && cd ../cloud-core && npm test && cd ../cloud-workers && npm test && cd ../isomorphic-core && npm test",

packages/client-app/build/Gruntfile.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,16 @@ module.exports = (grunt) => {
7474
// The Windows electron-winstaller task must be run outside of grunt
7575
]);
7676
} else if (grunt.option('platform') === 'darwin') {
77-
const subTasks = process.env.SIGN_BUILD ? ["setup-mac-keychain"] : []
78-
grunt.registerTask("build-client", subTasks.concat([
77+
grunt.registerTask("build-client", [
7978
"package",
8079
"create-mac-zip",
8180
"create-mac-dmg",
82-
]));
81+
]);
8382
} else if (grunt.option('platform') === 'linux') {
8483
grunt.registerTask("build-client", [
8584
"package",
8685
"create-deb-installer",
8786
"create-rpm-installer",
8887
]);
8988
}
90-
91-
grunt.registerTask("upload-client", ["upload"])
9289
}

packages/client-app/build/create-signed-windows-installer.js

-31
This file was deleted.

0 commit comments

Comments
 (0)