WaspW
Waspβ€’10mo ago
G35x

/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?
Was this page helpful?