How to build a minimalist mood tracker with an API, secure SQL storage and authentication in Svelte / Sapper.

Svelte has been seeing increasing amounts of traction lately but there are sometimes a bit of a dearth of examples of how to use it to build real-life applications. This tutorial illustrates how to build a minimalist application that stores its data in a database and requires login.

You can find the complete code on Github.

Project setup

We will use Sapper, the Svelte-powered server for easily building isomorphic applications. You can set up a new project with a single command:

npx degit “sveltejs/sapper-template#rollup” sapper-mood

“sapper-mood” is the name of the project you’re creating.

By default, the project is plain JavaScript. To switch to TypeScript, run node scripts/setupTypeScript followed by yarn to install dependencies and yarn run dev to start the development server. …


From someone who has lived exclusively in Airbnbs for years

I’ve been living permanently in Airbnbs for years. I have 250+ Airbnb stays all around the world, from Tokyo to small villages in Mexico, from small towns in Poland to San Francisco.

In many cases the stay was needlessly spoiled by things the host didn’t think of. Many of these are easy to fix and seem to happen again and again. I therefore thought I’d write a guest’s perspective on what makes for a good Airbnb stay.

Image for post
Image for post
What’s outside the window? Oh, the floor of a ventilation shaft full of garbage where the neighbor rummages around in the morning.

The listing

All communication benefits from being concise but unambiguous. An Airbnb listing is no exception.

When choosing an apartment I frequently spend hours trying to figure out basic things about the apartment. Is this photo the other side of the living room or a separate room? Does that mean there are two rooms? Is that a tree outside the window? So it’s on the ground floor? Is there a router anywhere on a picture or might it be in a different apartment? …

Andreas Ehrencrona

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store