forked from keystonejs/keystone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfor-developers.tsx
529 lines (515 loc) · 19.9 KB
/
for-developers.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
/** @jsx jsx */
import { jsx } from '@emotion/react';
import Image from 'next/image';
import Link from 'next/link';
import { useMediaQuery } from '../lib/media';
import { IntroWrapper, IntroHeading, IntroLead } from '../components/content/Intro';
import { CommunityCta } from '../components/content/CommunityCta';
import { FrontEndLogos } from '../components/icons/FrontEndLogos';
import { Highlight } from '../components/primitives/Highlight';
import { Relational } from '../components/icons/Relational';
import { TweetBox } from '../components/content/TweetBox';
import { MWrapper } from '../components/content/MWrapper';
import { Typescript } from '../components/icons/Typescript';
import { Section, SideBySideSection } from '../components/content/Section';
import { CodeBox } from '../components/content/CodeBox';
import { Button } from '../components/primitives/Button';
import { EndCta } from '../components/content/EndCta';
import { Postgres } from '../components/icons/Postgres';
import { Emoji } from '../components/primitives/Emoji';
import { GraphQl } from '../components/icons/GraphQl';
import { Type } from '../components/primitives/Type';
import { ArrowR } from '../components/icons/ArrowR';
import { Nextjs } from '../components/icons/Nextjs';
import { Shield } from '../components/icons/Shield';
import { Prisma } from '../components/icons/Prisma';
import { Pill } from '../components/content/Pill';
import { Tick } from '../components/icons/Tick';
import { Cli } from '../components/icons/Cli';
import { Page } from '../components/Page';
import editorStorytelling from '../public/assets/editor-storytelling.png';
import richTextEditor from '../public/assets/rich-text-editor.png';
export default function ForDevelopers() {
const mq = useMediaQuery();
return (
<Page
title={'KeystoneJS for Developers'}
description={
'How the Keystone developer experience gives you the power to design APIs on the fly, build custom editing experiences, and deliver content to any frontend framework. All in version controllable code.'
}
>
<MWrapper>
<Pill grad="grad3">Keystone for developers</Pill>
<IntroWrapper>
<IntroHeading>
The <Highlight look="grad3">ideal backend </Highlight> for your favourite frontend
</IntroHeading>
<IntroLead>
Build sophisticated experiences with a framework that saves time and won't lock you in.
Design APIs on the fly, give editors what they need, and ship to any frontend you like.
All in version controllable code.
</IntroLead>
</IntroWrapper>
<div
css={mq({
display: ['grid', 'inline-grid'],
gridTemplateColumns: ['1fr', 'auto 1fr'],
alignItems: 'stretch',
gap: '1rem',
marginTop: '2.5rem',
})}
>
<CodeBox code="yarn create keystone-app" />
<Button
as="a"
href="/docs"
look="soft"
size="large"
shadow
css={mq({ height: ['3.125rem !important', 'auto !important'] })}
>
Read the docs <ArrowR />
</Button>
<FrontEndLogos
css={mq({
color: 'var(--muted)',
// opacity: 0.75,
maxWidth: '48.125rem',
marginTop: '2rem',
gridColumn: ['1', '1 / 3'],
})}
/>
</div>
<Section>
<Type as="h2" look="heading36">
Built with the best of the modern web
</Type>
<ul
css={mq({
display: 'grid',
gridTemplateColumns: ['1fr', '1fr 1fr', '1fr 1fr 1fr 1fr'],
gap: '2rem',
listStyle: 'none',
margin: '2rem 0 0 0',
padding: 0,
'& svg': {
height: '4.125rem',
color: 'var(--muted)',
},
'& li': {
maxWidth: '13.75rem',
margin: '0 auto',
},
})}
>
<li>
<Prisma />
<Type as="h3" look="body18bold" margin="1rem 0">
Schema
</Type>
<Type as="p" look="body18" color="var(--muted)">
With Prisma.io
<br />
100% JavaScript
<br />
Version controllable
</Type>
</li>
<li>
<GraphQl />
<Type as="h3" look="body18bold" margin="1rem 0">
GraphQL API
</Type>
<Type as="p" look="body18" color="var(--muted)">
With Apollo Server
<br />
Flexible & Extensible
</Type>
</li>
<li>
<Nextjs />
<Type as="h3" look="body18bold" margin="1rem 0">
Admin UI
</Type>
<Type as="p" look="body18" color="var(--muted)">
With Next.js
<br />
Intuitive & configurable
</Type>
</li>
<li>
<Postgres />
<Type as="h3" look="body18bold" margin="1rem 0">
Database & Assets
</Type>
<Type as="p" look="body18" color="var(--muted)">
Postgres & SQLite
<br />
Cloud & self-hosted
</Type>
</li>
</ul>
</Section>
<SideBySideSection reverse>
<div>
<Type as="h2" look="heading48">
The APIs you want. <Highlight look="grad3">Because you made them.</Highlight>
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
You can’t boilerplate your way towards a great user experience. That’s why Keystone
doesn’t limit what you can put in an API. It’s flexible by design: tell Keystone what
you want in your schema and get the matching APIs you need in return.
</Type>
<Type as="p" look="body18">
<Link href="/docs/apis/schema">
<a>Schema API reference →</a>
</Link>
</Type>
</div>
<TweetBox user="jvredbrown" img="/assets/jvredbrown.jpg" grad="grad3">
Working with @KeystoneJS is such a pleasant experience. After hand rolling a few GraphQL
APIs this is lightning fast!
</TweetBox>
</SideBySideSection>
<SideBySideSection>
<div>
<Type as="h2" look="heading48">
A content studio your storytellers will{' '}
<Highlight look="grad3">rally around.</Highlight>
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
Give your editors what they need without changing tools. Keystone has a highly
configurable CMS built in. Program with JavaScript, store changes in version control,
and integrate with your preferred CI tools.
</Type>
<Type as="p" look="body18">
<Link href="/for-content-management">
<a>Keystone for content management →</a>
</Link>
</Type>
</div>
<div>
<Image
src={editorStorytelling}
alt="Overlay of Admin UI field panes showing fields for a Post content type. Promotional text overlays show: extensive field options; flexible relationships; powerful sort & filtering."
width={1975}
height={1572}
/>
</div>
</SideBySideSection>
<SideBySideSection reverse>
<div>
<Type as="h2" look="heading48">
A Rich Text editor for the{' '}
<Highlight look="grad3">design system generation.</Highlight>
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
Keystone’s Document field is the first of its kind: intuitive, customisable, and works
with your design system components. Make it as lean or full-featured as you like. It’s
up to you.
</Type>
<ul
css={{
listStyle: 'none',
margin: '1rem 0',
padding: 0,
'& li': {
display: 'flex',
alignItems: 'center',
},
'& svg': {
height: '1.25rem',
marginRight: '0.75rem',
},
}}
>
<li>
<Tick grad="grad3" />
<Type look="body18" color="var(--muted)">
Configurable interface
</Type>
</li>
<li>
<Tick grad="grad3" />
<Type look="body18" color="var(--muted)">
BYO custom React components
</Type>
</li>
<li>
<Tick grad="grad3" />
<Type look="body18" color="var(--muted)">
Structured JSON output
</Type>
</li>
</ul>
<Type as="p" look="body18">
<Link href="/docs/guides/document-field-demo">
<a>Try the demo →</a>
</Link>
</Type>
</div>
<div>
<Image
src={richTextEditor}
alt="Keystone Document field containing Rich Text content including Twitter embed component, and syntax highlighted code block."
width={1901}
height={1629}
/>
</div>
</SideBySideSection>
<Section>
<Type as="h2" look="heading48" css={{ maxWidth: '41.875rem' }}>
The features you need to{' '}
<Highlight look="grad3">start fast and scale sustainably.</Highlight>
</Type>
<ul
css={mq({
display: 'grid',
gridTemplateColumns: ['1fr', '1fr 1fr', '1fr 1fr 1fr 1fr'],
gap: '2rem',
listStyle: 'none',
margin: '3rem 0 0 0',
padding: 0,
'& svg': {
height: '3rem',
color: 'var(--muted)',
},
'& li': {
maxWidth: '13.75rem',
margin: '0 auto',
},
})}
>
<li>
<Shield grad="grad3" />
<Type as="h3" look="body18bold" margin="1rem 0">
Custom roles & access
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
Build your own roles-based access controls. No limits on the amount and kind of
roles you can configure.
</Type>
<Type as="p" look="body18">
<Link href="/docs/apis/access-control">
<a>Access control API →</a>
</Link>
</Type>
</li>
<li>
<Relational grad="grad3" />
<Type as="h3" look="body18bold" margin="1rem 0">
Flexible relationships
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
One to one. One to many. Many to many. Self-referential. It's all there.
</Type>
<Type as="p" look="body18">
<Link href="/docs/guides/relationships">
<a>Relationships guide →</a>
</Link>
</Type>
</li>
<li>
<Cli grad="grad3" />
<Type as="h3" look="body18bold" margin="1rem 0">
Intuitive CLI
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
Kick start new projects and try examples on for size from the comfort of your
terminal.
</Type>
<Type as="p" look="body18">
<Link href="/docs/guides/cli">
<a>CLI guide →</a>
</Link>
</Type>
</li>
<li>
<Typescript grad="grad3" />
<Type as="h3" look="body18bold" margin="1rem 0">
100% Typescript
</Type>
<Type as="p" look="body18" color="var(--muted)">
Ship fewer bugs with a statically typed workflow. Get Keystone type definitions as
you write.
</Type>
</li>
</ul>
</Section>
<Section>
<Type as="h2" look="heading30">
Start learning today
</Type>
<Type as="h3" look="heading20bold" margin="1.5rem 0 1rem 0">
Keystone foundations
</Type>
<ul
css={{
listStyle: 'none',
margin: 0,
padding: 0,
display: 'flex',
gap: '1rem',
flexWrap: 'wrap',
}}
>
<li>
<Button as="a" href="/docs" look="soft">
Docs <ArrowR />
</Button>
</li>
<li>
<Button
as="a"
href="/docs/walkthroughs/getting-started-with-create-keystone-app"
look="soft"
>
Getting started <ArrowR />
</Button>
</li>
<li>
<Button as="a" href="/docs/apis" look="soft">
API reference <ArrowR />
</Button>
</li>
</ul>
<Type as="h3" look="heading20bold" margin="2rem 0 1rem 0">
Best practice examples
</Type>
<ul
css={{
listStyle: 'none',
margin: '1rem 0 0 0',
padding: 0,
display: 'flex',
gap: '1rem',
flexWrap: 'wrap',
}}
>
<li>
<Button
as="a"
href="https://github.com/keystonejs/keystone/tree/master/examples/blog"
target="_blank"
rel="noopener noreferrer"
look="soft"
>
Blog <ArrowR />
</Button>
</li>
<li>
<Button
as="a"
href="https://github.com/keystonejs/keystone/tree/master/examples/task-manager"
target="_blank"
rel="noopener noreferrer"
look="soft"
>
Task Manager app <ArrowR />
</Button>
</li>
<li>
<Button
as="a"
href="https://github.com/keystonejs/keystone/tree/master/examples/default-values"
target="_blank"
rel="noopener noreferrer"
look="soft"
>
Default field values <ArrowR />
</Button>
</li>
<li>
<Button
as="a"
href="https://github.com/keystonejs/keystone/tree/master/examples/extend-graphql-schema"
target="_blank"
rel="noopener noreferrer"
look="soft"
>
Extend GraphQL schema <ArrowR />
</Button>
</li>
</ul>
</Section>
<CommunityCta />
<Section>
<Type as="h2" look="heading48">
Don’t just take <Highlight look="grad3">our word for it.</Highlight>
</Type>
<Type as="p" look="body18" color="var(--muted)" margin="1rem 0">
People on the internet say some really nice things about KeystoneJS
</Type>
<div
css={mq({
display: 'grid',
gridTemplateColumns: ['1fr', '1fr 1fr 1fr'],
gap: ['1rem', '2rem'],
marginTop: '2.5rem',
alignItems: 'baseline',
gridTemplateRows: 'masonry', // experimental and hopefully supported soon
})}
>
<TweetBox user="nemeo" img="/assets/benoit-richert.jpg" grad="grad3">
How good is Keystone support! The answers are fast, thought through, technical when
needed, and always gentle... Kudos to the Keystone team, thank you very much!{' '}
<Emoji symbol="😊" alt="Blush" />
</TweetBox>
<TweetBox user="wesbos" img="/assets/wesbos-square.jpg" grad="grad3">
I love how Keystone’s access control lets me declare every single Create, Read,
Update, and Delete operation at both the <strong>model</strong> and{' '}
<strong>field</strong> level. It’s my favorite way of implementing Auth.
</TweetBox>
<TweetBox user="flexdinesh" img="/assets/flexdinesh.jpg" grad="grad3">
Working with Keystone is a very satisfying experience. I wrapped up 50% of my app’s
schema, API and seed data in a day <Emoji symbol="😁" alt="Happy" /> The dev
experience feels too good to be true <Emoji symbol="✨" alt="Sparkle" />{' '}
<Emoji symbol="🚀" alt="Rocket ship" />
</TweetBox>
<TweetBox user="divslingerx" img="/assets/divslingerx.jpg" grad="grad3">
<a href="https://twitter.com/keystonejs" target="_blank" rel="noopener noreferrer">
@KeystoneJS
</a>{' '}
is almost too good to be open source. I can’t stress enough how awesome the dev
experience is. This is what I wish WordPress was.
</TweetBox>
<TweetBox user="_kud" img="/assets/_kud.jpg" grad="grad3">
I think I'm in love. Keystone‘s just what I needed: a dashboard & GraphQL API that
works like a charm. As a frontend dev with skills in node and elastic search, Keystone
+ GraphQL just feels so right to me <Emoji symbol="❤️️" alt="Love" />
</TweetBox>
<TweetBox user="simonswiss" img="/assets/simonswiss.jpg" grad="grad3">
As someone who lives on the frontend, I love how Keystone lets me define content
models and gives me the backend I need. I get a sweet GraphQL API, and can stay
focused on building the UI <Emoji symbol="😍" alt="Love" />
</TweetBox>
<TweetBox user="mxstbr" img="/assets/mxstbr.jpg" grad="grad3">
The new{' '}
<a href="https://twitter.com/keystonejs" target="_blank" rel="noopener noreferrer">
@KeystoneJS
</a>{' '}
rich text editor has incredible inline React component support, including editing
props and everything!
</TweetBox>
<TweetBox user="mattiloh" img="/assets/mattiloh.jpg" grad="grad3">
Keystone‘s new customisable Document field is really powerful and quite a unique
selling proposition. Great job team Keystone <Emoji symbol="👏🏼" alt="Hand clapping" />
</TweetBox>
<TweetBox user="BenAPatton" img="/assets/benapatton.jpg" grad="grad3">
My mind is being blown today! Combining{' '}
<a href="https://twitter.com/keystonejs" target="_blank" rel="noopener noreferrer">
@KeystoneJS
</a>{' '}
with{' '}
<a href="https://twitter.com/supabase_io" target="_blank" rel="noopener noreferrer">
@supabase_io
</a>{' '}
and the experience is just magical.
</TweetBox>
</div>
</Section>
<EndCta grad="grad3" />
</MWrapper>
</Page>
);
}