-
Notifications
You must be signed in to change notification settings - Fork 10
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
Changes from all commits
d3bafa4
9bbd81c
24a9622
eed1360
402c26d
668db2c
e8a2b17
c149d03
40777a5
4d4e3a5
ff5ecc5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.wasp/ | ||
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore editor tmp files | ||
**/*~ | ||
**/#*# | ||
.DS_Store |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
File marking the root of Wasp project. |
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" | ||
} |
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" | ||
} | ||
} |
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" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
* { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ![]() 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;
}
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks nice!
It looked nice to me, but I'm no designer expert, so let's keep it simple :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But without this on hover animation problem different buttons do make sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally I would remove the: "You just started a new app." subtitle. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Logo from "./assets/logo.svg"; | ||
import "./Main.css"; | ||
infomiho marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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> | ||
); | ||
} |
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"; |
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"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
server: { | ||
open: true, | ||
}, | ||
}) |
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.