Skip to content

Commit 492f39d

Browse files
authored
Merge pull request wasp-lang#509 from wasp-lang/franjo/run-prettier
2 parents a69b8d0 + 10dd2c7 commit 492f39d

File tree

197 files changed

+5095
-3811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+5095
-3811
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
*.wasp linguist-language=TypeScript
1+
*.wasp linguist-language=TypeScript

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are supported funding model platforms
22

3-
github: [ wasp-lang ] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
3+
github: [wasp-lang] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
44
patreon: # Replace with a single Patreon username
55
open_collective: # Replace with a single Open Collective username
66
ko_fi: # Replace with a single Ko-fi username

.github/workflows/blog-deployment.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'opensaas-sh/blog/**'
8+
- "opensaas-sh/blog/**"
99
pull_request:
1010
branches:
1111
- main
1212
paths:
13-
- 'opensaas-sh/blog/**'
13+
- "opensaas-sh/blog/**"
1414

1515
jobs:
1616
build:
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Node.js
2424
uses: actions/setup-node@v3
2525
with:
26-
node-version: 'lts/*'
26+
node-version: "lts/*"
2727

2828
- name: Install dependencies
2929
working-directory: ./opensaas-sh/blog
@@ -47,7 +47,7 @@ jobs:
4747
- name: Setup Node.js
4848
uses: actions/setup-node@v3
4949
with:
50-
node-version: 'lts/*'
50+
node-version: "lts/*"
5151

5252
- name: Install dependencies
5353
working-directory: ./opensaas-sh/blog
@@ -64,10 +64,10 @@ jobs:
6464
- name: Deploy to Netlify
6565
uses: nwtgck/actions-netlify@v2
6666
with:
67-
publish-dir: './opensaas-sh/blog/dist'
67+
publish-dir: "./opensaas-sh/blog/dist"
6868
production-branch: main
6969
github-token: ${{ secrets.GITHUB_TOKEN }}
70-
deploy-message: 'Deploy from GitHub Actions'
70+
deploy-message: "Deploy from GitHub Actions"
7171
env:
7272
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
7373
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

.github/workflows/e2e-tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
id: setup-node
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '22'
27+
node-version: "22"
2828

2929
- name: Docker setup
3030
uses: docker/setup-buildx-action@v3
@@ -56,7 +56,7 @@ jobs:
5656
run: |
5757
./tools/patch.sh
5858
59-
- name: '[e2e-tests] Install Node.js dependencies for Playwright tests'
59+
- name: "[e2e-tests] Install Node.js dependencies for Playwright tests"
6060
if: steps.cache-e2e-tests.outputs.cache-hit != 'true'
6161
working-directory: ./template
6262
run: |
@@ -78,14 +78,14 @@ jobs:
7878
path: ~/.cache/ms-playwright
7979
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}-${{ runner.os }}
8080

81-
- name: '[e2e-tests] Set up Playwright'
81+
- name: "[e2e-tests] Set up Playwright"
8282
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
8383
working-directory: ./template
8484
run: |
8585
cd e2e-tests
8686
npx playwright install --with-deps
8787
88-
- name: '[e2e-tests] Install Stripe CLI'
88+
- name: "[e2e-tests] Install Stripe CLI"
8989
run: |
9090
curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg
9191
echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list
@@ -95,13 +95,13 @@ jobs:
9595
# For Stripe webhooks to work in development, we need to run the Stripe CLI to listen for webhook events.
9696
# The Stripe CLI will receive the webhook events from Stripe test payments and
9797
# forward them to our local server so that we can test the payment flow in our e2e tests.
98-
- name: '[e2e-tests] Run Stripe CLI to listen for webhooks'
98+
- name: "[e2e-tests] Run Stripe CLI to listen for webhooks"
9999
env:
100100
STRIPE_DEVICE_NAME: ${{ secrets.STRIPE_DEVICE_NAME }}
101101
run: |
102102
stripe listen --api-key ${{ secrets.STRIPE_KEY }} --forward-to localhost:3001/payments-webhook &
103103
104-
- name: '[e2e-tests] Run Playwright tests'
104+
- name: "[e2e-tests] Run Playwright tests"
105105
env:
106106
# The e2e tests are testing parts of the app that need certain env vars, so we need to access them here.
107107
# These secretes can be set in your GitHub repo settings, e.g. https://github.com/<account>/<repo>/settings/secrets/actions

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Thanks so much for considering contributing to Open SaaS 🙏
22

33
## Considerations before Contributing
4+
45
Check if there is a GitHub issue already for the thing you would like to work on. If there is no issue yet, create a new one.
56

67
Let us know, in the issue, that you would like to work on it and how you plan to approach it.
@@ -15,6 +16,7 @@ Repo is divided into two main parts: [template](/template) dir and [opensaas-sh]
1516
`opensaas-sh` is the app deployed to https://opensaas.sh , and is actually made with open saas! It contains a demo app and open saas docs. We keep it updated as we work on the template.
1617

1718
## How to Contribute
19+
1820
1. Make sure you understand the basics of how open-saas works (check out [docs](https://docs.opensaas.sh)).
1921
2. Check out this repo (`main` branch) and make sure you are able to get the app in [template/app/](/template/app) running (to set it up, follow the same steps as for running a new open-saas app, as explained in the open-saas docs).
2022
3. Create a new git branch for your work (aka feature branch) and do your changes on it.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
## Welcome to your new SaaS App! 🎉
2+
23
<a href="https://www.producthunt.com/products/open-saas?embed=true&utm_source=badge-featured&utm_medium=badge&utm_source=badge-open&#0045;saas&#0045;2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=991058&theme=neutral&t=1753776395137" alt="Open&#0032;SaaS - The&#0032;open&#0045;source&#0032;SaaS&#0032;boilerplate&#0032;with&#0032;superpowers&#0033; | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
34

45
https://github.com/user-attachments/assets/3856276b-23e9-455e-a564-b5f26f4f0e98
56

6-
You've decided to build a SaaS app with the Open SaaS template. Great choice!
7+
You've decided to build a SaaS app with the Open SaaS template. Great choice!
78

89
This template is:
910

@@ -38,13 +39,15 @@ Because we're using Wasp as the full-stack framework, we can leverage a lot of i
3839
- 🚀 [One-command Deploy](https://wasp.sh/docs/advanced/deployment/overview) - Easily deploy your DB, Server, & Client with one commaned to [Railway](https://railway.app) or [Fly.io](https://fly.io) via the CLI. Or deploy manually to any other hosting serivce of your choice.
3940

4041
You also get access to Wasp's diverse, helpful community if you get stuck or need help.
42+
4143
- 🤝 [Wasp Discord](https://discord.gg/aCamt5wCpS)
4244

4345
## Getting Started
4446

4547
### Simple Instructions
4648

4749
First, to install the latest version of [Wasp](https://wasp.sh/) on macOS, Linux, or Windows with WSL, run the following command:
50+
4851
```bash
4952
curl -sSL https://get.wasp.sh/installer.sh | sh
5053
```
@@ -66,6 +69,7 @@ We've documented everything in great detail, including installation instructions
6669
## Getting Help & Providing Feedback
6770

6871
There are two ways to get help or provide feedback (and we try to always respond quickly!):
72+
6973
1. [Open an issue](https://github.com/wasp-lang/open-saas/issues)
7074
2. [Wasp Discord](https://discord.gg/aCamt5wCpS) -- please direct questions to the #🙋questions forum channel
7175

@@ -74,4 +78,3 @@ There are two ways to get help or provide feedback (and we try to always respond
7478
Note that we've tried to get as many of the core features of a SaaS app into this template as possible, but there still might be some missing features or functionality.
7579

7680
We could always use some help tying up loose ends: contributions are welcome! Check out [CONTRIBUTING.md](/CONTRIBUTING.md) for more details.
77-

opensaas-sh/app_diff/README.md.diff

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,24 @@
1111

1212
## UI Components
1313

14-
@@ -8,9 +10,20 @@
14+
@@ -8,9 +10,22 @@
1515

1616
## Development
1717

1818
+### .env files
19+
+
1920
+`.env.client` file is versioned, but `.env.server` file you have to obtain by running `npm run env:pull`, since it has secrets in it.
2021
+This will generate `.env.server` based on the `.env.vault`.
2122
+We are using https://vault.dotenv.org to power this and have an account/organization up there.
2223
+If you modify .env.server and want to persist the changes (for yourself and for the other team members), do `npm run env:push`.
2324
+
2425
### Running locally
25-
- Make sure you have the `.env.client` and `.env.server` files with correct dev values in the root of the project.
26-
- Run the database with `wasp start db` and leave it running.
27-
- Run `wasp start` and leave it running.
28-
- [OPTIONAL]: If this is the first time starting the app, or you've just made changes to your entities/prisma schema, also run `wasp db migrate-dev`.
2926

27+
- Make sure you have the `.env.client` and `.env.server` files with correct dev values in the root of the project.
28+
- Run the database with `wasp start db` and leave it running.
29+
- Run `wasp start` and leave it running.
30+
- [OPTIONAL]: If this is the first time starting the app, or you've just made changes to your entities/prisma schema, also run `wasp db migrate-dev`.
31+
+
3032
+## Deployment
3133
+
3234
+This app is deployed to fly.io, Wasp org, via `wasp deploy fly deploy`.

opensaas-sh/app_diff/package.json.diff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"name": "opensaas",
66
"type": "module",
77
+ "scripts": {
8+
+ "deploy": "REACT_APP_GOOGLE_ANALYTICS_ID=G-H3LSJCK95H wasp deploy fly deploy",
89
+ "env:pull": "npx dotenv-vault@latest pull development .env.server",
9-
+ "env:push": "npx dotenv-vault@latest push development .env.server",
10-
+ "deploy": "REACT_APP_GOOGLE_ANALYTICS_ID=G-H3LSJCK95H wasp deploy fly deploy"
10+
+ "env:push": "npx dotenv-vault@latest push development .env.server"
1111
+ },
1212
"dependencies": {
1313
"@aws-sdk/client-s3": "^3.523.0",
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
--- template/app/src/admin/dashboards/users/UsersTable.tsx
22
+++ opensaas-sh/app/src/admin/dashboards/users/UsersTable.tsx
3-
@@ -254,7 +254,7 @@
4-
<p className='text-sm text-foreground'>{user.subscriptionStatus}</p>
3+
@@ -302,7 +302,7 @@
54
</div>
6-
<div className='col-span-2 flex items-center'>
7-
- <p className='text-sm text-muted-foreground'>{user.paymentProcessorUserId}</p>
8-
+ <p className='text-sm text-muted-foreground'>{user.subscriptionStatus}</p>
5+
<div className="col-span-2 flex items-center">
6+
<p className="text-muted-foreground text-sm">
7+
- {user.paymentProcessorUserId}
8+
+ {user.subscriptionStatus}
9+
</p>
910
</div>
10-
<div className='col-span-1 flex items-center'>
11-
<div className='text-sm text-foreground'>
11+
<div className="col-span-1 flex items-center">

opensaas-sh/app_diff/src/analytics/providers/plausibleAnalyticsUtils.ts.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@
77
- `${PLAUSIBLE_BASE_URL}/v1/stats/aggregate?site_id=${PLAUSIBLE_SITE_ID}&metrics=pageviews`,
88
+ `${PLAUSIBLE_BASE_URL}/v1/stats/aggregate?site_id=${PLAUSIBLE_SITE_ID}&metrics=pageviews&with_imported=true`,
99
{
10-
method: 'GET',
10+
method: "GET",
1111
headers: {
12-
@@ -80,7 +80,7 @@
12+
@@ -90,7 +90,7 @@
1313
}
1414

1515
async function getPageviewsForDate(date: string) {
1616
- const url = `${PLAUSIBLE_BASE_URL}/v1/stats/aggregate?site_id=${PLAUSIBLE_SITE_ID}&period=day&date=${date}&metrics=pageviews`;
1717
+ const url = `${PLAUSIBLE_BASE_URL}/v1/stats/aggregate?site_id=${PLAUSIBLE_SITE_ID}&period=day&date=${date}&metrics=pageviews&with_imported=true`;
1818
const response = await fetch(url, {
19-
method: 'GET',
19+
method: "GET",
2020
headers: headers,
21-
@@ -93,7 +93,7 @@
21+
@@ -103,7 +103,7 @@
2222
}
2323

2424
export async function getSources() {
2525
- const url = `${PLAUSIBLE_BASE_URL}/v1/stats/breakdown?site_id=${PLAUSIBLE_SITE_ID}&property=visit:source&metrics=visitors`;
2626
+ const url = `${PLAUSIBLE_BASE_URL}/v1/stats/breakdown?site_id=${PLAUSIBLE_SITE_ID}&property=visit:source&metrics=visitors&with_imported=true`;
2727
const response = await fetch(url, {
28-
method: 'GET',
28+
method: "GET",
2929
headers: headers,

0 commit comments

Comments
 (0)