Skip to content

Add minimal to starters #27

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

Merged
merged 11 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ If you don't already have it, you can install Wasp by going [here](https://wasp.

> **Note** After you create a new project, make sure to check the README.md to see any additional info

### Minimal

A minimal Wasp App with a single hello page.

Perfect for minimalists.

Use this tempalte:

```bash
wasp new <project-name> -t minimal
```

### SaaS Template

A SaaS Template to get your profitable side-project started quickly and easily!
Expand Down
11 changes: 11 additions & 0 deletions minimal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.wasp/
Copy link
Member

Choose a reason for hiding this comment

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

We have .gitignore file in skeleton, why not use that one? Ah, because this is on the starters repo? Ok got it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually since this repo will have multiple repos with same gititgnore, I should move it to root, and then skeleton takes care of that for templates. Then we won't be bothered by unstaged files, while also working fine.

But I will do that in a separate PR.

node_modules/

# Ignore all dotenv files by default to prevent accidentally committing any secrets.
# To include specific dotenv files, use the `!` operator or adjust these rules.
.env
.env.*

# Don't ignore example dotenv files.
!.env.example
!.env.*.example
4 changes: 4 additions & 0 deletions minimal/.waspignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ignore editor tmp files
**/*~
**/#*#
.DS_Store
1 change: 1 addition & 0 deletions minimal/.wasproot
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
File marking the root of Wasp project.
14 changes: 14 additions & 0 deletions minimal/main.wasp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
app __waspAppName__ {
wasp: {
version: "__waspVersion__"
},
title: "__waspProjectName__",
head: [
"<link rel='icon' href='/favicon.ico' />",
]
}

route RootRoute { path: "/", to: MainPage }
page MainPage {
component: import { MainPage } from "@src/MainPage"
}
16 changes: 16 additions & 0 deletions minimal/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "__waspAppName__",
"type": "module",
"dependencies": {
"wasp": "file:.wasp/out/sdk/wasp",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.26.2"
},
"devDependencies": {
"typescript": "^5.1.0",
"vite": "^4.3.9",
"@types/react": "^18.0.37",
"prisma": "5.19.1"
}
}
Binary file added minimal/public/favicon.ico
Binary file not shown.
10 changes: 10 additions & 0 deletions minimal/schema.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
datasource db {
provider = "sqlite"
// Wasp requires that the url is set to the DATABASE_URL environment variable.
url = env("DATABASE_URL")
}

// Wasp requires the `prisma-client-js` generator to be present.
generator client {
provider = "prisma-client-js"
}
96 changes: 96 additions & 0 deletions minimal/src/Main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
* {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It would be maybe cool to upgrade these styles, maybe to make the button look more modern or smth like that

Copy link
Collaborator

Choose a reason for hiding this comment

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

Screenshot 2025-05-20 at 15 52 11

Here are some styles from Bolt that are a drop in replacement:

Styles
:root {
  --primary-color: #ffcc00;
  --primary-hover: #e6b800;
  --background-color: #ffffff;
  --text-color: #1f2937;
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

main {
  max-width: 800px;
  text-align: center;
  padding: 3rem;
}

.logo {
  margin-bottom: 2.5rem;
}

.logo img {
  max-width: 180px;
  height: auto;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.welcome-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  color: var(--text-color);
  opacity: 0.8;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

code {
  background-color: rgba(255, 204, 0, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #1a1a1a;
  border: 1px solid rgba(255, 204, 0, 0.2);
}

.buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

.button-filled {
  background-color: var(--primary-color);
  color: #1a1a1a;
}

.button-filled:hover {
  background-color: var(--primary-hover);
}

.button-outline {
  border: 2px solid var(--primary-color);
  color: #1a1a1a;
  background-color: transparent;
}

.button-outline:hover {
  background-color: rgba(255, 204, 0, 0.1);
}

@media (max-width: 640px) {
  main {
    padding: 2rem;
  }
  
  .buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .welcome-title {
    font-size: 2rem;
  }
  
  .welcome-subtitle {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .button {
    width: 100%;
    justify-content: center;
  }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this:
image

Hover state:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we want to do hover animation on buttons, it looks weird when outlined and solid button are next to each other.
If they were in different sections yes, but next to each other they look weird, so I discarded that idea.

Copy link
Collaborator

@infomiho infomiho May 21, 2025

Choose a reason for hiding this comment

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

Looks nice!

it looks weird when outlined and solid button are next to each other.

It looked nice to me, but I'm no designer expert, so let's keep it simple :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But without this on hover animation problem different buttons do make sense.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We can drop the on hover transition, I think that's fine 👍 or you can just put opacity to 90% to get a bit of an effect, that's a trick I use sometimes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Personally I would remove the: "You just started a new app." subtitle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor

Choose a reason for hiding this comment

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

oh yeah, baby

-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
margin: 0;
padding: 0;
}

body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
}

#root {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.container {
margin: 3rem 3rem 10rem 3rem;
max-width: 726px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}

.logo {
max-height: 200px;
margin-bottom: 1rem;
}

.title {
font-size: 4rem;
font-weight: 700;
margin-bottom: 1rem;
}

.content {
font-size: 1.2rem;
font-weight: 400;
line-height: 2;
margin-bottom: 3rem;
}

.buttons {
display: flex;
flex-direction: row;
gap: 1rem;
}

.button {
font-size: 1.2rem;
font-weight: 700;
text-decoration: none;
padding: 1.2rem 1.5rem;
border-radius: 10px;
}

.button-filled {
color: black;
background-color: #ffcc00;
border: 2px solid #ffcc00;

transition: all 0.2s ease-in-out;
}

.button-filled:hover {
filter: brightness(0.95);
}

.button-outlined {
color: black;
background-color: transparent;
border: 2px solid #ffcc00;

transition: all 0.2s ease-in-out;
}

.button-outlined:hover {
filter: brightness(0.95);
}

code {
border-radius: 5px;
border: 1px solid #ffcc00;
padding: 0.2rem;
background: #ffcc0044;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}
37 changes: 37 additions & 0 deletions minimal/src/MainPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import Logo from "./assets/logo.svg";
import "./Main.css";

export function MainPage() {
return (
<main className="container">
<img className="logo" src={Logo} alt="wasp" />

<h2 className="title">Welcome to Wasp!</h2>

<p className="content">
This is page <code>MainPage</code> located at route <code>/</code>.
<br />
Open <code>src/MainPage.tsx</code> to edit it.
</p>

<div className="buttons">
<a
className="button button-filled"
href="https://wasp.sh/docs/tutorial/create"
target="_blank"
rel="noreferrer noopener"
>
Take the Tutorial
</a>
<a
className="button button-outlined"
href="https://discord.com/invite/rzdnErX"
target="_blank"
rel="noreferrer noopener"
>
Chat on Discord
</a>
</div>
</main>
);
}
1 change: 1 addition & 0 deletions minimal/src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions minimal/src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// <reference types="vite/client" />

// This is needed to properly support Vitest testing with jest-dom matchers.
// Types for jest-dom are not recognized automatically and Typescript complains
// about missing types e.g. when using `toBeInTheDocument` and other matchers.
// Reference: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843
import "@testing-library/jest-dom";
28 changes: 28 additions & 0 deletions minimal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// =============================== IMPORTANT =================================
// This file is mainly used for Wasp IDE support.
//
// Wasp will compile your code with slightly different (less strict) compilerOptions.
// You can increase the configuration's strictness (e.g., by adding
// "noUncheckedIndexedAccess": true), but you shouldn't reduce it (e.g., by
// adding "strict": false). Just keep in mind that this will only affect your
// IDE support, not the actual compilation.
//
// Full TypeScript configurability is coming very soon :)
{
"compilerOptions": {
"module": "esnext",
"composite": true,
"target": "esnext",
"moduleResolution": "bundler",
"jsx": "preserve",
"strict": true,
"esModuleInterop": true,
"isolatedModules": true,
"moduleDetection": "force",
"lib": ["dom", "dom.iterable", "esnext"],
"skipLibCheck": true,
"allowJs": true,
"outDir": ".wasp/out/user"
},
"include": ["src"]
}
7 changes: 7 additions & 0 deletions minimal/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'vite'

export default defineConfig({
server: {
open: true,
},
})