How to build a startup * from a mobile dev perspective
+ - 0:00:00
Notes for current slide
Notes for next slide

Работал в Yandex, Mail.ru, занимался мобильной разработкой

Увлекаюсь социальными танцами

Полтора года назад сделал прототип ивентного сервиса для знакомых фестивалей

How to build a startup

from a mobile dev perspective

Dmitry Melnikov

1 / 47

About

EventSheep

eventsheep-logo.svg

eventsheep

2 / 47

Работал в Yandex, Mail.ru, занимался мобильной разработкой

Увлекаюсь социальными танцами

Полтора года назад сделал прототип ивентного сервиса для знакомых фестивалей

Plan

How to build a modern software product / service / pet project

With minimal resources

From a mobile developer perspective

silicon-valley

3 / 47

How to reuse mobile dev knowledge

Plan

Approach

  • startup / business / pet project
  • vision
  • market research
  • custdev / presales
  • MVP
  • design
  • team
  • sales

Tech

  • essential technologies
  • backend (API, headless cms)
  • web clients (Jamstack)
  • deploy
  • mobile clients (native / multiplatform techs review)
4 / 47

Goal

Discuss non-technical considerations

Give a review of a modern tech stack

Shortcuts for a mobile developer

Pragmatic choice of technologies

With limited resources in mind

5 / 47

Approach

Project goal

Party

Pet project

Startup

Business

6 / 47

Party

Молодым и активным просто нравится тусоваться, поэтому такие хакатонные команды, как правило, останавливаются на процессе, не заботясь о результате (продажах).

Pet project

Для многих Pet project – монотонно убывающая функция, потому что интерес пропадает на моменте, когда новая технология изучена и опробована. А вдохновения от реальных пользователей нет.

Startup

Некоторые изначально исходят из идеи стартапа. Мои друзья делают сервис PaaS с гибридным клаудом, распределенным

История про стартап Толи Макаревича

Gistroll / Educa

В 2014 он уволился и пошел в бизнес-инкубатор Яндекса. Сделал платформу для опросов и квизом, она взлетела и они собрали 1М пользователей за полтора месяца. Но заработали с этого всего какие-то десятки тысяч $

Потом переделали её в сервис обучения английского. И дела были оч хорошо – 40К юзеров, 1К платящих. Он это финансировал сам и потратил кучу денег. В итоге в 2015 грянул кризис и он всё свернул, отказавшись от инвестиций. Как он говорил, когда своих денег почти не осталось, то как-то странно было брать деньги и вливаться в историю на 5-10 лет. Типа по дешевке купил MBA.

Сейчас он делает бизнес SQLhabit.com

Approach

Vision

Vision is a foundation

Если есть видение (vision) того, какой ты хочешь получить результат, то вспомогательные средства не нужны. Четкий, ясный вижн всё делает сам.

Основа успешного стартапа – это рынок, для которого он делает продукт. Если хороший рынок, то "нормальная" команда добьётся заметного успеха. Если плохой рынок, то не спасет и "суперкоманда", нацеленная на кратный рост (и все такое прочее).

Курсы, тренинги, хакатоны – это хорошо, но как косметическая припарка, не более.

Dmitry Tarasov, Chaos Control founder

7 / 47

Если есть видение (vision) того, какой ты хочешь получить результат, то вспомогательные средства не нужны. Четкий, ясный вижн всё делает сам.

Основа успешного стартапа - это рынок, для которого он делает продукт. Если хороший рынок, то "нормальная" команда добьётся заметного успеха. Если плохой рынок, то не спасет и "суперкоманда", нацеленная на кратный рост (и все такое прочее).

Хакатоны, курсы, тренинги – это хорошо, но как косметическая припарка, не более.

https://www.facebook.com/tarasov.dmitriy/posts/10159432210848782

Approach

Market Research

Rusprofile

Crunchbase

8 / 47

История про Go Here, которые не понимали что они делают и зачем. Рынок исследовали натуралистически, не изучая как зарабатывать и сойдется ли экономика.

Для моего случая топовые игроки в РФ имеют оборот > 500 млн ₽ в год.

Approach

Customer Development

Presales

9 / 47

История про почти пустой рынок Egoistica из-за его нелегального состояния (Market Research недоступен). И я все время основателю советовал общаться с потенциальными пользователями, чтобы было понимание надо это кому-то или нет.

В идеале провести presales.

Approach

MVP

Forms your product vision

Helps to build roadmaps, milestones, etc…

10 / 47

Проверка боем нужна, это формирует продуктовое понимание. Становятся очевидными пути развития, roadmap и прочее.

Approach

Design

❤️ designers

11 / 47

Без красивой обертки – никуда. Держитесь толковых дизайнеров и иллюстраторов. Лучше вести с ними дружбу, холить и лелеять, чтобы потом в нужный момент они помогли. Ресурсов платить по $500 за логотип у вас может не быть.

Approach

Team

12 / 47

Один из самых сложных процессов без ресурсов – подбор команды.

Заметно легче начинать с рядом единомышленников, причем желательно разнонаправленных. Особенно внимательно смотрите на те области, где у вас меньше всего компетенций. Для разработчиков это, как правило, продажи, маркетинг и прочее.

Сложность в том, что и с самим собой бывает непросто договориться. А уж с другими голодными людьми и подавно.

Approach

Sales

Ads

Cold emails / calls

Sales Navigator (LinkedIn)

13 / 47

Круг заинтересованных знакомых закончится довольно быстро. Еще до того как вы начнете работы над продуктом, вам нужен план, что и как вы будете продавать.

Проработайте четкий алгоритм где и как вы будете брать клиентов, потому что больших бюджетов на контекст может не быть.

B2B: Sales Navigator (Linked In) B2C: холодные рассылки/звонки по заранее сформированному списку потенциальных клиентов

Approach

Limited resources

Read as: no resources

1000 days rule

14 / 47

Все время держать в голове Limited resources. Нельзя импульсно потратить инвестиции (сбережения) на то, что не даст результат.

Правило 1000 дней, после которых вероятно начнутся реальные заработки (от https://popmechanic.io/)

A Typical Service Structure

Backend (API)

Storage

Static landing (SSG)

Admin console (SPA)

Web front (SSR)

CDN

Mobile clients

15 / 47

A Typical Service Structure

Backend (API)

Storage

Static landing (SSG)

Admin console (SPA)

Web front (SSR)

CDN

Mobile clients

Is it possible to build a product being on your own?

15 / 47

A Full Stack Developer

"Full stack" now means you can:

  • build front-ends
  • write back-ends
  • handle devops
  • start a podcast
  • curate a newsletter
  • crack an egg with one hand
  • animate a Pixar movie
  • dunk

full-stack-dev

16 / 47

A Full Stack Developer

Dear recruiters, if you are looking for:

  • Java, Python, PHP
  • React, Angular
  • PostgreSQL, Redis, MongoDB
  • AWS, S3, EC2, ECS, EKS
  • *nix system admin
  • Git + CI + TDD
  • Docker, Kubernetes

That's not a Full Stack Dev. That’s an entire IT department.

© Giulio Carrara, Software Engineer

full-stack-dev-2

17 / 47

Backend

Dev hierarchy

At Google, most engineers are too snooty to do mobile or web programming. “I don’t do frontend”, they proclaim with maximal snootiness. Steve Yegge

DAG of Disdain

At the top of Snoot Mountain sit the lofty Search engineers writing in C++, which is considered cooler than Java, which is cooler than Python, which is cooler than JavaScript.

And Search is cooler than Ads, which is cooler than Apps, which is cooler than Tools, which is cooler than Frontends. And so on.

Who will steal Android from Google?

18 / 47

At Google, most engineers are too snooty to do mobile or web programming. “I don’t do frontend”, they proclaim with maximal snootiness.

There’s a phenomenon there that I like to call the “DAG of Disdain”, wherein DAG means Directed Acyclic Graph, which is a bit like a flowchart.

At the top of Snoot Mountain sit the lofty Search engineers writing in C++, which is considered cooler than Java, which is cooler than Python, which is cooler than JavaScript.

And Search is cooler than Ads, which is cooler than Apps, which is cooler than Tools, which is cooler than Frontends. And so on.

Programmers love to look down on each other. And if you’re unlucky enough to be a Google mobile engineer, you’re stuck scuffling around at the bottom of several totem poles with everyone looking down on you.

Backend

Badass backend dev pitfall

server(s)

cache

microservices

OpenAPI / GRPC / QUIC

100% test coverage

🍒 bit operations

19 / 47

Backend

Stop future proofing software

We need {X}, despite {Y} being a much easier alternative, because when {Z}, it will make our lives easier.

Where {Z} is an event that might happen sometime in the far future.

20 / 47

Backend

Stop future proofing software

We need {X}, despite {Y} being a much easier alternative, because when {Z}, it will make our lives easier.

Where {Z} is an event that might happen sometime in the far future.

Here’s some examples:

  • We need to use a Kubernetes & Docker based solution for our infrastructure, despite a single large server being a much easier alternative, because when we will need to scale it up to 11, it will make our lives easier.
20 / 47

Backend

Stop future proofing software

We need {X}, despite {Y} being a much easier alternative, because when {Z}, it will make our lives easier.

Where {Z} is an event that might happen sometime in the far future.

Here’s some examples:

  • We need to use a Kubernetes & Docker based solution for our infrastructure, despite a single large server being a much easier alternative, because when we will need to scale it up to 11, it will make our lives easier.

  • We need a distributed design for our data processing, despite a centralized solution being a much easier alternative, because when a customer demands 5 9s of uptime in the SLA, it will make our lives easier.

20 / 47

https://blog.cerebralab.com/Stop_future_proofing_software by

  • We need to hire a team of developers and build in-house software, despite wordpress and shopify being a much easier alternative, because when our customer base grows to 100 times what it is now, it will make our lives easier.

  • We need to use an inheritance based design for our types, despite composition being a much easier alternative, because after 5 years of codebase growth, it will make our lives easier.

  • We need to write this code in C++ and have a materialized views based caching layer, despite a Python script that queries Postgres directly being a much easier alternative, because when our data volume increase by a lot, it will make our lives easier.

Backend

Stop future proofing software

Achieving success is harder than living with it

The problem here is twofold:

  1. Achieving growth is much harder than supporting it
  2. Most exceptional and popular engineers work on products that have to scale
21 / 47

Backend

Stop future proofing software

Achieving success is harder than living with it

The problem here is twofold:

  1. Achieving growth is much harder than supporting it
  2. Most exceptional and popular engineers work on products that have to scale

Design for flexibility, create the imperfect

I hate code, and I want as little of it as possible in our product.

Jack Diederich

21 / 47

Backend

Stop future proofing software

Achieving success is harder than living with it

The problem here is twofold:

  1. Achieving growth is much harder than supporting it
  2. Most exceptional and popular engineers work on products that have to scale

Design for flexibility, create the imperfect

I hate code, and I want as little of it as possible in our product.

Jack Diederich

Design optimistically, the future may pleasantly surprise you

21 / 47

Backend

Application server

Spring Boot

Too much "convention over configuration"

DI, DAO

Javalin

Simple and polished

AnySimpleApplicationServer<T>

There are lots of alternatives (Ktor / Vapor / Perfect)

gRPC

22 / 47

Storage

CAP considerations

Distributed

PostgreSQL

Or…

cap.jpg

23 / 47

Storage

SQLite

SQLite is a self-contained, file-based and fully open-source RDBMS created by D. Richard Hipp in 2000.

  • mature
  • lightweight
  • robust
  • embedded (1 file*)

Does it work at all under load? Yes, with WAL

Sqlite has 10x more test code than source code:
≈1200 tests vs ≈120 source files | 80 Mb test code vs 8 Mb source code.

Even some distributed solutions are based on SQLite:

24 / 47

Storage

SQLDelight

ORM upside down: not sources → SQL, but SQL → sources

*.sq files with SQL and named queries

It generates typesafe Kotlin APIs from your SQL statements. It verifies your schema, statements, and migrations at compile-time and provides IDE features like autocomplete and refactoring which make writing and maintaining SQL simple.

SQLDelight does slightly less than a mature ORM. But less is more.

Can be used in iOS and Android with KMM.

And even on a JVM backend with different RDBMS (MySQL, PostgreSQL, HSQL, SQLite).

25 / 47

Backend & Storage Stunt Double

BaaS

Back4App | back4app.com

Firebase | firebase.google.com

26 / 47

Backend & Storage Stunt Double

Headless CMS

Strapi | strapi.io

Contentful | contentful.com

Directus | directus.io

27 / 47

Backend & Storage Stunt Double

Headless CMS

Strapi | strapi.io

Contentful | contentful.com

Directus | directus.io

or even 😳

Google Drive CMS | drivecms.xyz

perfect-db.jpg)

27 / 47

Frontend

Why?

It covers all platforms at once

Why not?

It's a whole new world

28 / 47

Frontend

web-dev.jpg

29 / 47

Frontend

Node - a JavaScript runtime built on Chrome's V8 JavaScript engine

NPM - the package manager for Node.js

Webpack - a module bundler

Framework

Vue | React | Svelte

Typescript

Is good enough

CSS (SASS / SCSS)

30 / 47

Frontend

Admin console

CSR | SPA

dashboard.png

32 / 47

Frontend

Admin console

CSR | SPA

<!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Single page application</title>
<link href=/js/app.93487a00.js rel=preload as=script>
<link href=/js/chunk-vendors.25dcdeb2.js rel=preload as=script>
</head>
<body>
<div id=app></div>
<script src=/js/chunk-vendors.25dcdeb2.js></script>
<script src=/js/app.93487a00.js></script>
</body>
</html>
33 / 47

Frontend

Admin console

CSR | SPA

Pros

  • simple to build
  • fully static deploy

Cons

  • performance
  • lack of SEO
34 / 47

Frontend

Consumer website

SSR with hydration

eventsheep

35 / 47

Frontend

Landing

Static SSR | built with SSG (Static Site Generator)

Jekyll / Hugo

Next.js / Gatsby

Nuxt.js / VuePress

Serverless functions

Modern forms

based on chat bots | without backend | with notifications

Jamstack

Pre-rendering | Decoupling | serving directly from CDN

36 / 47

Deployment

Nginx

Web server

Load balancer

SSL termination

Reverse proxy (router)

Rate Limiter

HTTP cache

Mail proxy

37 / 47

Deployment

TLS certificates | Let's Encrypt

Simple cases

  • admin.somehost.com
  • api.somehost.com
  • frontend.somehost.com

Docker nginx-proxy + acme-companion

Complex cases with wildcard certificates

  • *.somehost.com
  • user1.somehost.com

DNS-01 challenge

38 / 47

Deployment

Docker

To isolate their app from its environment

Container is an isolated process on a host

Image is a isolated filesystem for a container to work with all deps, configuration, scripts, etc

version: '3.7'
services:
api:
image: username/eventsheep-api-image:${VERSION_API}
container_name: eventsheep-api-${VERSION_API}
volumes:
- data:/data
environment:
- BUILD_TYPE=release
restart: always
39 / 47

Cloud provider

Digital Ocean

AWS

Russian alternatives

40 / 47

CDN

Object storage with a built-in CDN for images & files

Providers

Digital Ocean Spaces

AWS S3

Russian alternatives

41 / 47

Mobile

Native development

$$$

42 / 47

Mobile

Cross-platform

  • C/C++ native libraries
  • QT (1995)
  • PhoneGap/Cordova (2009, 2011 Adobe)
  • React Native (2015, Facebook)
  • Xamarin (2011, 2016 Microsoft)
  • Flutter (2017)
  • Kotlin/Native, Kotlin/Multiplatform (2017)
  • и другие (Ionic, Sencha, Quasar …)

mdv.eventsheep.com/cross-platform

43 / 47

Final thoughts

spiderman-lecture.jpg

44 / 47

Final thoughts

Timing

Task Time, months
MVP backend refactoring 0.5
Diving into Vue 0.5 - 0.75
CSR SPA admin console 2.5
SSR web client 1.5
Deploy 0.5
Wildcard certs 0.5
CMS 1.5
Linkify, Markdown, YouTube 1
Landing 1
Forms 1.5
45 / 47

Final thoughts

Cons

It's a challenge

Requires knowledge and experience

Assumes investments

You're on your own

Pros

Inspiring & encouraging

Knowledge boost

Like a child

Valuable

46 / 47

The end

Dmitry Melnikov

melnikovdv@gmail.com

t.me/melnikovdv

47 / 47

About

EventSheep

eventsheep-logo.svg

eventsheep

2 / 47

Работал в Yandex, Mail.ru, занимался мобильной разработкой

Увлекаюсь социальными танцами

Полтора года назад сделал прототип ивентного сервиса для знакомых фестивалей

Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow