5
13 Comments

Ask IH: As a developer, what is your method of setting up a new web/mobile project?

Hi IH.

  • What is your method of setting up your project?

Here are some inspirational questions to help you answer the above question:

  • Do you use your own servers? What database do you use?
  • How do you app communicate with your database? API?
  • Do you do Django/Laravel/Firebase/custom REST/GraphQL?
  • How do you handle user authentication?
  • How do you handle users uploading/downloading files?
  • What frontend framework (if any) do you use?

I am in early stage building my BaaS product (nhost.io) and would love to get more insight into other developers flow/methods of setting up and starting developing a new app (web/mobile).

#ask-ih

on August 17, 2019
  1. 3

    This is an interesting question!

    The kind of hosting you choose mostly depend on your skillset. If you have some DevOps experience, setting up VPC, Encrypted EC2 images, etc. is not that complicated. If you have a front-end/UI background, you will go to "serverless" (i.e. managed hosting) solutions.

    User authentication, login but also API keys, password reset, 2FA, etc., and uploading/downloading files (at minimum profile pictures) tend to be "solved" issues that end up biting you back later on.

    At this point, I believe the default database of choice is Postgresql. If you have very peculiar performance constraints and deep understanding of database applications, then you might switch to MySQL (https://eng.uber.com/mysql-migration/).

    1. 1

      I agree with what you say. However, I am curious on your stack for new projects. Would love to hear how you approach a new project (in general) and what software/frameworks/system you use.

      1. 1

        That's the process with follow on a new project: https://djaodjin.com/services/.

        Technically, we create a create a new repo on GitHub based on a template Django project that builds as a Docker container, setup a Jenkins job to build the container, create a new site on djaodjin.com (SaaS hosting platform we built) and start pushing code to production. After that we start on the custom business logic for the customer (since auth, user profiles, payments and RBAC are already handled by DjaoApp: https://github.com/djaodjin/djaoapp/).

        1. 1

          Nice, looks really good. Any specific reason to why you are still doing server-side rendered web apps instead of using some front-end framework together with REST/GraphQL?

          1. 2

            Django doesn't mean server-side rendered web apps. In fact we do a lot of Vue.js and APIs (through django-rest-framework) at this point.
            The most important when starting a project with a small team is how fast and often you can deliver reliable code to production. There is little need for GraphQL when you can just modify the API end-point and deploy both, front-end and back-end, at the same time in one packaged Docker container.
            The team also found the double-template approach (Django-template, Vuejs-template) to work quite well in practice, especially to keep API-endpoints consistent between front-end and back-end (i.e. reverse("api_end_point") making its way into the JavaScript code). It is also a lot easier to handle i18n translation on the Django side as we found out recently.

            1. 1

              Thanks for the explanation. Interesting stack!

              1. 2

                Thank you. I've looked at nhost.io. It sounds really interesting too!

  2. 2

    Funny enough, but I use my own app templates (SaaSForge). I just need to set up a new database (PostgreSQL, I use elephantsql, free account), and that's it pretty much. Everything else (project configuration, styling, bundling, database models, basic UI) is already in the template.
    I keep all the code in Git and, when I'm ready to test it in the cloud, I just create a new app on Heroku and connect to Git repo.

    1. 1

      Nice, I love the idea that you build products for your self that you then use. Makes building much easier since you can always ask your self what you want out of the product.

      Did you encounter any painpoints/downsides with your current project?
      Any things in particular that you would like to improve in SaaSForge?

      1. 1

        Did you encounter any painpoints/downsides with your current project?
        The only painpoint is just I don't know how to get users.

        Any things in particular that you would like to improve in SaaSForge?
        Oh, yeah. There is a lot of things to be improved, many features to be added :))

        1. 1

          Cool, like what? :))

  3. 1

    I try to follow a decision process of thinking of how simple can it be and then how hard will it be to extend later.

    1. can it be a static only site? do I really need a database? If it's just static Ill deploy to Netlify.
    2. if I need a database can it just be sqlite? firestore?
    3. If I want a relational data then I'll use Postgres
    4. If I want a backend with auth/async jobs that I control I'll use Django (the admin panel makes it worth it every time)
    5. Do I really need a lot of JS? if not stick with django templates. If I do need a lot of JS I'll use Vue + Nuxt (deployed to Netlify) + Django Rest Framework for the API on the backend.
    6. Am I going to make a mobile app? If yes then I'll also go with Django + Django Rest Framework since it can server mobile and web
    7. Do I need any custom server side stuff? if yes Ill use DigitalOcean. If not I'll use Heroku.
    8. S3 for file storage

    I find most of the time for me Django is the best place to start because it can be as simple as a few files or as complex as a full enterprise app. But I try to talk myself out of it each time I start a new project just to be sure its the right choice and not just the easy choice (although often those are the same).

    Hope that helps.

Trending on Indie Hackers
$36K in 7 days: Why distribution beats product (early on) User Avatar 112 comments I've been reading 50 indie builder posts a day for the past month. Here's the pattern nobody talks about. User Avatar 104 comments Where is your revenue quietly disappearing? User Avatar 90 comments We made Android 10x faster. Now, we’re doing it for the Web. 🚀 User Avatar 71 comments Finally reached 100 users in just 12 days 🚀 User Avatar 63 comments a16z says "these startups don't exist yet - it's your time to build." I've been building one. User Avatar 57 comments