Skip to content

Commit 0708bfb

Browse files
Initial commit
0 parents  commit 0708bfb

File tree

96 files changed

+6487
-0
lines changed

Some content is hidden

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

96 files changed

+6487
-0
lines changed

.env.template

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
2+
CLERK_SECRET_KEY=
3+
4+
CLERK_WEBHOOK_SECRET=
5+
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
6+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
7+
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
8+
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
9+
10+
SUPABASE_URL=
11+
SUPABASE_SERVICE_KEY=
12+
13+
DATABASE_URL= # Set this to the Transaction connection pooler string you copied in Step 1
14+
DIRECT_URL= # Set this to the Session connection pooler string you copied in Step 1
15+
16+
UPSTASH_REDIS_REST_URL=
17+
UPSTASH_REDIS_REST_TOKEN=
18+
19+
FRONTEND_URL=
20+
21+
STRIPE_SECRET_KEY=
22+
STRIPE_WEBHOOK_SECRET=
23+
NEXT_PUBLIC_STRIPE_PUBLIC_KEY=
24+
25+
NEXT_PUBLIC_STRIPE_PRICE_ID=

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# local env files
28+
.env*.local
29+
.env
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Michael Shimeles
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.

README.md

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Getting Started
2+
3+
## Prerequisites
4+
- Node.js and yarn/bun installed
5+
- Accounts and API keys for:
6+
- Supabase
7+
- Stripe (if using payments)
8+
- Clerk (if using authentication)
9+
10+
## Setup
11+
12+
1. Clone the repository:
13+
```
14+
git clone <repository-url>
15+
cd <project-directory>
16+
```
17+
18+
2. Install dependencies:
19+
```
20+
yarn
21+
```
22+
23+
3. Set up environment variables:
24+
Create a `.env` file in the root directory with the following variables:
25+
```
26+
SUPABASE_URL=<your-supabase-project-url>
27+
SUPABASE_SERVICE_KEY=<your-supabase-service-key>
28+
29+
# If using Stripe
30+
STRIPE_SECRET_KEY=<your-stripe-secret-key>
31+
NEXT_PUBLIC_STRIPE_PRICE_ID=<your-stripe-price-id>
32+
33+
# If using Clerk
34+
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<your-clerk-publishable-key>
35+
CLERK_SECRET_KEY=<your-clerk-secret-key>
36+
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
37+
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
38+
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
39+
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
40+
```
41+
42+
4. Configure features:
43+
In `config.ts`, set the desired features:
44+
```typescript
45+
const config = {
46+
auth: {
47+
enabled: true, // Set to false if not using Clerk
48+
},
49+
payments: {
50+
enabled: true, // Set to false if not using Stripe
51+
}
52+
};
53+
```
54+
55+
5. Set up the database:
56+
Run Prisma migrations:
57+
```
58+
npx prisma migrate dev
59+
```
60+
61+
6. Start the development server:
62+
```
63+
yarn dev
64+
```
65+
66+
7. Open your browser and navigate to `http://localhost:3000` to see your application running.
67+
68+
## Additional Configuration
69+
70+
- Webhooks: Set up webhooks for Clerk (if using auth) at `/api/auth/webhook` and for Stripe (if using payments) at `/api/payments/webhook`.
71+
- Customize the landing page, dashboard, and other components as needed.
72+
- Modify the Prisma schema in `prisma/schema.prisma` if you need to change the database structure.
73+
74+
## Important Security Notes
75+
76+
- Enable Row Level Security (RLS) in your Supabase project to ensure data protection at the database level.
77+
- Always make Supabase calls on the server-side (in API routes or server components) to keep your service key secure.
78+
79+
## Learn More
80+
81+
Refer to the documentation of the individual technologies used in this project for more detailed information:
82+
- [Next.js Documentation](https://nextjs.org/docs)
83+
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
84+
- [Supabase Documentation](https://supabase.io/docs)
85+
- [Prisma Documentation](https://www.prisma.io/docs)
86+
- [Clerk Documentation](https://clerk.dev/docs) (if using auth)
87+
- [Stripe Documentation](https://stripe.com/docs) (if using payments)
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"use client"
2+
import PageWrapper from "@/components/wrapper/page-wrapper";
3+
import config from "@/config";
4+
import { SignIn } from "@clerk/nextjs";
5+
import { useRouter } from "next/navigation";
6+
7+
export default function SignInPage() {
8+
const router = useRouter()
9+
10+
if (!config?.auth?.enabled) {
11+
router.back()
12+
}
13+
14+
return (
15+
<PageWrapper >
16+
<div className="flex min-w-screen justify-center my-[5rem]">
17+
<SignIn fallbackRedirectUrl="/" signUpFallbackRedirectUrl="/dashboard" />
18+
</div>
19+
</PageWrapper>
20+
);
21+
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"use client"
2+
import PageWrapper from "@/components/wrapper/page-wrapper";
3+
import config from "@/config";
4+
import { SignUp } from "@clerk/nextjs";
5+
import { useRouter } from "next/navigation";
6+
7+
export default function SignUpPage() {
8+
const router = useRouter()
9+
10+
if (!config?.auth?.enabled) {
11+
router.back()
12+
}
13+
14+
return (
15+
<PageWrapper >
16+
<div className="flex min-w-screen justify-center my-[5rem]">
17+
<SignUp fallbackRedirectUrl="/" signInFallbackRedirectUrl="/dashboard" />
18+
</div>
19+
</PageWrapper>
20+
);
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"use client"
2+
import PageWrapper from "@/components/wrapper/page-wrapper";
3+
import config from "@/config";
4+
import { UserProfile } from "@clerk/nextjs";
5+
import { useRouter } from "next/navigation";
6+
7+
const UserProfilePage = () => {
8+
const router = useRouter()
9+
10+
if (!config?.auth?.enabled) {
11+
router.back()
12+
}
13+
return (
14+
<PageWrapper >
15+
<div className="h-full flex items-center justify-center p-9">
16+
{config?.auth?.enabled && <UserProfile path="/user-profile" routing="path" />}
17+
</div>
18+
</PageWrapper>
19+
)
20+
}
21+
22+
23+
export default UserProfilePage;
+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import { Button } from '@/components/ui/button'
2+
import { Metadata } from 'next'
3+
import Link from 'next/link'
4+
import PageWrapper from "@/components/wrapper/page-wrapper";
5+
import { VideoPlayer } from '@/components/video-player';
6+
7+
export const metadata: Metadata = {
8+
metadataBase: new URL("https://starter.rasmic.xyz"),
9+
keywords: [''],
10+
title: 'Marketing page',
11+
openGraph: {
12+
description: 'Put description of the page.',
13+
images: ['']
14+
},
15+
twitter: {
16+
card: 'summary_large_image',
17+
title: 'Marketing page',
18+
description: 'Put description of the page.',
19+
siteId: "",
20+
creator: "@rasmickyy",
21+
creatorId: "",
22+
images: [''],
23+
},
24+
}
25+
26+
27+
export default async function MarketingPage() {
28+
29+
return (
30+
<PageWrapper>
31+
<div className='flex flex-col min-h-screen items-center mt-[2.5rem] p-3 w-full'>
32+
<h1 className="scroll-m-20 max-w-[600px] text-5xl font-bold tracking-tight text-center">
33+
Example Marketing Page with Video & CTA
34+
</h1>
35+
<p className="mx-auto max-w-[600px] text-gray-500 md:text-lg text-center mt-2 dark:text-gray-400">
36+
Use this static page to have an explainer video with CTA and some copy. Great for marketing your product and getting sales.
37+
</p>
38+
<div className='flex gap-2 mt-2'>
39+
<Link href="/dashboard" className="mt-2">
40+
<Button size="lg">Get Started</Button>
41+
</Link>
42+
<Link href="/dashboard" className="mt-2">
43+
<Button size="lg" variant="outline">Get Started</Button>
44+
</Link>
45+
</div>
46+
<div className='mb-3 mt-[1.5rem] max-w-[900px] w-full'>
47+
<VideoPlayer videoSrc="https://utfs.io/f/08b0a37f-afd7-4623-b5cc-e85184528fce-1f02.mp4" />
48+
</div>
49+
<div className='flex flex-col min-h-screen max-w-[900px] items-center mb-[2rem]'>
50+
<article className="w-full mx-auto pb-8">
51+
<h1 className="text-3xl lg:text-4xl font-bold mb-6">Lorem ipsum dolor sit amet</h1>
52+
53+
<section className="mb-8">
54+
<p className="text-md leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
55+
</section>
56+
57+
<section className="mb-8">
58+
<h2 className="mt-10 scroll-m-20 border-b pb-2 mb-3 text-3xl font-semibold tracking-tight transition-colors first:mt-0">Lorem ipsum</h2>
59+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
60+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
61+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
62+
</section>
63+
64+
<section className="mb-8">
65+
<h2 className="mt-10 scroll-m-20 border-b pb-2 mb-3 text-3xl font-semibold tracking-tight transition-colors first:mt-0">Lorem ipsum</h2>
66+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
67+
<ol className="flex flex-col gap-1 list-decimal ml-8 mb-4">
68+
<li className="mb-2"><strong>Lorem ipsum dolor sit amet:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
69+
<li className="mb-2"><strong>Lorem ipsum dolor sit amet:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
70+
<li className="mb-2"><strong>Lorem ipsum dolor sit amet:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
71+
</ol>
72+
</section>
73+
74+
<section className="mb-8">
75+
<h2 className="mt-10 scroll-m-20 border-b pb-2 mb-3 text-3xl font-semibold tracking-tight transition-colors first:mt-0">Lorem ipsum</h2>
76+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
77+
<ul className=" flex flex-col gap-1 list-disc ml-8 mb-4">
78+
<li className="mb-2"><strong>Lorem ipsum dolor sit amet:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
79+
<li className="mb-2"><strong>Lorem ipsum dolor sit amet:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
80+
<li className="mb-2"><strong>Lorem ipsum dolor sit amet:</strong> Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
81+
</ul>
82+
</section>
83+
84+
85+
<section className="mb-8">
86+
<h2 className="mt-10 scroll-m-20 border-b pb-2 mb-3 text-3xl font-semibold tracking-tight transition-colors first:mt-0">Lorem ipsum</h2>
87+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
88+
<p className="text-md mb-5 leading-relaxed">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
89+
</section>
90+
</article>
91+
</div>
92+
93+
</div>
94+
</PageWrapper>
95+
)
96+
}

0 commit comments

Comments
 (0)