peculiarnewbie
peculiarnewbie
TTCTheo's Typesafe Cult
Created by Hex on 3/11/2025 in #questions
Google Docs Clone Tech Stack
O(1)? you mean by using key value map..? honestly just try doing it, idk why you would even consider elixir for tiptap, unless your aim is to learn elixir. Next.js and Sveltekit can do SSR too
7 replies
TTCTheo's Typesafe Cult
Created by Hex on 3/11/2025 in #questions
Google Docs Clone Tech Stack
ok i feel like there's a couple of layers to this First of all, Google Docs clone is quite an ambitious project for a beginner... to say the absolute least. I suggest separating that project into parts and tackle whichever you think is most interesting first: 1. a doc file parser and generator 2. a "what you see is what you get" editor 3. a simple real-time multiplayer text editor 4. a simple Google Classroom integration (maybe a simple personal dashboard) Second, typescript is absolutely good enough for these, and would definitely help you get a job. And knowing backend typescript will definitely help you Third, depending on how proficient you are with typescript, learning elixir would definitely help you. Not just because now you know elixir, but because you'll rethink how you write typescript if you didn't do functional style ts before. But i think if you're still not that comfortable with typescript yet, focusing on that first will probably be more productive
7 replies
TTCTheo's Typesafe Cult
Created by Prateek Kumar on 3/11/2025 in #questions
How do I check video metadata in frontend without using any packages that requires NodeJS.
what sort of metadata and from what file/service?
3 replies
TTCTheo's Typesafe Cult
Created by LuisLl on 3/7/2025 in #questions
How to run drizzle migrations before Next build when running on Docker?
Perhaps it's not your db that is the problem but the static generation?
7 replies
TTCTheo's Typesafe Cult
Created by LuisLl on 3/7/2025 in #questions
How to run drizzle migrations before Next build when running on Docker?
Have you tried making a static page that pulls from other random open api just to get data?
7 replies
TTCTheo's Typesafe Cult
Created by eric on 3/5/2025 in #questions
Need help with scheduled tasks
if it can work in cloudflare workers for python that would be a great option https://developers.cloudflare.com/workers/languages/python/ it has cron triggers https://developers.cloudflare.com/workers/configuration/cron-triggers/
7 replies
TTCTheo's Typesafe Cult
Created by mezo on 3/4/2025 in #questions
nextjs / trpc as backend vs dedicated backend
in short the two main considerations are dx (aka taste) and performance
8 replies
TTCTheo's Typesafe Cult
Created by mezo on 3/4/2025 in #questions
nextjs / trpc as backend vs dedicated backend
in my case i use hono. And my frontend isn't even next.js, i use Astro 😅 But it's the same idea because astro's api endpoints also only do one route per file
8 replies
TTCTheo's Typesafe Cult
Created by mezo on 3/4/2025 in #questions
nextjs / trpc as backend vs dedicated backend
one case i've had is that my main product is the api and the frontend is 1/4 of the usage. In this case i still have a 'core logic' package that both the frontend and backend is using. So my frontend still has its own backend, it's not even 'calling the api' :poohheh: The main reason is i don't like doing one file per route. Also the separate deployments is kinda nice in my case. Also obviously if i have a performance critical / long running processes i'd also use a different language but that's more a js problem than nextjs one. I have yet to encounter that in my work tho
8 replies
TTCTheo's Typesafe Cult
Created by Twiggeh on 3/4/2025 in #questions
What was the tool for checking the performance of your types?
4 replies
TTCTheo's Typesafe Cult
Created by Rusty on 3/1/2025 in #questions
How do Execution Context interact with Asynchronous Execution?
i think there's no difference for async because event loop and such
6 replies
TTCTheo's Typesafe Cult
Created by Rusty on 3/1/2025 in #questions
How do Execution Context interact with Asynchronous Execution?
It's more of a closure situation. They call it lexical scoping or lexical environment https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures
6 replies
TTCTheo's Typesafe Cult
Created by ThreeHoolagins on 2/28/2025 in #questions
Anyone know how a good way to work with json in python?
Good news is in my experience, bun is significantly easier to run. If anything you can just use it to fetch the data and transform it into a more manageable shape for use in python
6 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
I don't know if there's a feasible way to keep that component as a server component without some crazy hacks like reverse proxying or something
13 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
Yeah unfortunately the way http-only cookies work is that the browser will only send those cookies to the original source. So in this case, the browser has the cookies, but it knows that it comes from the api. So when the browser make a request to your next.js app, it will not send those cookies. But when you make the component client only, you're sending the request to the api from the browser, so the browser will send those cookies along with that request
13 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
Wait i just realized something, do you control the api too? If not this is gonna be a different story
13 replies
TTCTheo's Typesafe Cult
Created by WOLFLEADER on 2/28/2025 in #questions
Npm package template
The answers above looks good. But i also wanna add that bun has built in commands for packaging and publishing https://bun.sh/docs/cli/publish
7 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
So there's 2 solution to this: 1. You can manually get the cookies from the initial request, then forward those cookies when the server component make the request to the api 2. You can make separate auth on the api. Because generally you can trust requests coming from your own server, you can remove the cookie requirement if you know said request is coming from the server
13 replies
TTCTheo's Typesafe Cult
Created by AshiBoyMan on 2/28/2025 in #questions
Http cookies in next
Cookies are stored on the client (user's browsers) and they are sent with the requests. Most likely what's happening when you use server component here, is that the initial request to the server has the cookies, but then your component is run on said server and it makes a request to the api, but with no context of the request from the user. Meanwhile when you use client, the component make the request to the api from the client, therefore it will send the cookies with it
13 replies
TTCTheo's Typesafe Cult
Created by ThreeHoolagins on 2/28/2025 in #questions
Anyone know how a good way to work with json in python?
what's the pain points if i may ask? perf? async? serialization? i know there's this https://pypi.org/project/orjson/ also if your only problem with js is the performance you can try running your js using https://bun.sh/
6 replies