G35x
WWasp
•Created by G35x on 4/14/2025 in #đŸ™‹questions
How can I implement "live" UI updates based server-side results.
I have a setup in my WASP project where a user clicks a button, and my app sends data from the WASP server to a separate Node endpoint. Each request includes a JobID (representing the batch) and multiple subtaskIDs (mapped to individual database entities).
I’ve set up a webhook in my WASP app to receive results from the Node server. The webhook invokes various server actions to updates the DB accordingly and tracks the status of the JobID and each subtaskID.
Now, I want certain components in the UI (the ones initiating the batch) to subscribe to these updates, ideally in realtime so that I can reflect the status/result of each subtaskID as it completes, without needing to refresh or rerender the entire page.
Re-rendering the entire page after a set amt of time is how it currently works, but this isn't sufficient because there are too many variables to reliably calculate how long a job will take like batch size, network latency, error handling/retries etc
What’s the best way to implement realtime, secure server to client communication in WASP?
Should I be looking into WebSockets, polling, or does WASP have a built in pattern for this kind of reactive update?
Any guidance or examples would be much appreciated!
13 replies
WWasp
•Created by G35x on 3/31/2025 in #đŸ™‹questions
TanStack Tables with WASP?
I'm building a SaaS platform which can be oversimplified to a collection of features built into a table. Thus far, I've done really well building my own table from scratch, but as I'm implementing more features I'm finding my Table foundation is less extensible and accurate as the required scope becomes more complex.
Before continuing my development, I'm at a crossroads. Either I refactor my existing Table schema, or I redesign my features to work with a more robust framework like TanStack Tables, which seems like potentially a smarter direction to go in.
Does anyone have experience using TanStack Tables w/ WASP? Any potential pitfalls to look out for?
I see it's extremely customizable, framework-agnostic & does work with React so it seems like a great fit.
8 replies
WWasp
•Created by G35x on 3/9/2025 in #đŸ™‹questions
/app/src/client VS /app/src/server?
tldr; I'm struggling to understand what files (if any) should be in the /server vs the /client directory. Best practices? Security implications?
Hi there,
This is going to sound super newby - excuse my ignorance. I'm not a software developer by trade, I'm just the type who gets ideas, rolls up his sleeves, and learns what's necessary as I go along. WASP seemed like a great fit some someone with a beginner level understanding to help me rapid prototype and get an MVP, so here I am, I've learned a lot along the way but lack a lot of the fundamentals (obviously) of full stack development.
I've been building a SaaS platform over the past four months. I started building it based on the OpenSaaS template back in November, and have only two files in my /sever folder.
dbSeeds.ts and a serverSetup.ts (which basically just does this):
middlewareConfig.set('express.json', bodyParser.json({ limit: '50mb' }));
Currently, nearly everything I've built is in my /client directory including operations.ts etc.
I've successfully deployed FE+BE+DB via Google Cloud with no errors - I'm not totally sure what the implications are of having everything in my /client directory.
How does the wasp framework actually know what files are part of the backend build & deployment vs frontend build & deployment? Are there security implications or major red flags by having everything in the /client directory? Am I looking at this totally wrong?
20 replies