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 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.

<div className="flex flex-col gap-2">
<span>Select tags</span>
<div className="flex flex-wrap gap-4">
<ul className="flex flex-wrap gap-2">
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
<ul className="flex flex-wrap gap-2">
{tags && tags.length > 0 && (<ul className="flex flex-wrap gap-2">

Hide the ul when there are no tags to avoid broken layout.

Screenshot 2025-06-09 at 11 40 31

Comment on lines 54 to 58
<ul className="flex flex-col gap-2">
{tasks.map((task) => (
<TaskListItem task={task} key={task.id} />
))}
</ul>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd maybe put this above the number of completed tasks because it's more important.

return (
<div className="flex flex-col gap-6">
<div className="flex items-center justify-between">
<div>
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
<div>
<div className="text-sm text-neutral-500">

Making it a bit more muted since it's secondary information.


return (
<div className="flex flex-col gap-6">
<div className="flex items-center justify-between">
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
<div className="flex items-center justify-between">
<div className="flex items-center justify-between h-5">

Give it a fixed height to avoid layout jumps:

Screen.Recording.2025-06-09.at.11.36.27.mov

}

return (
<li className="group flex w-full flex-wrap items-center justify-between gap-4 rounded-lg px-6 py-3 odd:bg-neutral-50 even:bg-primary-50">
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is another wild change, but I'd wrap the whole element in a label, so when you click on the whole element it acts as the checkbox:

Suggested change
<li className="group flex w-full flex-wrap items-center justify-between gap-4 rounded-lg px-6 py-3 odd:bg-neutral-50 even:bg-primary-50">
<li>
<label
htmlFor={id}
className={twJoin(
"card flex w-full flex-wrap items-center justify-between gap-4 bg-neutral-50 px-6 py-3",
task.isDone ? "bg-primary-50" : "",
)}
>

You also don't need the group class since you are not styling anything with group: styles. Also, I'd use the bg-primary-50 to indicate the completed tasks (or the other way around) and not make it alternate colors becuase it doesn't convey any extra meaning. The alternate colors pattern is more common in big tables where it helps you to keep track which row you are reading.

Screen.Recording.2025-06-09.at.14.58.20.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Daamn nice improvement.

@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

@FranjoMindek FranjoMindek requested a review from infomiho June 10, 2025 11:05
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