Skip to content

Commit 131c399

Browse files
committed
Remove service-account.json from repository and add to .gitignore
1 parent ef0df0e commit 131c399

17 files changed

Lines changed: 283 additions & 58 deletions

File tree

.firebaserc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
{
22
"projects": {
33
"default": "botcodes-1cdc0"
4+
},
5+
"targets": {
6+
"botcodes-1cdc0": {
7+
"hosting": {
8+
"web": [
9+
"onlook"
10+
]
11+
}
12+
}
413
}
514
}

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,7 @@ yarn.lock
4343
.env.test.local
4444
.env.production.local
4545

46-
mise.toml
46+
mise.toml
47+
48+
# Ignore Google Cloud credentials
49+
service-account.json

apps/web/client/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# ------------- Required Keys -------------
22

3+
# Firebase - Enables our backend such as database and auth
4+
NEXT_PUBLIC_FIREBASE_API_KEY="<Your Firebase API Key>"
5+
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="<Your Firebase Auth Domain>"
6+
NEXT_PUBLIC_FIREBASE_PROJECT_ID="<Your Firebase Project ID>"
7+
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="<Your Firebase Storage Bucket>"
8+
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="<Your Firebase Messaging Sender ID>"
9+
NEXT_PUBLIC_FIREBASE_APP_ID="<Your Firebase App ID>"
10+
311
# Supabase - Enables our backend such as database and auth
412
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
513
NEXT_PUBLIC_SUPABASE_ANON_KEY="<Fill in from content after running supabase start>"

apps/web/client/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@
9393
"use-resize-observer": "^9.1.0",
9494
"uuid": "^11.1.0",
9595
"webfontloader": "^1.6.28",
96-
"zod": "^3.24.3"
96+
"zod": "^3.24.3",
97+
"firebase": "^10.12.2",
98+
"@hookform/resolvers": "^3.9.0",
99+
"cmdk": "^1.0.0",
100+
"geist": "^1.3.1",
101+
"i18next": "^23.12.2"
97102
},
98103
"devDependencies": {
99104
"@types/culori": "^4.0.0",

apps/web/client/src/app/_components/hero/index.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export function Hero() {
2323
transition={{ duration: 0.6, ease: "easeOut" }}
2424
style={{ willChange: "opacity, filter", transform: "translateZ(0)" }}
2525
>
26-
Make your<br />
27-
<span className="font-light">designs </span>
28-
<span className={`italic font-normal ${vujahdayScript.className} text-[4.75rem] ml-1 leading-[1.0]`}>real</span>
26+
Analyze your<br />
27+
<span className="font-light">golf </span>
28+
<span className={`italic font-normal ${vujahdayScript.className} text-[4.75rem] ml-1 leading-[1.0]`}>swing</span>
2929
</motion.h1>
3030
<motion.p
3131
className="text-lg text-foreground-secondary max-w-xl text-center mt-2"
@@ -34,9 +34,9 @@ export function Hero() {
3434
transition={{ duration: 0.6, delay: 0.15, ease: "easeOut" }}
3535
style={{ willChange: "opacity, filter", transform: "translateZ(0)" }}
3636
>
37-
Onlook is a next-generation visual code editor<br />
37+
botcodes.com is a next-generation visual code editor<br />
3838
that lets designers and product managers craft<br />
39-
web experiences with AI
39+
web experiences with AI, powered by Onlook
4040
</motion.p>
4141
<HighDemand isMounted={isMounted} />
4242
<CreateError />
@@ -59,11 +59,11 @@ export function Hero() {
5959
transition={{ duration: 0.6, delay: 0.45, ease: "easeOut" }}
6060
style={{ willChange: "opacity, filter", transform: "translateZ(0)" }}
6161
>
62-
No Credit Card Required &bull; Get a Site in Seconds
62+
No Credit Card Required Get an Analysis in Seconds
6363
</motion.div>
6464
</div>
6565
<div className="sm:hidden text-balance flex flex-col gap-4 items-center relative z-20 px-10">
66-
Onlook isnt ready for Mobile – Please open on a larger screen
66+
botcodes.com isn't ready for Mobile – Please open on a larger screen
6767
</div>
6868
</div>
6969
);

apps/web/client/src/app/_components/landing-page/contributor-section.tsx

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client';
22

3+
import { useMediaQuery } from '@onlook/ui/hooks';
34
import { Icons } from '@onlook/ui/icons/index';
45
import React, { useEffect, useState } from 'react';
56

@@ -11,20 +12,10 @@ interface Contributor {
1112

1213
// Floating Circles: two concentric rings
1314
const FloatingRings = () => {
14-
const [isMd, setIsMd] = React.useState(
15-
typeof window !== 'undefined' ? window.matchMedia('(min-width: 768px)').matches : false
16-
);
15+
const isMd = useMediaQuery('(min-width: 768px)');
1716
const [contributors, setContributors] = useState<Contributor[]>([]);
1817
const [isLoading, setIsLoading] = useState(true);
1918

20-
React.useEffect(() => {
21-
const media = window.matchMedia('(min-width: 768px)');
22-
const listener = () => setIsMd(media.matches);
23-
media.addEventListener('change', listener);
24-
setIsMd(media.matches);
25-
return () => media.removeEventListener('change', listener);
26-
}, []);
27-
2819
useEffect(() => {
2920
const fetchContributors = async () => {
3021
try {
@@ -74,10 +65,10 @@ const FloatingRings = () => {
7465
key={`inner-${i}`}
7566
className="absolute rounded-full bg-white/20 border border-foreground-primary/40 border-[0.5px] shadow-lg overflow-hidden"
7667
style={{
77-
width: 56,
78-
height: 56,
79-
left: x - 28,
80-
top: y - 28,
68+
width: '56px',
69+
height: '56px',
70+
left: `${x - 28}px`,
71+
top: `${y - 28}px`,
8172
animation: 'counter-spin 280s linear infinite',
8273
transformOrigin: 'center center'
8374
}}
@@ -107,10 +98,10 @@ const FloatingRings = () => {
10798
key={`outer-${i}`}
10899
className="absolute rounded-full bg-white/20 border border-foreground-primary/40 border-[0.5px] shadow-lg overflow-hidden"
109100
style={{
110-
width: 56,
111-
height: 56,
112-
left: x - 28,
113-
top: y - 28,
101+
width: '56px',
102+
height: '56px',
103+
left: `${x - 28}px`,
104+
top: `${y - 28}px`,
114105
animation: 'counter-spin-reverse 290s linear infinite',
115106
transformOrigin: 'center center'
116107
}}
@@ -207,16 +198,19 @@ export function ContributorSection({
207198
}
208199
`}</style>
209200
<h2 className="text-foreground-primary text-3xl md:text-4xl font-light text-center mb-2">
210-
Supported by You &<br />
211-
{isLoading ? '...' : starCount} other builders
201+
Powered by Onlook
212202
</h2>
213-
<p className="text-foreground-secondary text-regular text-center mb-8 max-w-xl">Join our mission and be a part of changing<br />the way people craft software</p>
203+
<p className="text-foreground-secondary text-regular text-center mb-8 max-w-xl">
204+
Join our mission and be a part of changing
205+
<br />
206+
the way people craft software
207+
</p>
214208
<div className="flex gap-4 flex-col md:flex-row w-full justify-center items-center">
215209
<button
216210
onClick={() => window.open(githubLink, '_blank')}
217211
className="bg-foreground-primary text-background-primary text-regularPlus rounded-lg px-6 py-3 flex items-center gap-2 shadow hover:bg-foreground-primary/80 transition cursor-pointer"
218212
>
219-
Contribute to Onlook
213+
Contribute to Botcodes
220214
<Icons.GitHubLogo className="w-4.5 h-4.5" />
221215
</button>
222216
<button

apps/web/client/src/app/login/actions.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import {
44
getRedirectResult,
55
GoogleAuthProvider,
6+
GithubAuthProvider,
67
signInWithEmailAndPassword,
78
signInWithRedirect,
89
} from 'firebase/auth';
@@ -16,16 +17,19 @@ import { Routes } from '@/utils/constants';
1617

1718
export async function login(provider: SignInMethod) {
1819
const origin = (await headers()).get('origin');
19-
const googleProvider = new GoogleAuthProvider();
20-
21-
// We can add more providers here based on the `provider` argument
20+
21+
let authProvider;
2222
switch (provider) {
2323
case 'google':
24-
await signInWithRedirect(auth, googleProvider);
24+
authProvider = new GoogleAuthProvider();
25+
break;
26+
case 'github':
27+
authProvider = new GithubAuthProvider();
2528
break;
2629
default:
2730
throw new Error(`Provider ${provider} not supported`);
2831
}
32+
await signInWithRedirect(auth, authProvider);
2933
}
3034

3135
export async function handleRedirect() {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { initializeApp, getApps, getApp } from "firebase/app";
2+
import { getAuth } from "firebase/auth";
3+
import { getFirestore } from "firebase/firestore";
4+
5+
const firebaseConfig = {
6+
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
7+
authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
8+
projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
9+
storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,
10+
messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
11+
appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID,
12+
};
13+
14+
// Initialize Firebase
15+
const app = !getApps().length ? initializeApp(firebaseConfig) : getApp();
16+
const auth = getAuth(app);
17+
const firestore = getFirestore(app);
18+
19+
export { app, auth, firestore };

0 commit comments

Comments
 (0)