Gaden
Gaden
Explore posts from servers
RRailway
Created by Gaden on 6/2/2024 in #✋|help
Cant invite friend
No description
15 replies
TTCTheo's Typesafe Cult
Created by Gaden on 5/17/2024 in #questions
Paid (if allowed) - Help with laggy react frontend
hey :Peepsteroji_pepewavehappy: would anyone be interested in helping me out for like an hour or half pinpointing where my code is slow? i've made a fairly complex project, and the react frontend is a bit laggy and crunches ram. it's a frontend with a lot of realtime data coming in, so a bunch of renders is happening. if you can help me debug what exactly is happening im down to pay a little if allowed. paypal, crypto, revolut. whatever works for you
13 replies
TTCTheo's Typesafe Cult
Created by Gaden on 3/1/2024 in #questions
SSR with CSR after load
Hey! Is it possible to have SSR with CSR after the initial load? I'm using t3 with trpc and app router. The reason i want to do this, is since i want SSR for SEO compatibility, but the values are dynamically changing in realtime. How would i go about doing this? Do i have to make two separate components, and then render either one depending on if its server or client? Below is an example. The counter in my case, is a realtime updating value.
import { api } from "~/trpc/server";


export default async function Page({
params,
}: {
params: { contract: string };
}) {
const counter = await api.example.counter.query();

return (
<div className="relative h-full grow overflow-hidden">
{counter}
</div>
);
}
import { api } from "~/trpc/server";


export default async function Page({
params,
}: {
params: { contract: string };
}) {
const counter = await api.example.counter.query();

return (
<div className="relative h-full grow overflow-hidden">
{counter}
</div>
);
}
4 replies
KKinde
Created by Gaden on 2/19/2024 in #💻┃support
Speedrun Competition Clarification
Hello 👋, I'm interested in participating in the speedrun competition, but I have a few questions I'd like clarified before I proceed. The rules state: (https://kinde.com/assets/terms/2024_02_12_speedrun_competition_terms_and_conditions.pdf)
The video must show the fastest time to integrate with Kinde – clock starts ticking from the first codebase edit and ends after the Entrant can demonstrate a successful auth callback and user getting added in the Kinde application;
https://twitter.com/LeoJeong0/status/1759435844526784974 In this speed run, the .env file is already populated before the timer starts. And the entrant have already installed kinde into their project. Meaning their package.json have been modified before the timer starts. Does this qualify as modifying code base before timer starts? On your website https://kinde.com/speedrun/ you write
Record yourself integrating Kinde Auth with an existing product or language boiler plate. You can’t use a Kinde Starter Kit. Your face and a timer need to be in the video at all times for a valid entry.
What does qualify as an existing product or language boilerplate? Can i make my own "boilerplate" with the sole purpose of winning the competition, where all the files are ready? I think clarification on the guidelines would be great. Looking forward to hearing back from you.
179 replies
TTCTheo's Typesafe Cult
Created by Gaden on 7/23/2023 in #questions
State manager for a realtime chat app?
Im developing a react native chat app. What state manager would you recommend? I've tried redux and valtio, and both seem fitting for this. There will be multiple active chats, group chats, and realtime messaging, so the state will be somewhat complex and dynamic. Whats your thoghts? ^^ Thanks in advance!
18 replies
TTCTheo's Typesafe Cult
Created by Gaden on 6/22/2023 in #questions
Upload image from server to uploadthing
Hello! My image is generated on the server, from user text input. Is it possible to upload the image directly from the server to uploadthing? It looks like to me uploadthing is only really used for users to upload, not the server? Thanks in advance!
10 replies
RRailway
Created by Gaden on 5/10/2023 in #✋|help
Monorepo sub directory deployment failing
Hello. I wish to deploy a sub directory of my mono repo. The sub dir that i wish to deploy is /apps/points-server This is how my variables are set Root Directory /apps/points-server Build Command Build Command Watch Paths /apps/points-server Start command pnpm run start This is the logs i get after trying to deploy:
#1 [internal] load build definition from Dockerfile

#1 transferring dockerfile: 2.19kB done

#1 DONE 0.3s


#2 [internal] load .dockerignore

#2 transferring context: 2B done
#2 DONE 0.4s

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1678752204

#3 DONE 0.1s


#4 [stage-0 1/8] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1678752204@sha256:fba77818e57bebd4e7a02f60d45554354d6ec5a3f7d98b4ee4f6b2a6e720191e
#4 DONE 0.0s


#5 [internal] load build context

#5 transferring context: 18.64kB done

#5 DONE 0.3s

#6 [stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#6 CACHED

#7 [stage-0 2/8] WORKDIR /app/
#7 CACHED

#8 [stage-0 3/10] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix
#8 CACHED


#9 [stage-0 5/10] RUN printf '\nPATH=/app/node_modules/.bin:$PATH' >> /root/.profile

#9 DONE 0.8s

#10 [stage-0 6/10] COPY . /app/.

#10 DONE 0.3s

#11 [stage-0 7/10] RUN --mount=type=cache,id=s/dda6e822-b6a7-446d-9689-244823126a93-/root/npm,target=/root/.npm npm i

#11 0.973 npm
WARN config production Use `--omit=dev` instead.

#11 1.631 npm ERR! code EUNSUPPORTEDPROTOCOL
#11 1.633 npm ERR! Unsupported URL Type "workspace:": workspace:0.0.0
#11 1.635
#11 1.635 npm ERR! A complete log of this run can be found in:
#11 1.635 npm ERR! /root/.npm/_logs/2023-05-10T19_26_02_588Z-debug-0.log

#11 ERROR: process "/bin/bash -ol pipefail -c npm i" did not complete successfully: exit code: 1
-----
> [stage-0 7/10] RUN --mount=type=cache,id=s/dda6e822-b6a7-446d-9689-244823126a93-/root/npm,target=/root/.npm npm i:
WARN config production Use `--omit=dev` instead.
#11 1.631 npm ERR! code EUNSUPPORTEDPROTOCOL
#11 1.633 npm ERR! Unsupported URL Type "workspace:": workspace:0.0.0
#11 1.635
#11 1.635 npm ERR! A complete log of this run can be found in:
#11 1.635 npm ERR! /root/.npm/_logs/2023-05-10T19_26_02_588Z-debug-0.log
-----

Dockerfile:21
-------------------
19 | RUN printf '\nPATH=/app/node_modules/.bin:$PATH' >> /root/.profile
20 | COPY . /app/.
21 | >>> RUN --mount=type=cache,id=s/dda6e822-b6a7-446d-9689-244823126a93-/root/npm,target=/root/.npm npm i
22 |
23 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm i" did not complete successfully: exit code: 1

Error: Docker build failed
#1 [internal] load build definition from Dockerfile

#1 transferring dockerfile: 2.19kB done

#1 DONE 0.3s


#2 [internal] load .dockerignore

#2 transferring context: 2B done
#2 DONE 0.4s

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1678752204

#3 DONE 0.1s


#4 [stage-0 1/8] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1678752204@sha256:fba77818e57bebd4e7a02f60d45554354d6ec5a3f7d98b4ee4f6b2a6e720191e
#4 DONE 0.0s


#5 [internal] load build context

#5 transferring context: 18.64kB done

#5 DONE 0.3s

#6 [stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#6 CACHED

#7 [stage-0 2/8] WORKDIR /app/
#7 CACHED

#8 [stage-0 3/10] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix
#8 CACHED


#9 [stage-0 5/10] RUN printf '\nPATH=/app/node_modules/.bin:$PATH' >> /root/.profile

#9 DONE 0.8s

#10 [stage-0 6/10] COPY . /app/.

#10 DONE 0.3s

#11 [stage-0 7/10] RUN --mount=type=cache,id=s/dda6e822-b6a7-446d-9689-244823126a93-/root/npm,target=/root/.npm npm i

#11 0.973 npm
WARN config production Use `--omit=dev` instead.

#11 1.631 npm ERR! code EUNSUPPORTEDPROTOCOL
#11 1.633 npm ERR! Unsupported URL Type "workspace:": workspace:0.0.0
#11 1.635
#11 1.635 npm ERR! A complete log of this run can be found in:
#11 1.635 npm ERR! /root/.npm/_logs/2023-05-10T19_26_02_588Z-debug-0.log

#11 ERROR: process "/bin/bash -ol pipefail -c npm i" did not complete successfully: exit code: 1
-----
> [stage-0 7/10] RUN --mount=type=cache,id=s/dda6e822-b6a7-446d-9689-244823126a93-/root/npm,target=/root/.npm npm i:
WARN config production Use `--omit=dev` instead.
#11 1.631 npm ERR! code EUNSUPPORTEDPROTOCOL
#11 1.633 npm ERR! Unsupported URL Type "workspace:": workspace:0.0.0
#11 1.635
#11 1.635 npm ERR! A complete log of this run can be found in:
#11 1.635 npm ERR! /root/.npm/_logs/2023-05-10T19_26_02_588Z-debug-0.log
-----

Dockerfile:21
-------------------
19 | RUN printf '\nPATH=/app/node_modules/.bin:$PATH' >> /root/.profile
20 | COPY . /app/.
21 | >>> RUN --mount=type=cache,id=s/dda6e822-b6a7-446d-9689-244823126a93-/root/npm,target=/root/.npm npm i
22 |
23 | # build phase
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm i" did not complete successfully: exit code: 1

Error: Docker build failed
This is the package.json of the sub dir
{
"name": "points-server",
"displayName": "Points Server",
"version": "0.0.7",
"author": "Sidekick Wallet, Inc",
"scripts": {
"start": "ts-node index.ts"
},
"dependencies": {
"@acme/db": "*",
"discord.js": "^14.10.2",
"dotenv": "^16.0.3",
"eslint": "^8.34.0",
"eslint-config-acme": "workspace:0.0.0",
"ethers": "^5.7.2",
"fastify": "^4.17.0",
"zod": "^3.21.4"
},
"devDependencies": {
"prettier": "2.8.4",
"ts-node": "^10.9.1",
"typescript": "4.9.5"
}
}
{
"name": "points-server",
"displayName": "Points Server",
"version": "0.0.7",
"author": "Sidekick Wallet, Inc",
"scripts": {
"start": "ts-node index.ts"
},
"dependencies": {
"@acme/db": "*",
"discord.js": "^14.10.2",
"dotenv": "^16.0.3",
"eslint": "^8.34.0",
"eslint-config-acme": "workspace:0.0.0",
"ethers": "^5.7.2",
"fastify": "^4.17.0",
"zod": "^3.21.4"
},
"devDependencies": {
"prettier": "2.8.4",
"ts-node": "^10.9.1",
"typescript": "4.9.5"
}
}
30 replies
TTCTheo's Typesafe Cult
Created by Gaden on 4/11/2023 in #questions
Conditional trpc hook query
When calling a trpc hook, is there a way to only make it call, if the input is validated client side? Im using zod on server side. But sometimes it takes some time on client side before the data is valid. Example:
const {
data, isLoading, isError
} = reactApi.swap.getQuote.useQuery({
fromToken: debouncedInputToken,
toToken: debouncedOutputToken,
amount: parsedInput
})
const {
data, isLoading, isError
} = reactApi.swap.getQuote.useQuery({
fromToken: debouncedInputToken,
toToken: debouncedOutputToken,
amount: parsedInput
})
In this case im using debounced values. This results in a bunch of bad type zod errors before the values are correct. And conditionally rendering hooks gives errors. So how to only conditionally fetch trpc?
5 replies
TTCTheo's Typesafe Cult
Created by Gaden on 4/7/2023 in #questions
What statistics/analytics service to use?
Hey! Im building a crypto wallet. We wish to track how many transactions get sent over time, how much volume happens over time, how much our userbase grows over time etc. Is there a service i can use for this? Or is my best bet to just collect the data in a prisma db, and make my own admin dashboard with all the data.
21 replies
TTCTheo's Typesafe Cult
Created by Gaden on 12/2/2022 in #questions
Best state management for react chrome extensions?
Im looking into making a chrome extension. It will be handling a somewhat complex state, shared between background scripts, and the popup UI for the user. So my question is, how do i handle shared typesafe and persisting state across script in a chrome extension? Can't seem to find any good resources on this. Will i need to have different states in UI and background script, and then use some kind of bridge between them? Sounds like a environment that will slow development time drastically...
23 replies
RRailway
Created by Gaden on 11/17/2022 in #✋|help
2FA not working
10 replies
TTCTheo's Typesafe Cult
Created by Gaden on 11/5/2022 in #questions
Is there a scaleable realtime type safe message broker?
Im currently using pusher. But it is not type safe. Or at least i havent found a way to make it type safe. Anyone have a better alternative?
3 replies