Skip to content

Commit 10dd2c7

Browse files
committed
i run patch on main, checked out this branch, run prettier format, and then run diff
1 parent 0773fb9 commit 10dd2c7

Some content is hidden

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

44 files changed

+950
-802
lines changed

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,

opensaas-sh/app_diff/src/analytics/stats.ts.diff

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,44 @@
11
--- template/app/src/analytics/stats.ts
22
+++ opensaas-sh/app/src/analytics/stats.ts
3-
@@ -2,11 +2,9 @@
4-
import { type DailyStatsJob } from 'wasp/server/jobs';
5-
import Stripe from 'stripe';
6-
import { stripe } from '../payment/stripe/stripeClient';
7-
-import { listOrders } from '@lemonsqueezy/lemonsqueezy.js';
8-
import { getDailyPageViews, getSources } from './providers/plausibleAnalyticsUtils';
9-
-// import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils';
10-
-import { paymentProcessor } from '../payment/paymentProcessor';
11-
import { SubscriptionStatus } from '../payment/plans';
12-
+// import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils';
3+
@@ -1,15 +1,13 @@
4+
-import { listOrders } from "@lemonsqueezy/lemonsqueezy.js";
5+
import Stripe from "stripe";
6+
import { type DailyStats } from "wasp/entities";
7+
import { type DailyStatsJob } from "wasp/server/jobs";
8+
+import { SubscriptionStatus } from "../payment/plans";
9+
import { stripe } from "../payment/stripe/stripeClient";
10+
import {
11+
getDailyPageViews,
12+
getSources,
13+
} from "./providers/plausibleAnalyticsUtils";
14+
// import { getDailyPageViews, getSources } from './providers/googleAnalyticsUtils';
15+
-import { paymentProcessor } from "../payment/paymentProcessor";
16+
-import { SubscriptionStatus } from "../payment/plans";
1317

14-
export type DailyStatsProps = { dailyStats?: DailyStats; weeklyStats?: DailyStats[]; isLoading?: boolean };
15-
16-
@@ -42,17 +40,7 @@
18+
export type DailyStatsProps = {
19+
dailyStats?: DailyStats;
20+
@@ -52,19 +50,7 @@
1721
paidUserDelta -= yesterdaysStats.paidUserCount;
1822
}
1923

2024
- let totalRevenue;
2125
- switch (paymentProcessor.id) {
22-
- case 'stripe':
26+
- case "stripe":
2327
- totalRevenue = await fetchTotalStripeRevenue();
2428
- break;
25-
- case 'lemonsqueezy':
29+
- case "lemonsqueezy":
2630
- totalRevenue = await fetchTotalLemonSqueezyRevenue();
2731
- break;
2832
- default:
29-
- throw new Error(`Unsupported payment processor: ${paymentProcessor.id}`);
33+
- throw new Error(
34+
- `Unsupported payment processor: ${paymentProcessor.id}`,
35+
- );
3036
- }
3137
+ let totalRevenue = await fetchTotalStripeRevenue();
3238

3339
const { totalViews, prevDayViewsChangePercent } = await getDailyPageViews();
3440

35-
@@ -163,38 +151,3 @@
41+
@@ -176,38 +162,3 @@
3642
// Revenue is in cents so we convert to dollars (or your main currency unit)
3743
return totalRevenue / 100;
3844
}
@@ -67,7 +73,7 @@
6773
- // Revenue is in cents so we convert to dollars (or your main currency unit)
6874
- return totalRevenue / 100;
6975
- } catch (error) {
70-
- console.error('Error fetching Lemon Squeezy revenue:', error);
76+
- console.error("Error fetching Lemon Squeezy revenue:", error);
7177
- throw error;
7278
- }
7379
-}

opensaas-sh/app_diff/src/auth/email-and-pass/emails.ts.diff

Lines changed: 0 additions & 8 deletions
This file was deleted.

opensaas-sh/app_diff/src/auth/userSignupFields.ts.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
--- template/app/src/auth/userSignupFields.ts
22
+++ opensaas-sh/app/src/auth/userSignupFields.ts
3-
@@ -1,7 +1,5 @@
4-
-import { z } from 'zod';
5-
import { defineUserSignupFields } from 'wasp/auth/providers/types';
6-
-
7-
-const adminEmails = process.env.ADMIN_EMAILS?.split(',') || [];
8-
+import { z } from 'zod';
3+
@@ -1,8 +1,6 @@
4+
import { defineUserSignupFields } from "wasp/auth/providers/types";
5+
import { z } from "zod";
96

7+
-const adminEmails = process.env.ADMIN_EMAILS?.split(",") || [];
8+
-
109
const emailDataSchema = z.object({
1110
email: z.string(),
11+
});
1212
@@ -16,10 +14,6 @@
1313
const emailData = emailDataSchema.parse(data);
1414
return emailData.email;
@@ -20,7 +20,7 @@
2020
});
2121

2222
const githubDataSchema = z.object({
23-
@@ -45,14 +39,6 @@
23+
@@ -48,14 +42,6 @@
2424
const githubData = githubDataSchema.parse(data);
2525
return githubData.profile.login;
2626
},
@@ -35,7 +35,7 @@
3535
});
3636

3737
// We are using the first email from the list of emails returned by GitHub.
38-
@@ -85,13 +71,6 @@
38+
@@ -88,13 +74,6 @@
3939
const googleData = googleDataSchema.parse(data);
4040
return googleData.profile.email;
4141
},
@@ -49,7 +49,7 @@
4949
});
5050

5151
export function getGoogleAuthConfig() {
52-
@@ -121,13 +100,6 @@
52+
@@ -126,13 +105,6 @@
5353
const discordData = discordDataSchema.parse(data);
5454
return discordData.profile.username;
5555
},
Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,69 @@
11
--- template/app/src/client/Main.css
22
+++ opensaas-sh/app/src/client/Main.css
3-
@@ -44,6 +44,15 @@
3+
@@ -56,6 +56,23 @@
44
.border-gradient-primary > * {
55
background: hsl(var(--background));
66
}
77
+
88
+ /* Radial gradient utilities */
99
+ .bg-radial-gradient {
10-
+ background: radial-gradient(circle at 30% 30%, hsl(var(--card-accent)/0.5) 0%, hsl(var(--accent)/0.15) 100%);
10+
+ background: radial-gradient(
11+
+ circle at 30% 30%,
12+
+ hsl(var(--card-accent) / 0.5) 0%,
13+
+ hsl(var(--accent) / 0.15) 100%
14+
+ );
1115
+ }
12-
+
16+
+
1317
+ .dark .bg-radial-gradient {
14-
+ background: radial-gradient(circle at 30% 30%, hsl(var(--card-subtle)/0.8) 0%, hsl(var(--card)) 100%);
18+
+ background: radial-gradient(
19+
+ circle at 30% 30%,
20+
+ hsl(var(--card-subtle) / 0.8) 0%,
21+
+ hsl(var(--card)) 100%
22+
+ );
1523
+ }
1624
}
1725

1826
/* Here is an example of how to add a custom font.
19-
@@ -51,6 +60,16 @@
27+
@@ -63,6 +80,16 @@
2028
* They are defined first here, then need to be referenced in the tailwind.config.js file
2129
* under `theme.extend.fontFamily`, and then can be used as a tailwind class, e.g. className='font-satoshi'.
2230
*/
2331
+
2432
+/* Satoshi Font Family */
2533
+@font-face {
26-
+ font-family: 'Satoshi';
27-
+ src: url('/fonts/Satoshi-Light.woff2') format('woff2');
34+
+ font-family: "Satoshi";
35+
+ src: url("/fonts/Satoshi-Light.woff2") format("woff2");
2836
+ font-weight: 300;
2937
+ font-style: normal;
3038
+ font-display: swap;
3139
+}
3240
+
3341
@font-face {
34-
font-family: 'Satoshi';
35-
src: url('/fonts/Satoshi-Regular.woff2') format('woff2');
36-
@@ -59,6 +78,30 @@
42+
font-family: "Satoshi";
43+
src: url("/fonts/Satoshi-Regular.woff2") format("woff2");
44+
@@ -71,6 +98,30 @@
3745
font-display: swap;
3846
}
3947

4048
+@font-face {
41-
+ font-family: 'Satoshi';
42-
+ src: url('/fonts/Satoshi-Medium.woff2') format('woff2');
49+
+ font-family: "Satoshi";
50+
+ src: url("/fonts/Satoshi-Medium.woff2") format("woff2");
4351
+ font-weight: 500;
4452
+ font-style: normal;
4553
+ font-display: swap;
4654
+}
4755
+
4856
+@font-face {
49-
+ font-family: 'Satoshi';
50-
+ src: url('/fonts/Satoshi-Bold.woff2') format('woff2');
57+
+ font-family: "Satoshi";
58+
+ src: url("/fonts/Satoshi-Bold.woff2") format("woff2");
5159
+ font-weight: bold;
5260
+ font-style: normal;
5361
+ font-display: swap;
5462
+}
5563
+
5664
+@font-face {
57-
+ font-family: 'Satoshi';
58-
+ src: url('/fonts/Satoshi-Black.woff2') format('woff2');
65+
+ font-family: "Satoshi";
66+
+ src: url("/fonts/Satoshi-Black.woff2") format("woff2");
5967
+ font-weight: 900;
6068
+ font-style: normal;
6169
+ font-display: swap;
@@ -64,21 +72,26 @@
6472
/* third-party libraries CSS */
6573

6674
.tableCheckbox:checked ~ div span {
67-
@@ -177,4 +220,17 @@
75+
@@ -189,4 +240,22 @@
6876
body {
6977
@apply bg-background text-foreground;
7078
}
71-
+
79+
+
7280
+ /* Global typography styles */
73-
+ h1, h2, h3, h4, h5, h6 {
81+
+ h1,
82+
+ h2,
83+
+ h3,
84+
+ h4,
85+
+ h5,
86+
+ h6 {
7487
+ @apply font-satoshi font-black leading-tight;
7588
+ }
76-
+
89+
+
7790
+ p {
7891
+ @apply font-mono text-base leading-relaxed;
7992
+ }
8093
+}
8194
+
8295
+.navbar-maxwidth-transition {
83-
+ transition: max-width 300ms cubic-bezier(0.4,0,0.2,1);
96+
+ transition: max-width 300ms cubic-bezier(0.4, 0, 0.2, 1);
8497
}

0 commit comments

Comments
 (0)