genyus
genyus
WWasp
Created by NEROX on 4/16/2025 in #πŸ™‹questions
Wasp TypeScript configuration - Split Wasp file
6 replies
WWasp
Created by mokthar on 4/12/2025 in #πŸ™‹questions
Network Error
Is this in development or production? Have you checked the server logs or the browser inspector for any client-side errors that might provide more explanation?
6 replies
WWasp
Created by infelipe Gomes on 4/7/2025 in #πŸ™‹questions
Test fails due to unresolved "@tanstack/react-query" import
@infelipe Gomes what version of react-query are you using?
20 replies
WWasp
Created by mario.p on 3/13/2025 in #πŸ™‹questions
How to integrate Swagger UI?
Added a screenshot to the Gist
15 replies
WWasp
Created by johnwest6192 on 4/7/2025 in #πŸ™‹questions
need a way to have different emailsender in dev and prod...
This is achievable using Wasp TypeScript config:
import { EmailProvider } from 'wasp-config';

app.emailSender({
provider: process.env.EMAIL_PROVIDER as EmailProvider || 'Dummy',
defaultFrom: { email: '[email protected]' }
});
import { EmailProvider } from 'wasp-config';

app.emailSender({
provider: process.env.EMAIL_PROVIDER as EmailProvider || 'Dummy',
defaultFrom: { email: '[email protected]' }
});
Set the EMAIL_PROVIDER environment variable to SMTP in production and Dummy in dev.
6 replies
WWasp
Created by mario.p on 3/13/2025 in #πŸ™‹questions
How to integrate Swagger UI?
Thanks to a suggestion from @martinsos, I've been able to get this working and created a Gist to detail the necessary changes. I use Typescript configuration files, so that's what's in my example, but you can add the JSDoc comments in main.wasp if that's what you use.
15 replies
WWasp
Created by aman03331 on 3/22/2025 in #πŸ™‹questions
Error when running wasp db migrate-dev
@aman03331 if you need the specific steps for the instructions provided by the bot: 1. Move your project to the Linux file system:
# Create a holding directory in your Linux home folder
mkdir -p ~/projects

# Copy your project there
cp -r /mnt/c/path/to/your/project ~/projects/

# Or move it
mv /mnt/c/path/to/your/project ~/projects/

# Create a holding directory in your Linux home folder
mkdir -p ~/projects

# Copy your project there
cp -r /mnt/c/path/to/your/project ~/projects/

# Or move it
mv /mnt/c/path/to/your/project ~/projects/

2. Navigate to the project in the Linux file system and try running Wasp again:
cd ~/projects/saas
wasp start

cd ~/projects/saas
wasp start

11 replies
WWasp
Created by aman03331 on 3/22/2025 in #πŸ™‹questions
Error when running wasp db migrate-dev
@kapa.ai Please explain the cause and resolution of the following error message shown in a WSL2 environment:
npm error code EISDIR
npm error syscall symlink
npm error path \\wsl.localhost\Ubuntu\home\aman\saas\app\.wasp\out\sdk\wasp
npm error dest \\wsl.localhost\Ubuntu\home\aman\saas\app\node_modules\wasp
npm error errno -4068
npm error EISDIR: illegal operation on a directory, symlink '\\wsl.localhost\Ubuntu\home\aman\saas\app\.wasp\out\sdk\wasp' -> '\\wsl.localhost\Ubuntu\home\aman\saas\app\node_modules\wasp'
npm error code EISDIR
npm error syscall symlink
npm error path \\wsl.localhost\Ubuntu\home\aman\saas\app\.wasp\out\sdk\wasp
npm error dest \\wsl.localhost\Ubuntu\home\aman\saas\app\node_modules\wasp
npm error errno -4068
npm error EISDIR: illegal operation on a directory, symlink '\\wsl.localhost\Ubuntu\home\aman\saas\app\.wasp\out\sdk\wasp' -> '\\wsl.localhost\Ubuntu\home\aman\saas\app\node_modules\wasp'
11 replies
WWasp
Created by gumboots on 3/19/2025 in #πŸ™‹questions
Encrypting email address in db with Email Auth
A few thoughts: 1. While email addresses are indeed PII, they're generally considered as non-sensitive, so encrypting them β€” especially in isolation β€” would offer marginal privacy benefits for your users, while introducing non-trivial technical challenges for you. 2. Encryption introduces a set of new considerations. How are you going to store and retrieve your encryption keys securely? What's your strategy if a key needs to be revoked? What happens if an attacker gains access to more than just the database? 3. Encrypting at the application level means you'd need to modify every touchpoint in your codebase that reads or writes a user's email address (e.g. payment subscriptions, newsletters, etc). It might be better to try database-level encryption (e.g. pgcrypto), although it's not obvious how well that might work with Wasp/Prisma Is there a specific reason you want to encrypt your email addresses? If you want to improve your overall security/privacy posture, I'd suggest there are other, less disruptive ways to do it: - Regular system audits - Tightening access controls - Implementing logging/monitoring and intrusion detection - Minimising stored PII data volume
17 replies
WWasp
Created by mario.p on 3/13/2025 in #πŸ™‹questions
How to integrate Swagger UI?
Thanks, will do
15 replies
WWasp
Created by mario.p on 3/13/2025 in #πŸ™‹questions
How to integrate Swagger UI?
Yes, if the comments could be carried through, it would be work once Swagger is installed and configured
15 replies
WWasp
Created by G35x on 3/9/2025 in #πŸ™‹questions
/app/src/client VS /app/src/server?
Yep, I had the same issues when I first started the project a couple months ago, so I don’t think it’s even a new problem. Defining the structure should make a noticeable difference
20 replies
WWasp
Created by G35x on 3/9/2025 in #πŸ™‹questions
/app/src/client VS /app/src/server?
I actually generated it with ChatGPT sometime ago to include in my .cursorrules file. This wasn’t generated from an existing directory structure, I just prompted it with the structure I wanted
20 replies
WWasp
Created by mario.p on 3/13/2025 in #πŸ™‹questions
How to integrate Swagger UI?
@mario.p this was something I had way down on my backlog, but your question prompted me to try and play with it for a bit, but from what I've found so far, it doesn't seem possible right now. I attempted a few different approaches: 1. Implementing Swagger directly. This involved installing the swagger-jsdoc and swagger-ui-express packages, creating a new api namespace with middleware for the Swagger UI at the desired path. I also found I needed to install helmet so that I could disable CSP and HSTS at that path, for the docs to be rendered. However, the conclusion was that because Wasp generates the final routes, there's no way to define the JSDoc comments in a persistent way in your source code, so the output was always empty (I did verify that adding comments to the built code works, but obviously that’s not maintainable). 2. I then tried to use express-oas-generator, but they want you to hook into specific points of the express server lifecycle, which Wasp doesn't expose, so I left that one alone. 3. Finally, I attempted using swagger-autogen and while it can generate the basic route definitions, I was faced with the same problem as #1 above, where there's no way to define the necessary comments in the generated code. Happy to be corrected by a member of the team, but as far as I can tell, it's not currently possible practical.
15 replies
WWasp
Created by Ringo on 3/12/2025 in #πŸ™‹questions
Google OAuth : Missing required parameter: scope
No, he's asking you to share your configFn implementation, which in your case is the getGoogleAuthConfig function
20 replies
WWasp
Created by Omen on 3/11/2025 in #πŸ™‹questions
Custom database is active and accepting connections but I cannot start the project
Is your database local/remote? Are you able to connect to the same URL from other tools, e.g. terminal, db admin GUI?
11 replies
WWasp
Created by G35x on 3/9/2025 in #πŸ™‹questions
/app/src/client VS /app/src/server?
src/
β”œβ”€β”€ features/ # Feature-based modules
β”‚ └── feature/ # Example feature
β”‚ β”œβ”€β”€ core/ # Core feature files
β”‚ β”‚ β”œβ”€β”€ client/ # Client-side feature code
β”‚ β”‚ β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”‚ β”‚ β”œβ”€β”€ hooks/ # Custom hooks
β”‚ β”‚ β”‚ β”œβ”€β”€ layouts/ # Layout templates and containers
β”‚ β”‚ β”‚ β”œβ”€β”€ pages/ # Page components and routes
β”‚ β”‚ β”‚ └── utils/ # Client-side helper functions
β”‚ β”‚ β”œβ”€β”€ server/ # Server-side feature code
β”‚ β”‚ β”‚ β”œβ”€β”€ api/ # API endpoints and middleware
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ endpoints.ts # Route definitions
β”‚ β”‚ β”‚ β”‚ └── middleware.ts # Request/response middleware
β”‚ β”‚ β”‚ β”œβ”€β”€ operations/ # Wasp operations
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ actions.ts # Mutation operations
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ cruds.ts # CRUD operations
β”‚ β”‚ β”‚ β”‚ └── queries.ts # Query operations
β”‚ β”‚ β”‚ └── utils/ # Server-side helper functions
β”‚ β”‚ └── types/ # Shared type definitions
β”‚ β”œβ”€β”€ sub-feature/ # Example sub-feature
β”‚ β”‚ β”œβ”€β”€ client/
β”‚ β”‚ β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”‚ β”œβ”€β”€ pages/
β”‚ β”‚ β”‚ └── utils/
β”‚ β”‚ β”œβ”€β”€ server/
β”‚ β”‚ β”‚ β”œβ”€β”€ api/
β”‚ β”‚ β”‚ └── utils/
β”‚ β”‚ └── types/
β”‚ └── sub-feature-x/ # Additional sub-feature
└── shared/ # Cross-feature resources
β”œβ”€β”€ client/
β”‚ β”œβ”€β”€ components/
β”‚ β”œβ”€β”€ hooks/
β”‚ β”œβ”€β”€ icons/
β”‚ β”œβ”€β”€ layouts/
β”‚ β”œβ”€β”€ static/
β”‚ └── utils/
└── server/
β”œβ”€β”€ assets/
└── utils/
src/
β”œβ”€β”€ features/ # Feature-based modules
β”‚ └── feature/ # Example feature
β”‚ β”œβ”€β”€ core/ # Core feature files
β”‚ β”‚ β”œβ”€β”€ client/ # Client-side feature code
β”‚ β”‚ β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”‚ β”‚ β”œβ”€β”€ hooks/ # Custom hooks
β”‚ β”‚ β”‚ β”œβ”€β”€ layouts/ # Layout templates and containers
β”‚ β”‚ β”‚ β”œβ”€β”€ pages/ # Page components and routes
β”‚ β”‚ β”‚ └── utils/ # Client-side helper functions
β”‚ β”‚ β”œβ”€β”€ server/ # Server-side feature code
β”‚ β”‚ β”‚ β”œβ”€β”€ api/ # API endpoints and middleware
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ endpoints.ts # Route definitions
β”‚ β”‚ β”‚ β”‚ └── middleware.ts # Request/response middleware
β”‚ β”‚ β”‚ β”œβ”€β”€ operations/ # Wasp operations
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ actions.ts # Mutation operations
β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€ cruds.ts # CRUD operations
β”‚ β”‚ β”‚ β”‚ └── queries.ts # Query operations
β”‚ β”‚ β”‚ └── utils/ # Server-side helper functions
β”‚ β”‚ └── types/ # Shared type definitions
β”‚ β”œβ”€β”€ sub-feature/ # Example sub-feature
β”‚ β”‚ β”œβ”€β”€ client/
β”‚ β”‚ β”‚ β”œβ”€β”€ components/
β”‚ β”‚ β”‚ β”œβ”€β”€ pages/
β”‚ β”‚ β”‚ └── utils/
β”‚ β”‚ β”œβ”€β”€ server/
β”‚ β”‚ β”‚ β”œβ”€β”€ api/
β”‚ β”‚ β”‚ └── utils/
β”‚ β”‚ └── types/
β”‚ └── sub-feature-x/ # Additional sub-feature
└── shared/ # Cross-feature resources
β”œβ”€β”€ client/
β”‚ β”œβ”€β”€ components/
β”‚ β”œβ”€β”€ hooks/
β”‚ β”œβ”€β”€ icons/
β”‚ β”œβ”€β”€ layouts/
β”‚ β”œβ”€β”€ static/
β”‚ └── utils/
└── server/
β”œβ”€β”€ assets/
└── utils/
20 replies
WWasp
Created by G35x on 3/9/2025 in #πŸ™‹questions
/app/src/client VS /app/src/server?
from what I've gathered, grouping the operations.ts files inside of the directory for any given feature isn't a cardinal sin and may even lend to easier maintenance in the future.
If it helps, the following how I organised my current project. This is an entirely opinionated structure, so feel free to ignore or adapt as you see fit, but hopefully it might give you one example of the many ways you can organise your codebase:
20 replies
WWasp
Created by Jhon. All on 3/9/2025 in #πŸ™‹questions
error in main.wasp when PrismaSchemaFolder active.
This sounds like a Prisma/VSC issue as opposed to anything Wasp-specific, but this issue might be relevant.
21 replies
WWasp
Created by G35x on 3/9/2025 in #πŸ™‹questions
/app/src/client VS /app/src/server?
As the bot suggested, you’re free to organise your code within the src directory as you please without any security or technical implications. However, your current setup doesn’t sound particularly intuitive. Imagine if you had a collaborator join the project; they wouldn’t expect to find server-side code like operations.ts in the client directory. If you are going to retain the original client and server directories, then you should organise your code accordingly. I personally prefer and use the feature-based arrangement as mentioned by the bot, but it really is up to you to choose a structure that best suits the scale of your project and your personal coding style.
20 replies