13
47 Comments

My problem as a fullstack developer. Help me out!

As a fullstack developer I feel I spend most of my time in setting up the environment rather coding the business logic. I use either Node and react or react and django rest. Is there anything you guys would suggest me to improve my productivity?

  1. 9

    One thing that has worked for me in the past is to set up a base project of the tools i like to use and then fork off of that for my projects. Build with what you know and have a template ready to do.

    1. 2

      Naming and refactoring has always been a pain for me with this approach. Depending on your IDE / toolset though perhaps creating a project template is an option that negates the refactoring issues (at least most of them).

    2. 1

      Agreed! Some devs get too caught up in trying to use all the hottest new tools. It's great to experiment with new things but once you've got a solid base that you feel comfortable with, stick with that for a few projects and make incremental improvements. Always fork off your latest project and your base will evolve with you!

    3. 1

      I second this. The more base repositories and components you have, the faster you will be able to move.

      Anytime you see a new project mvp, you will have a wealth of existing templates to draw from.

      Here's mine for the backend NestJS+TypeScript+Typeorm!
      https://github.com/teamzerolabs/BaseProject

  2. 4

    My buddy @collinbrewer always reminds me "be the entrepreneur and not the engineer".

    As an engineer myself, I know how it goes, you start a new project, and you end up building too much. I would focus on how to accomplish things with either no code (reads: simply don't implement them, not to be confused with using some WYSIWYG builder) or by way of low code / simply "outsourcing" the mundane.

    In regard to going low code, engineers by nature tend to want to own everything and build everything from the ground up. It's how we learn, we claim. We got to where we're at now by actually building stuff, right??

    Wrong. At some point you have to acknowledge the limitations of your time, and take advantage of the plethora of resources available, but code dependencies (npm) and even third party software services (Auth0 and Stripe both coming to mind).

    In regard to setting up your environment, there's a ton of tools out there to help speed things up locally. Like using Docker to stand up a full dev stack or embracing hackathon starters and things like create-react-app to help get past the blank slate and get yourself positioned to be productive on your idea and not on the cruft.

    You mentioned 2 vastly different stacks there, Node vs Python. Big question is, which one are you most experienced / comfortable with? Most folks care little about what your underlying technology is, so you may as well use the tools that you're personally able to move the fastest with.

    1. 2

      What a good advice, thx bro

    2. 2

      One of the most valuable comments. True.

  3. 2

    I think at some point you'll just have to go through this pain. There are certainly some tools and frameworks that make this easier, but even to know which ones they are will take some of your time. Also, after you have created some projects and gotten accustom to certain tools, you might want to use these tools again, but now with the second framework. Already you find yourself googling "how to use x with y".

    With https://digester.app, I went through this pain as well, because this was my first "real" frontend project. After having used vim for a few years, I wanted to have vim bindings with vscode (there goes your "how to use x with y").

    At this point, I think I'd just recommend sticking to your tools or otherwise be aware that changing any of them will force you to invest some time to align the rest. Another concrete example for me was starting to use gitlab-ci. In the end, I invested around 8h to set everything up and it still doesn't work exactly like I want it to. By limiting my investment to one day, however, I got it to a good-enough state where it is quite helpful, but not 100% perfect. Same thing with the vim binding in vscode actually. I had to give up on some of vim's advanced features, but it still improves my vscode experience.

    That's a lot of text to say:

    • You'll have to invest some time to understand your tools and make sure they work together well
    • Once you know one set of tools, be aware that changing any of them will cost you more than just learning that one tool
    • If a new shiny tool comes along, better time-box your trial
    1. 1

      Yeah I understand your point..

  4. 2

    Ever tried serverless? I understand it's a radical approach, but it could be a viable solution for many projects, I largely use Firebase services (Firestore DB, Hosting, Auth, ...) and when I need something more custom, that is, when serverless is not enough, I still have Cloud Functions which run any NodeJS code. Of course, also on Firebase and any other serverless platform, you have to set up things, though creating a personal template/skeleton/boilerplate works for me.

    1. 1

      I like Claudia JS, which makes it super easy to deploy an API to Lambda on AWS. So you can have a serverless backend hosted on AWS. and then you can have a totally decoupled front end in whatever you want, as long as the front end can call a REST API to your backend where all the business logic is. https://claudiajs.com/

      1. 1

        Ah OK, I heard of it! If I understood well, it belongs to a new "family" of serverless frameworks so you can write your code and it's platform agnostic. Did you find advantage of using Claudia instead of a pure AWS API?

        1. 2

          Claudia is not platform agnostic, it uses AWS Lambda only. But the advantage of it is allowing me, the programmer, to set up an API backend on Lambda using Node.js with one command. And once it is initially set up, all I have to do is issue the "claudia update" command to redeploy. So for someone like me who doesn't want to mess around with API Gateway on AWS, Claudia does it all for me. All I have to do is write the code.

          Claudia can also invoke other API such as MongoDB or the AWS SDK asyncronously, as long as you can return a promise, which those APIs do. Or you can wrap your own async functions in a promise as well.

          There's a really good book on using Claudia from Manning called "Serverless Applications with Node.js", I recommend it, it goes through setting up an API through Claudia to set up a database connection, user authentication with Cognito, payment with Stripe, chatbot, Alexa, and also a section on migrating an existing express app to Claudia.

          https://www.manning.com/books/serverless-applications-with-node-js

          1. 1

            wow this is really interesting! I'll check Claudia out

    2. 1

      Does serverless have the sense of ownership and control?

      1. 1

        I'm not sure what you mean by "ownership and control" do you refer to multitenancy and the fact that data belongs to a certain user, i.e., createdBy field in the DB or more complex designs?

        1. 1

          Not really. I'm asking about how serverless manages your code (I've tried firebase before) but not cloud functions. Can you explain it a bit?

          1. 1

            Well, Cloud Functions accept a Node app, so you create a package.json with any dependency you like, then you create an entry point file (name it index.js) and from there you module.exports functions, once you deploy your source code to Cloud Functions (via firebase-cli tool) dependencies are installed and the node app is started. You can create at least 2 types of Cloud Functions: HTTP-callable (https://blabla.com/myFunction?arg1) and functions triggered by Firestore DB (call me when someone creates a new task).

            Furthermore, the functions source code can live in the same source code of the firebase front-end app, when you create a new Firebase project, you get a functions/ subfolder.

    3. 1

      This comment was deleted 4 years ago.

      1. 1

        interesting question! For now, I have several deals from Google Cloud for Startups and other services, so I don't pay anything, moreover, my traffic is quite low so even if I hadn't the free deals, I would pay just a few euros. I don't know Dokku. What stack are you using? you use Firebase?

        1. 1

          This comment was deleted 4 years ago.

          1. 2

            Oh yes, I really like Flutter! Actually, I'm migrating my web app to Flutter for Android and iOS, but I didn't use it for the web? I know they officially released it in beta, have you used Flutter web? how do yo feel it?

            1. 1

              This comment was deleted 4 years ago.

  5. 2

    I believe you can also have a look at https://www.docker.com/, though, I haven't used it myself.

    Sigh, looking at their home page intro, they fail to actually tell you exactly what it is they do.
    Anyway, haha, I'm sure you've heard of them. They enable you to create various dev environments called 'container images'. You can also share these with other people.

    So for instance, if you have created your node/react/django environment once, saved it as an image, I can use your image and setup my server with an exact copy of yours "instantly".

    By "instantly" I mean drastically faster :) Hope it helps!

    1. 1

      I know docker. It's not what I'm looking for. I'm looking for something that allows me generate boilerplate.

  6. 1

    Django is a good choice, as you get an excellent admin interface basically for free (I haven't used node in big enough projects where that would be essential) . I keep a base template project with dependencies I usually need, plus the basic set up to deploy the project quickly to Heroku. Same goes for frontend - base template with login/register/forgot password, and state management, permissions, subscription logic/components, etc...

    Another option, which depends on the type of your project, could be using Firebase as your backend.

  7. 1

    I usually use boilerplate to speed up my processes and it's helped me a lot and it's increase my productivity

  8. 1

    Do not use the latest new tool or language.

  9. 1

    I use the same stack plus additional services such as batch services, messaging ques and a RDB. I totally feel your pain lol. Also trying to optimize environment related stuff by writing shell scripts to automate tasks and using Jenkins for automating deployment.

  10. 1

    Even when you overcome the temptation to set up your dev environment perfectly then focusing on business logic only is another trap. If you are a solo founder then accept that you should spend only half of the time coding and the other half on marketing and distributing your product.

    1. 1

      Yeah focusing on sales matter most.

  11. 1

    How many environments do you set up per day anyway ? Isn't it a one time thingy ? Since your working on only one project for a long period of time...

    1. 1

      Manging them :( becomes painful

  12. 1

    I'd love to hear your feedback on NoCo.io, I built a low-code tool for developers to solve exactly that. It generates Node/React code and lets you drag and drop the boring bits and code the hard / custom bits.

    1. 1

      Your idea is awesome but the product needs a lot of improvement especially in the UI part. I understand how much hard work you've put to build this one. I read NoCo's timeline. You mentioned that many users log in and quit using the product. I did the same too. If you fix this part I would be to the first user to pay you.

      1. 1

        Thanks for taking a look and the candid feedback. Anything specific I could do to start to improve this?

        1. 1

          Especially the drag and drop part. It feels a little clunky. Try something new that would change UX to the next level.

    2. 1

      Nice one I was looking for one similar :) I'll try it for sure.

  13. 1

    You can just use a less-cool LAMP stack and have a ready environment in minutes.
    Node/React etc. are quite often overkilling. Remove layers of complexity and simplify the whole process.

    1. 1

      I've tried laravel vapor it was cool but I hate Php.

      1. 1

        Then pick a stack you love and focus 100% on it. If you need to rebuild/reassign your solution every time, it means you are doing something wrong!

  14. 1

    Toolset... If you use the right languages with the right tool sets you can drastically increase your initial bootstrapping.

    Example, I use ASP.Net core with React in part because there is a Visual Studio template that automagically bootstraps the project in a near ready to go format. From there a little bit of powershelling to create the container, push to container repository and restart kube pods to pull new version. Boom ready to go! (Yes React with Express would be a bit lighter weight and Golang would be more performant. But in the grand scheme, not having to bootstrap every byte of code by hand and having a faster path to market is worth the moderate hits to overhead and performance.)

    Besides that I am working on some tools to address exactly this issue. Not to sound salesy (I'm still in very early stages, there's nothing to sell yet anyway), but feel free to look me up, happy to share some of my secrets.

    [email protected]

  15. 1

    Can you elaborate? What kind of things are you doing to 'setup the environment'?

  16. 1

    For django I use: https://github.com/pydanny/cookiecutter-django
    It's easy to get started and you have a few customization.

    Anyway, for me the biggest problem was actually deploying and this solved it, for you it may be something different, not sure.

  17. 1

    I´m currently going with a mono repository approach, so I´m heaving less overhead in maintaining multiple services plus I can share code easily (Java). I´m using Pulumi to spin up my infrastructure, it´s also part of the monorepo and makes your infrastructure replicable (in theory it can and will be part of my CI pipeline in future). Once configured, nothing to worry about and you can shift your infrastructure from local development to production (Digital Ocean, AWS, whatever) with one command if you have configured your stages accordingly. On top of that I´m using CI, where all my configs are generalized and extended by each micoservice within the project. Everything is Java (Quarkus Framework), based on the same Docker image and so on.
    Gitlab CI is automatically configured from Pulumi to interact with Kubernetes, so spinning up my infrastructure makes it instantly ready for CD.

    As a database I´m using fully managed PostgreSQL from https://www.elephantsql.com/ which has a free tier as well. I´m planning to use some AWS services like SQS in addition, Pulumi does support that as well. In that case I´ll then just create a new SQS resource and write the credentials into a Kubernetes Secret so any service can use it (~20-30 LoC).

    You still have to "set up" your infrastructure, with the difference that you have it as code but you have a more solid foundation for everything on top and even if everything breaks you can recreate it without a headache.

    For frontend applications I´m using Netlify which is very easy to setup if you have a static Vue / React application without a backend.

    1. 1

      I'll take a look at it.

  18. 1

    This comment was deleted 4 years ago.

    1. 1

      I've tried flask but its too basic.

Trending on Indie Hackers
How I grew a side project to 100k Unique Visitors in 7 days with 0 audience 49 comments Competing with Product Hunt: a month later 33 comments Why do you hate marketing? 29 comments My Top 20 Free Tools That I Use Everyday as an Indie Hacker 18 comments $15k revenues in <4 months as a solopreneur 14 comments Use Your Product 13 comments