Read the Guide: How to Launch Nylas Scheduler in 5 Minutes
How to Run Inbox Zero
Inbox Zero is built using:
- Next.js, a framework for making server-rendered React apps
- Express.js to create RESTful endpoints on the server
- JSON Web Tokens (JWT) for authentication and session management
- Lowdb, a lightweight key-value database powered by Lodash, for storing user information
- The Nylas Node SDK – A client helper library that makes it easy to leverage the Nylas Communications Platform.
To get ready to run this app, first, make sure you have Node installed on your local machine, then download the Inbox Zero git repo:
git clone https://github.com/nylas/inbox-zero.git && cd inbox-zero
Before you can use Inbox Zero, you need a Nylas account. If you don’t have one already, register now for a free trial. You can use the app that comes preconfigured with your Nylas account, or set up your own. Once you’ve created your account, take note of the Client ID and Client Secret for your Nylas App, we’ll need them in a moment.
Inbox Zero stores the Nylas client ID and secret as environment variables, along with a secret that will be used to sign JWTs. For easy environment management, copy the .example-env file found in the repos top level directory to a file named .env. Then, add your Nylas App client ID and secret to the appropriate lines and create a unique string for the JWT_SECRET variable.
One last thing to consider: some providers have stricter requirements for user access. If you want to connect Google or Office365 accounts to Nylas, follow the setup instructions found at those links. Before you attempt to login to the Inbox Zero app, you’ll also need to register the callback address for the app with Nylas. In the Nylas dashboard, head to All Applications, press the Edit button next to your app, and add http://localhost:3000/api/authorize under the Callbacks tab. You’ll only have to do this once.
Once all of this is done, run the following commands from the terminal, inside the Inbox Zero git repo to run the app.
npm run local
You should now be able to access the Inbox Zero app by visiting http://localhost:3000 in your web browser. Feel free to poke around in the app’s code and make your own modifications. Got some cool ideas for this app? Share them in the comments below.
The Nylas Communications Platform
The Nylas Communications Platform is the easiest way to add full email functionality to your app, and with the information in this article, you’re now ready implement full email functionality into your app. But why stop there? With Nylas, developers also unlock the full capability of users’ calendars and contact books, and these combined with email functionality allow you to turn your app into a scheduling powerhouse. Let Nylas be the backend for your next email, calendar, and contacts integration and free up more time to focus on the features your users love.