Hey all in respect to following best practices her...
# help
k
Hey all in respect to following best practices here https://serverless-stack.com/chapters/organizing-serverless-projects.html does the react site sit under services?
t
Our new starter we're working on is going to replace that: https://github.com/serverless-stack/graphql-stack
k
oh nice
not used much ts before though 😕
t
high recommend ts even if you don't know it, you don't really have to know it but you'll learn it over time
d
+1, watched many devs convert, and none has ever regretted it or looked back.
k
whats the path they take to convert? is there a good learning section people follow?
t
TS is fully compatible with js, so you can just start a ts project and then write normal js in it and it'll all work
I'm not sure if there's a goto course for explicitly learning it. I was lucky and I started my career in c# and typescript is an extremely close mapping
d
lol, me too
k
yeah my background is c#
t
well then you'll have no trouble!
d
they are invented by the same guy.
t
I never learned TS - I just wrote c# syntax in ts files and it mostly all worked
k
is TS popular enough that we could find developers easily enough though?
My project is quite large and wont be able to do it on my own lol
t
Yes, at this point I don't often find non-ts developers
and it's kind of zero sum, most ts developers will not want to work on a js only project
d
TS is a top 10 programming language on its own now.
k
guess i better start learning then lol
d
I like TS and work is switching to it. Pretty much the only context I don’t like it in is tutorials and educational resources
k
I'm just worried because I'm trying to learn SST, figure out my architecture using AWS and then go balls to the wall with my project. I do not want to mess up the foundations using js if ts is what I need. I just don't know what I don't know lol.
t
You definitely want to use TS - a lot of the benefits of SST go away when you don't use TS
In our new starter guide we're going to be creating a TS project by default
d
Like replacing the Notes app? or something else?
t
We're launching a new graphql stack with a much deeper starting setup for those who want to use gql
k
When do you think the new guide will be ready?
d
But the Notes project will remain
t
Yeah there's no reason to delete it but for new users we're probably going to nudge them down this path since it's a more complete experience
Codegen, typing for your environment variables, secret support (and setting them in the console), etc etc
@Kristian Lake we're hoping in a month or so
k
agh lol
d
Nice! Exciting. I hate that it’s a learning resource in TS but I’m alone in the woods on that one 🤣. Excited to work through it.
k
i am going to do this in the meantime
another 30 hours of study pfff
t
@Devin I put a lot of effort into making all the types inferred so most of the code just looks like normal JS
I agree, it's sometimes hard to understand what code is doing when there's type code everywhere which you don't care about
d
IME Kristian you pick up Typescript really quickly if you know JS. It’s a great improvemnt and you learn fast
I agree, it’s sometimes hard…
Totally. I have every confidence that it will be good. I’ll be sure to work through it and try to keep that beginners mindset. Everything else about SST has been great, I don’t see why this would be different.
k
yeah i loved the SST stuff
I started going though the best practises bits too as its important to me to try and do this right from the start as we expect to expand rapidly
t
yeah getting it right at the beginning is important, basically been spending the last 1-2 years researching on the right setup for everything most apps run into
k
its definitely appreciated! i seen how a monolithic gives a billion dollar company major struggles
even with mega money to throw at an IT team it takes a serious amount of effort and work to move to something different
correct me if im wrong, im only 5 mins into this TS course but is ts like strongly typed js? lol
t
Yep
js + types, otherwise the same
k
i can see why ts is superior to js now - its going to save us alot of mistakes along the way thanks 🙂
going back to the initial architecture - looking at best practices, I'm going to have a server less infrastructure repo and a server less services repo that's a monorepo. Does the client side react website (of which there might be more than one) live in any of those repos or does it live in its own repo?
d
Does the client side react website (of which there might be more than one) live in any of those repos or does it live in its own repo?
I just stick it in a subfolder, like I would a lambda, but this subfolder has its own
package.json
.
j
@Kristian Lake yeah monorepo is a better approach.