Skip to content

Add new basic starter for starters #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 73 commits into
base: dev
Choose a base branch
from

Conversation

FranjoMindek
Copy link
Contributor

@FranjoMindek FranjoMindek commented May 19, 2025

These showcases are part of the new basic starter:

  • Extending User model
  • Adding new models to Prisma
  • One-to-many relationship in Prisma
  • Many-to-many relationship in Prisma
  • Tailwind
  • Root component
  • Email auth
  • User signup fields
  • Actions and queries
  • Pages and rotues
  • Prettier and eslint

Should we showcase?:

  • RHF useForm
    • pro: already use it in Auth UI
    • cons: we force a choice on users (form library)
  • eslint/prettier
    • pro: setups basic chore work for what we already want e.g. prettier tailwind plugin, it would also make our code cleaner
    • cons: the starter is too opinionated
  • customizing Auth UI
    • might make more sense from saas perspective, but we have open-saas for that
  • OAuth flow
    • just a single OAuth provider to showcase the flow

Preview:
image
image

@infomiho infomiho self-requested a review May 19, 2025 12:08
@FranjoMindek FranjoMindek requested a review from Copilot May 26, 2025 14:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new "basic" starter template, adding core UI pages, authentication flows, database schema, Tailwind styling, and configuration for linting and formatting.

  • Added authentication pages (login, signup, email verification, password reset) and header/navigation.
  • Defined Prisma models for User, Task, and Tag with relationships and corresponding migrations.
  • Configured Tailwind, ESLint, Prettier, and updated README documentation.

Reviewed Changes

Copilot reviewed 49 out of 49 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
basic/src/auth/LoginPage.tsx Login page component with navigation links
basic/src/auth/EmailVerificationPage.tsx Email verification page component
basic/src/Header.tsx Site header with auth-aware navigation
basic/src/App.tsx Root component integrating header and routes
basic/src/App.css Tailwind base, utilities, and custom .card class
basic/schema.prisma Prisma models for User, Task, Tag with relations
basic/postcss.config.cjs PostCSS config enabling Tailwind and autoprefixer
basic/package.json Dependencies for React, Wasp, Prisma, Tailwind, etc.
basic/migrations/migration_lock.toml Migration lock file for Prisma
basic/migrations/20250526144559_init/migration.sql Migration adding userId to Tag table
basic/migrations/20250522152834_init/migration.sql Initial schema migration
basic/main.wasp Wasp app config: auth, routes, actions, queries
basic/eslint.config.js ESLint flat config for JS, TS, React, Prettier
basic/README.md Basic starter README with setup instructions
basic/.wasproot Marker for Wasp project root
basic/.waspignore Files ignored by Wasp
basic/.prettierrc Prettier config with Tailwind plugin
basic/.prettierignore Prettier ignore patterns
basic/.gitignore Git ignore for Wasp and node modules
README.md Top-level README updated with basic starter usage

FranjoMindek and others added 6 commits May 26, 2025 16:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…starters into franjo/new-basic-starter-template
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@FranjoMindek FranjoMindek self-assigned this May 27, 2025
@FranjoMindek FranjoMindek requested a review from infomiho June 8, 2025 07:47
@FranjoMindek
Copy link
Contributor Author

I think I caught all non-design comments.
Design one is a bit harder, especially since bolt didn't manage to do more than rendering a blank page before running out of tokens 😅.

Learned a lot from comments.

Copy link
Collaborator

@infomiho infomiho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried playing with the design and I've left a bunch of style changes. For some stuff I had good UX arguments (based on stuff I read and saw) and for other it was just a gut feeling.

Most functional change: removing migrations dir from .gitignore, that's why I'll request changes. We want users to version their migrations but we don't want to add them by default in the template. I misunderstood the change, all good, we discussed this on Discord.

@FranjoMindek
Copy link
Contributor Author

FranjoMindek commented Jun 10, 2025

Damn Miho, you're really good at this.
The app feels 10000x nicer. Thanks.

I went over all of the design comments.

Image

image

Copy link
Collaborator

@infomiho infomiho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job on updating the design! Left some minor comments.

The most actionable would be: clearing the task form after submit and the button icon comment: #28 (comment)

I'll approve the PR, feel free to merge after you address the minor comments in any way you like.

const [mounted, setMounted] = React.useState(false);
React.useLayoutEffect(() => setMounted(true), []);

const container = containerProp || (mounted && globalThis?.document?.body);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const container = containerProp || (mounted && globalThis?.document?.body);
const container = containerProp ?? (mounted && globalThis?.document?.body);

Copy link
Contributor Author

@FranjoMindek FranjoMindek Jun 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use || here, since it provides extra protection.

?? allows fort 0, false and "" to pass here, which doesn't make sense.

I know we type it to be the Element, but its a good fallback.
Most likely the same reason the original implementation also has the ||.

}}
>
{tag.name}
{size === "md" && (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know I suggested this way of writing it - but now that I see it in action, I'd much rather have an explicit showColorCircle or smth like that.

return context.entities.Task.create({
data: {
description,
isDone: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's the default value - no need to pass it in. But I understand being explicit as well.

event?.stopPropagation();

try {
await createTask(data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I usually do on form submit is clear the fields. This gives me some feedback that the submit went through. I'd reset the form using the reset function from RHF :)

@infomiho
Copy link
Collaborator

Screen.Recording.2025-06-18.at.14.19.58.mov

One extra thing - the task form seems to be submitted when you create a tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants