Skip to content

Commit 4fbae88

Browse files
committed
fix: content changes for getting started page
1 parent 42cb0a5 commit 4fbae88

File tree

3 files changed

+66
-163
lines changed

3 files changed

+66
-163
lines changed

content/100-getting-started/index.mdx

Lines changed: 31 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ title: 'Get Started'
33
metaTitle: 'Get started with Prisma'
44
metaDescription: 'Build data-driven applications with ease using Prisma ORM, add connection pooling or global caching with Prisma Accelerate.'
55
hide_title: true
6-
tocDepth: 1
76
sidebar_position: 0
87
sidebar_class_name: firstTitle
98
pagination_next: 'getting-started/quickstart-sqlite'
@@ -21,79 +20,52 @@ import {
2120
SignalStream,
2221
PrismaPostgres,
2322
SquareLogo,
23+
QuickstartLinkCard
2424
} from '@site/src/components/GettingStarted';
2525

2626

27+
<BoxTitle>Getting started</BoxTitle>
2728

28-
<BorderBox>
29-
30-
<BoxTitle>Get started</BoxTitle>
29+
<List>
3130

32-
Welcome 👋
31+
<BorderBox>
3332

34-
Explore our products that make it easy to build and scale data-driven applications:
33+
[**Prisma ORM**](/orm/overview/introduction/what-is-prisma) is an open-source ORM that provides fast, type-safe access to Postgres, MySQL, SQLite, and more databases, and runs smoothly across Node.js, Bun, and Deno.
3534

36-
[**<Database />Prisma ORM**](/orm/overview/introduction/what-is-prisma) is a next-generation Node.js and TypeScript ORM that unlocks a new level of developer experience when working with databases thanks to its intuitive data model, automated migrations, type-safety & auto-completion.
35+
```terminal
36+
npx prisma init --db
37+
```
38+
</BorderBox >
39+
3740

38-
[**<PrismaPostgres />Prisma Postgres**](/postgres) is a managed PostgreSQL service that gives you an _always-on_ database with _pay-as-you-go_ pricing.
41+
<BorderBox>
3942

40-
[**<Inspect />Prisma Optimize**](/optimize/) helps you analyze queries, generate insights, and provides recommendations to make your database queries faster.
43+
[**Prisma Postgres**](/postgres) is our managed PostgreSQL service with automatic scaling, AI integrations, and a simple API and GUI for database management.
4144

42-
[**<Bolt />Prisma Accelerate**](/accelerate) is a global database cache with scalable connection pooling to make your queries fast.
45+
```terminal
46+
npx create-db
47+
```
48+
</BorderBox >
49+
50+
</List>
4351

44-
</BorderBox>
52+
<br/>
4553

54+
<QuickstartLinkCard
55+
title="Quickstart →"
56+
highlight="#16A394"
57+
link="/getting-started/quickstart-prismaPostgres"
58+
>
4659

47-
## <Database color="#5A67D8" width="21" height="24" /> Prisma ORM
60+
The fastest way to set up **Prisma ORM** with a ready-to-use **Prisma Postgres** database.
4861

49-
Add Prisma ORM to your application in a few minutes to start modeling your data, run schema migrations and query your database.
62+
</QuickstartLinkCard>
5063

51-
### The easiest way to get started with Prisma
64+
## <PrismaPostgres color="#16A394" width="21" height="24" /> Already have your own database?
5265

53-
_Explore all Prisma products at once._
66+
The fastest way to set Prisma ORM up with a ready-to-use database.
5467

55-
<LinkCard
56-
icon="fa-solid fa-rabbit-running"
57-
title="Prisma Starter Template"
58-
desc="Create a new database, model your data, run migrations, and send queries in this comprehensive 5 minute tutorial."
59-
link="/getting-started/quickstart-prismaPostgres"
60-
/>
61-
62-
### Explore quickly with a SQLite database
63-
64-
_These options don't require you to have your own database running._
65-
66-
<Grid>
67-
<LinkCard
68-
icon="fa-solid fa-rabbit-running"
69-
title="Quickstart"
70-
desc="Set up Prisma ORM from scratch with a SQLite database in 5 minutes."
71-
link="/getting-started/quickstart-sqlite"
72-
/>
73-
<LinkCard
74-
icon="fa-brands fa-github"
75-
title="Examples"
76-
desc="Explore our ready-to-run examples with your favorite frameworks and libraries."
77-
link="https://github.com/prisma/prisma-examples/"
78-
/>
79-
</Grid>
80-
81-
### Choose an option to get started with your own database
82-
83-
_Select one of these options if you want to connect Prisma ORM to your own database._
84-
85-
<TabbedContent>
86-
<TabItem value="New database">
87-
<p>
88-
Set up Prisma ORM <b>from scratch</b> with your favorite database and
89-
learn basic workflows like data modeling, querying, and migrations.
90-
</p>
91-
<List>
92-
<SquareLogo
93-
url="/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-prismaPostgres"
94-
image={'/img/technologies/prismaPostgres.svg'}
95-
tech="Prisma Postgres"
96-
/>
68+
<List>
9769
<SquareLogo
9870
url="/getting-started/setup-prisma/start-from-scratch/relational-databases-typescript-postgresql"
9971
image={'/img/technologies/postgresqlsimple.svg'}
@@ -125,91 +97,5 @@ _Select one of these options if you want to connect Prisma ORM to your own datab
12597
image={'/img/technologies/mongodbsimple.svg'}
12698
tech="Mongo DB"
12799
/>
128-
</List>
129-
</TabItem>
130-
<TabItem value="Existing database">
131-
<p>
132-
Get started with Prisma ORM and your <b>existing database</b> by
133-
introspecting your database schema and learn how to query your database.
134-
</p>
135-
<List>
136-
<SquareLogo
137-
url="/getting-started/setup-prisma/add-to-existing-project/relational-databases-typescript-postgresql"
138-
image={'/img/technologies/postgresqlsimple.svg'}
139-
tech="Postgres SQL"
140-
/>
141-
<SquareLogo
142-
url="/getting-started/setup-prisma/add-to-existing-project/relational-databases-typescript-mysql"
143-
image={'/img/technologies/mysqlsimple.svg'}
144-
tech="MySQL"
145-
/>
146-
<SquareLogo
147-
url="/getting-started/setup-prisma/add-to-existing-project/relational-databases-typescript-sqlserver"
148-
image={'/img/technologies/sqlserver.svg'}
149-
tech="SQL Server"
150-
/>
151-
<SquareLogo
152-
url="/getting-started/setup-prisma/add-to-existing-project/relational-databases-typescript-planetscale"
153-
imageDark={'/img/technologies/planetscaledark.svg'}
154-
image={'/img/technologies/planetscale.svg'}
155-
tech="PlanetScale"
156-
/>
157-
<SquareLogo
158-
url="/getting-started/setup-prisma/add-to-existing-project/relational-databases-typescript-cockroachdb"
159-
image={'/img/technologies/cockroachdbdark.svg'}
160-
tech="Cockroach DB"
161-
/>
162-
<SquareLogo
163-
url="/getting-started/setup-prisma/add-to-existing-project/mongodb-typescript-mongodb"
164-
image={'/img/technologies/mongodbsimple.svg'}
165-
tech="Mongo DB"
166-
/>
167-
</List>
168-
</TabItem>
169-
</TabbedContent>
170-
171-
## <Bolt color="#16A394" width="21" height="24" /> Prisma Accelerate
172-
173-
Make your database queries faster by scaling your database connections and caching database results at the edge with Prisma Accelerate.
174-
175-
<Grid>
176-
<LinkCard
177-
icon="fa-solid fa-arrow-right"
178-
title="Get started"
179-
desc="Add Accelerate to your app to use global database caching & connection pooling."
180-
link="/accelerate/getting-started"
181-
/>
182-
<LinkCard
183-
icon="fa-brands fa-github"
184-
title="Examples"
185-
desc="Explore our ready-to-run examples using Accelerate."
186-
link="https://github.com/prisma/prisma-examples?tab=readme-ov-file#prisma-accelerate"
187-
/>
188-
</Grid>
189-
<br/>
190-
<LinkCard
191-
highlight
192-
icon="fa-solid fa-bolt"
193-
title="Speed Test"
194-
desc="Run the speed test to see how Prisma Accelerate can make your app faster."
195-
link="https://accelerate-speed-test.prisma.io/"
196-
/>
197-
198-
## <Inspect color="#16A394" width="27" height="24" /> Prisma Optimize
199-
200-
Make your database queries faster by using the insights and recommendations generated by Prisma Optimize.
201-
202-
<Grid>
203-
<LinkCard
204-
icon="fa-solid fa-arrow-right"
205-
title="Get started"
206-
desc="Add Optimize to your app to gather useful insights and receive recommendations to improve query performance."
207-
link="/optimize/getting-started"
208-
/>
209-
<LinkCard
210-
icon="fa-brands fa-github"
211-
title="Examples"
212-
desc="Explore our ready-to-run examples using Prisma Optimize."
213-
link="https://github.com/prisma/prisma-examples?tab=readme-ov-file#prisma-optimize"
214-
/>
215-
</Grid>
100+
</List>
101+

src/components/GettingStarted/index.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const Grid = ({ children, ...props }) => (
106106
</div>
107107
);
108108

109-
export const LinkCard = ({ icon, title, desc, link, highlight }: any) => {
109+
export const LinkCard = ({ icon, title, desc, link, highlight, }: any) => {
110110
const linkCardRef = useRef(null);
111111
return (
112112
<Link
@@ -123,6 +123,23 @@ export const LinkCard = ({ icon, title, desc, link, highlight }: any) => {
123123
);
124124
};
125125

126+
export const QuickstartLinkCard = ({ icon, title, desc, link, highlight, children }: any) => {
127+
const linkCardRef = useRef(null);
128+
return (
129+
<Link
130+
to={link}
131+
ref={linkCardRef}
132+
className={clsx(styles.linkCardWrapper, highlight && styles.linkCardHighlight)}
133+
>
134+
<div className={styles.title}>
135+
{icon && <Icon icon={icon} btn="left" size="18px" />}
136+
<h2>{title}</h2>
137+
</div>
138+
{children ?? <p>{desc}</p>}
139+
</Link>
140+
);
141+
};
142+
126143
export const Tab = ({ children, ...props }) => (
127144
<div {...props} className={styles.tab}>
128145
{children}

src/pages/index.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function HomepageHowDoISection() {
5454
const hiddenCards = how_do_i.slice(3);
5555

5656
const location = useLocation();
57-
57+
5858
return (
5959
<div className={styles.howDoISection} ref={howRef}>
6060
<Heading as="h3" className={styles.h3}>
@@ -72,7 +72,7 @@ function HomepageHowDoISection() {
7272
{e.tags.map((tag: any) => <Badge variant="primary" key={tag} color="gray" size="sm" label={tag} />)}
7373
</div>}
7474
{e.time && <div className={styles.readTime}>
75-
<Icon size="24px" color="var(--gray-500)" icon="fa-regular fa-clock" btn="left"/>
75+
<Icon size="24px" color="var(--gray-500)" icon="fa-regular fa-clock" btn="left" />
7676
<span>{e.time} min. read</span>
7777
</div>}
7878
</div>}
@@ -89,7 +89,7 @@ function HomepageHowDoISection() {
8989
{e.tags.map((tag: any) => <Badge variant="primary" key={tag} color="gray" size="sm" label={tag} />)}
9090
</div>}
9191
{e.time && <div className={styles.readTime}>
92-
<Icon size="24px" color="var(--gray-500)" icon="fa-regular fa-clock" btn="left"/>
92+
<Icon size="24px" color="var(--gray-500)" icon="fa-regular fa-clock" btn="left" />
9393
<span>{e.time} min. read</span>
9494
</div>}
9595
</div>}
@@ -100,7 +100,7 @@ function HomepageHowDoISection() {
100100
className={clsx(styles.seeMore, seeMore && styles.clicked)}
101101
onClick={() => {
102102
setSeeMore(!seeMore)
103-
howRef.current.scrollIntoView({behavior: "smooth", offset: 80});
103+
howRef.current.scrollIntoView({ behavior: "smooth", offset: 80 });
104104
}}
105105
>
106106
<span>See {seeMore ? `less` : `more`}</span>
@@ -110,7 +110,7 @@ function HomepageHowDoISection() {
110110
);
111111
}
112112

113-
const CommunityIcon = ({icon, link, label}: any) => {
113+
const CommunityIcon = ({ icon, link, label }: any) => {
114114
const [visibleTooltip, setVisibleTooltip] = useState<boolean>(false);
115115
const iconRef = useRef(null);
116116

@@ -161,41 +161,41 @@ function HomepageCommunitySection() {
161161
);
162162
}
163163

164-
const TabBox = ({icon, label, description, list, link}: any) => {
164+
const TabBox = ({ icon, label, description, list, link }: any) => {
165165
const location = useLocation();
166166
return (
167167
<div>
168168
<div className={styles.tabBox}>
169169
<div className={styles.content}>
170170
<div className={styles.heading}>
171-
{icon && <Icon className={styles.leftIcon} btn="left" icon={icon} size='inherit' color='var(--teal-600)' /> }
171+
{icon && <Icon className={styles.leftIcon} btn="left" icon={icon} size='inherit' color='var(--teal-600)' />}
172172
<span>{label}</span>
173173
</div>
174-
<p dangerouslySetInnerHTML={{__html: description}}></p>
174+
<p dangerouslySetInnerHTML={{ __html: description }}></p>
175175
<div className={styles.techGrid}>
176-
{list && list.length && list.map((l: any, idx: number) =>
176+
{list && list.length && list.map((l: any, idx: number) =>
177177
<SquareLogo
178178
className={styles.heroTabs}
179179
url={`${l.url}${location.search}`}
180180
image={l.image}
181181
tech={l.tech}
182-
{... l.imageDark && { imageDark: l.imageDark }}
182+
{...l.imageDark && { imageDark: l.imageDark }}
183183
/>
184184
)}
185185
</div>
186186
</div>
187187
</div>
188188
<Link to={`${link.url}${location.search}`}>
189-
<Icon icon={link.icon} size="inherit" color="inherit" btn="left"/>
189+
<Icon icon={link.icon} size="inherit" color="inherit" btn="left" />
190190
<span>{link.label}</span>
191-
<Icon icon={"fa-regular fa-arrow-right"} size="inherit" color="inherit" btn="right"/>
191+
<Icon icon={"fa-regular fa-arrow-right"} size="inherit" color="inherit" btn="right" />
192192
</Link>
193193
</div>
194194
)
195195
}
196196

197197
function HomepageHeroSection() {
198-
const { colorMode } = useColorMode();
198+
const { colorMode } = useColorMode();
199199
return (
200200
<div className={styles.heroWrapper}>
201201
<div className={styles.hero}>
@@ -216,7 +216,7 @@ function HomepageHeroSection() {
216216
label="Start with an AI prompt →" color="teal"
217217
/> */}
218218
<div className={styles.tabBoxes}>
219-
{tabs && tabs.map((tab: any, idx: number) =>
219+
{tabs && tabs.map((tab: any, idx: number) =>
220220
<TabBox {...tab} key={idx} />
221221
)}
222222
</div>
@@ -241,9 +241,9 @@ function HomepageGetHelpSection() {
241241
<h4>{e.title}</h4>
242242
</div>
243243
<div className={styles.content}>
244-
<p dangerouslySetInnerHTML={{__html: e.description}}/>
244+
<p dangerouslySetInnerHTML={{ __html: e.description }} />
245245
<div className={styles.links}>
246-
{e.links.map((link: any) =>
246+
{e.links.map((link: any) =>
247247
<a href={`${link.link}${location.search}`} className={styles.link}>
248248
<Icon icon={link.icon} size="inherit" btn="left" color="inherit" />
249249
<span>{link.label}</span>
@@ -272,7 +272,7 @@ export default function Home(): JSX.Element {
272272
<HomepageHeroSection />
273273
<HomepageHowDoISection />
274274
<HomepageProductCards />
275-
<HomepageGetHelpSection />
275+
<HomepageGetHelpSection />
276276
<HomepageCommunitySection />
277277
</main>
278278
</Layout>

0 commit comments

Comments
 (0)