Ask HN: What are the best open source TypeScript projects I can learn from?
What are the best open source TypeScript frontend and backend real world projects I can learn from?
I am a self-taught web developers and I haven't worked for any good companies. There are no seniors reviewing my code.
My code quality can be improved but I don't know how. Maybe reading some good codebase is a way out.
I use React in frontend and express in Backend. Do you know any good OSS projects that use those stacks?
Maybe I should read popular OSS frameworks instead of web app's source code? I am thinking of changing my job, so reading real web app's source code might be more relavant.
I am very thankful for any advices. And Happy New Year!
75 comments
[ 6.8 ms ] story [ 83.5 ms ] threadCheck out their apollo-server and apollo-client repos. It’s a very useful codebase to be knowledgeable about. This is something you should mention in an interview as a strong positive if the company wants graphql experience.
https://en.wikipedia.org/wiki/Code_Complete
It’s an open source commerce engine built in Node w. TypeScript. The domain is fairly easy to wrap your head around and the architecture and code quality are often praised.
Which probabaly has 100% test coverage but is abstracted to death.
Probaly the best codebase is something which does not pass scrutiny on every single line, but it "just works".
The top comment IIRC is about @tiangolo, the FastAPI guy
https://github.com/containerd/containerd
https://github.com/tailscale/tailscale
Maybe at some point it is nice to look at them, but they don't look very approachable to me, if I just want to take a look at how code is normally written in go beyond some AoC-exercises. Like useful common patterns and such.
https://github.com/nestjs/nest
Awesome TypeScript - https://github.com/dzharii/awesome-typescript
And here's a list of projects on GitHub tagged with the topic "TypeScript", sorted by most stars. Many build tools I see on the first page, starting with the TypeScript compiler itself - which is an impressive and interesting codebase, but it may not be so suitable for study purpose.
https://github.com/topics/typescript
You might enjoy learning from some books too.
The TypeScript Handbook - https://www.typescriptlang.org/docs/handbook/intro.html
TypeScript Deep Dive - https://basarat.gitbook.io/typescript/
One of the best code base that I have seen, not just TypeScript.
https://github.com/trpc/trpc
https://github.com/prettydiff/share-file-systems
Selling points:
* No frameworks and minimal dependencies
* The GUI loads in the browser with full state restoration in about 260ms in Chrome.
* Full peer to peer file system access
* Original WebSocket service support faster than the popular NPM packages (ws, socket.io)
* Peer-to-peer end-to-end test automation in the browser that is faster and easier than the big browser test automation applications (puppeteer, playwrite)
* I am currently working on a streaming command terminal for the browser for support for for things like vim and irssi. The current experimental terminal only supports basic command input/output
We're in the process of moving components out in to their own package so they can be shared between different clients. https://github.com/Linen-dev/linen.dev/tree/main/packages
We use next js but is in the process of migrating the backend code to a node service
Would you mind sharing why? I'm curious because I'm building a Next.js-powered Slack app currently.
https://github.com/tallyhowallet/extension
* https://github.com/calcom/cal.com
* https://github.com/supabase/supabase
* https://github.com/appwrite/appwrite
* https://github.com/n8n-io/n8n
* https://github.com/appsmithorg/appsmith
* https://github.com/directus/directus
* https://github.com/Budibase/budibase
https://github.com/hoppscotch/hoppscotch
https://github.com/nestjs/nest
files like this make me feel like my files aren’t too long after all :)
Monorepo tooling, Build optimizations, complex webpack setups, performance tuning. For example from the above list I went through cal.com repo and I saw that the way they have organized dev and prod builds and openAPI spec browsing tooling is very good. This is exemplary for anyone wanting to look at good ways to setup a project!
I've decided to dive deep into cal.com. Its tech stacks are exactly same as mine.
And thank everyone giving advice!
We love Typescript and chose it to take advantage of static type checking. At Apspmith, since we are a small team, we wanted to reduce management overheads and opted for a monorepo layout. Typescript went a long way in helping us organize the code into modules and let our build scripts compile relevant modules for each changeset.
Having said that, Appsmith has been a learning experience in efficiently running a large project with lots of files. Feel free to dig into our source code to learn from our experiences. :)
If you actually want to learn, then take a look at the implementation for stuff like Zod: https://github.com/colinhacks/zod/tree/master/src/helpers
You can do some really powerful stuff that hugely benefits your team. A decent example I stumbled across recently when I went to release my own library (that does the same thing) is https://github.com/leancodepl/ts-routes
Elm specifically will teach you lots on the static types end of things. And it will only take a weekend or so of tinkering to show improvements in your TS life.
0 - https://elm-lang.org/
I asked a similar question about ruby some time ago, and came across one good recommendation (https://github.com/sharetribe/sharetribe), but would love to have many more. I'm also self-taught and feel I haven't read enough great ruby code!