├── .gitignore ├── LICENSE ├── README.md └── minimal ├── .gitignore ├── .waspignore ├── .wasproot ├── main.wasp ├── package.json ├── public └── favicon.ico ├── schema.prisma ├── src ├── Main.css ├── MainPage.tsx ├── assets │ └── logo.svg └── vite-env.d.ts ├── tsconfig.json └── vite.config.ts /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 wasp-lang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to Wasp Starters 👋 2 | 3 | In this repository you'll find some of the starters to speed up your initial project with [Wasp Lang](https://wasp.sh/) 4 | 5 | If you don't already have it, you can install Wasp by going [here](https://wasp.sh/docs). 6 | 7 | ## Available starters 8 | 9 | > **Note** After you create a new project, make sure to check the README.md to see any additional info 10 | 11 | ### Minimal 12 | 13 | A minimal Wasp App with a single hello page. 14 | 15 | Perfect for minimalists. 16 | 17 | Use this tempalte: 18 | 19 | ```bash 20 | wasp new -t minimal 21 | ``` 22 | 23 | ### SaaS Template 24 | 25 | A SaaS Template to get your profitable side-project started quickly and easily! 26 | 27 | It used to be here, but now it became big enough to have its own repo: check it out at https://github.com/wasp-lang/open-saas . 28 | 29 | ## If you are looking to contribute a template 30 | 31 | Adding a new template includes: 32 | 33 | 1. Create a new folder in the root of the repo and write the Wasp app code in it, for whatever you want your template to be. 34 | 2. Put the placeholders in `main.wasp` instead of the app name and `title`, if you wish (check how other templates do this). 35 | 3. Create a PR! In the PR, ask a core team do add template to the list of templates in the code of Wasp CLI, in https://github.com/wasp-lang/wasp/blob/main/waspc/cli/src/Wasp/Cli/Command/CreateNewProject/StarterTemplates.hs . 36 | You could also do this on your own, but it involves Haskell and setting it up might be quite time consuming if you never used it before, so we advise leaving it to the core team. 37 | 38 | ## Core team: tag management 39 | 40 | If we updated templates for the existing `wasp` version, then we also need to update the tag that current `wasp` uses to fetch the templates to point to our latest changes. 41 | 42 | If new major version of `wasp` came out and we want to update the templates so they work with this new version of `wasp`, then we should not touch existing tags but should instead create a new tag that corresponds to the one that new `wasp` expects, and we should make it point to our latest changes. 43 | 44 | Adding a new tag: 45 | 46 | ```bash 47 | git tag wasp-v0.16-template 48 | git push origin wasp-v0.16-template 49 | ``` 50 | 51 | Updating existing tag: 52 | 53 | ```bash 54 | git tag -f wasp-v0.16-template 55 | git push origin -f wasp-v0.16-template 56 | ``` 57 | -------------------------------------------------------------------------------- /minimal/.gitignore: -------------------------------------------------------------------------------- 1 | .wasp/ 2 | node_modules/ 3 | 4 | # Ignore all dotenv files by default to prevent accidentally committing any secrets. 5 | # To include specific dotenv files, use the `!` operator or adjust these rules. 6 | .env 7 | .env.* 8 | 9 | # Don't ignore example dotenv files. 10 | !.env.example 11 | !.env.*.example 12 | -------------------------------------------------------------------------------- /minimal/.waspignore: -------------------------------------------------------------------------------- 1 | # Ignore editor tmp files 2 | **/*~ 3 | **/#*# 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /minimal/.wasproot: -------------------------------------------------------------------------------- 1 | File marking the root of Wasp project. 2 | -------------------------------------------------------------------------------- /minimal/main.wasp: -------------------------------------------------------------------------------- 1 | app __waspAppName__ { 2 | wasp: { 3 | version: "__waspVersion__" 4 | }, 5 | title: "__waspProjectName__", 6 | head: [ 7 | "", 8 | ] 9 | } 10 | 11 | route RootRoute { path: "/", to: MainPage } 12 | page MainPage { 13 | component: import { MainPage } from "@src/MainPage" 14 | } 15 | -------------------------------------------------------------------------------- /minimal/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "__waspAppName__", 3 | "type": "module", 4 | "dependencies": { 5 | "wasp": "file:.wasp/out/sdk/wasp", 6 | "react": "^18.2.0", 7 | "react-dom": "^18.2.0", 8 | "react-router-dom": "^6.26.2" 9 | }, 10 | "devDependencies": { 11 | "typescript": "^5.1.0", 12 | "vite": "^4.3.9", 13 | "@types/react": "^18.0.37", 14 | "prisma": "5.19.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /minimal/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wasp-lang/starters/d262cc1571a01a069ecbdec6417152062d567311/minimal/public/favicon.ico -------------------------------------------------------------------------------- /minimal/schema.prisma: -------------------------------------------------------------------------------- 1 | datasource db { 2 | provider = "sqlite" 3 | // Wasp requires that the url is set to the DATABASE_URL environment variable. 4 | url = env("DATABASE_URL") 5 | } 6 | 7 | // Wasp requires the `prisma-client-js` generator to be present. 8 | generator client { 9 | provider = "prisma-client-js" 10 | } 11 | -------------------------------------------------------------------------------- /minimal/src/Main.css: -------------------------------------------------------------------------------- 1 | * { 2 | -webkit-font-smoothing: antialiased; 3 | -moz-osx-font-smoothing: grayscale; 4 | box-sizing: border-box; 5 | margin: 0; 6 | padding: 0; 7 | } 8 | 9 | body { 10 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 11 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 12 | sans-serif; 13 | } 14 | 15 | #root { 16 | min-height: 100vh; 17 | display: flex; 18 | flex-direction: column; 19 | justify-content: center; 20 | align-items: center; 21 | } 22 | 23 | .container { 24 | margin: 3rem 3rem 10rem 3rem; 25 | max-width: 726px; 26 | display: flex; 27 | flex-direction: column; 28 | justify-content: center; 29 | align-items: center; 30 | text-align: center; 31 | } 32 | 33 | .logo { 34 | max-height: 200px; 35 | margin-bottom: 1rem; 36 | } 37 | 38 | .title { 39 | font-size: 4rem; 40 | font-weight: 700; 41 | margin-bottom: 1rem; 42 | } 43 | 44 | .content { 45 | font-size: 1.2rem; 46 | font-weight: 400; 47 | line-height: 2; 48 | margin-bottom: 3rem; 49 | } 50 | 51 | .buttons { 52 | display: flex; 53 | flex-direction: row; 54 | gap: 1rem; 55 | } 56 | 57 | .button { 58 | font-size: 1.2rem; 59 | font-weight: 700; 60 | text-decoration: none; 61 | padding: 1.2rem 1.5rem; 62 | border-radius: 10px; 63 | } 64 | 65 | .button-filled { 66 | color: black; 67 | background-color: #ffcc00; 68 | border: 2px solid #ffcc00; 69 | 70 | transition: all 0.2s ease-in-out; 71 | } 72 | 73 | .button-filled:hover { 74 | filter: brightness(0.95); 75 | } 76 | 77 | .button-outlined { 78 | color: black; 79 | background-color: transparent; 80 | border: 2px solid #ffcc00; 81 | 82 | transition: all 0.2s ease-in-out; 83 | } 84 | 85 | .button-outlined:hover { 86 | filter: brightness(0.95); 87 | } 88 | 89 | code { 90 | border-radius: 5px; 91 | border: 1px solid #ffcc00; 92 | padding: 0.2rem; 93 | background: #ffcc0044; 94 | font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, 95 | Bitstream Vera Sans Mono, Courier New, monospace; 96 | } 97 | -------------------------------------------------------------------------------- /minimal/src/MainPage.tsx: -------------------------------------------------------------------------------- 1 | import Logo from "./assets/logo.svg"; 2 | import "./Main.css"; 3 | 4 | export function MainPage() { 5 | return ( 6 |
7 | wasp 8 | 9 |

Welcome to Wasp!

10 | 11 |

12 | This is page MainPage located at route /. 13 |
14 | Open src/MainPage.tsx to edit it. 15 |

16 | 17 |
18 | 24 | Take the Tutorial 25 | 26 | 32 | Chat on Discord 33 | 34 |
35 |
36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /minimal/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /minimal/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | // This is needed to properly support Vitest testing with jest-dom matchers. 4 | // Types for jest-dom are not recognized automatically and Typescript complains 5 | // about missing types e.g. when using `toBeInTheDocument` and other matchers. 6 | // Reference: https://github.com/testing-library/jest-dom/issues/546#issuecomment-1889884843 7 | import "@testing-library/jest-dom"; 8 | -------------------------------------------------------------------------------- /minimal/tsconfig.json: -------------------------------------------------------------------------------- 1 | // =============================== IMPORTANT ================================= 2 | // This file is mainly used for Wasp IDE support. 3 | // 4 | // Wasp will compile your code with slightly different (less strict) compilerOptions. 5 | // You can increase the configuration's strictness (e.g., by adding 6 | // "noUncheckedIndexedAccess": true), but you shouldn't reduce it (e.g., by 7 | // adding "strict": false). Just keep in mind that this will only affect your 8 | // IDE support, not the actual compilation. 9 | // 10 | // Full TypeScript configurability is coming very soon :) 11 | { 12 | "compilerOptions": { 13 | "module": "esnext", 14 | "composite": true, 15 | "target": "esnext", 16 | "moduleResolution": "bundler", 17 | "jsx": "preserve", 18 | "strict": true, 19 | "esModuleInterop": true, 20 | "isolatedModules": true, 21 | "moduleDetection": "force", 22 | "lib": ["dom", "dom.iterable", "esnext"], 23 | "skipLibCheck": true, 24 | "allowJs": true, 25 | "outDir": ".wasp/out/user" 26 | }, 27 | "include": ["src"] 28 | } 29 | -------------------------------------------------------------------------------- /minimal/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | server: { 5 | open: true, 6 | }, 7 | }) 8 | --------------------------------------------------------------------------------