Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 217dce4

Browse files
committed
intro page edits and link fixes
1 parent 08edead commit 217dce4

File tree

1 file changed

+58
-31
lines changed

1 file changed

+58
-31
lines changed

src/pages/index.mdx

Lines changed: 58 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ export const disableEditGithub = true
1414

1515
---
1616

17-
Nitric is a cloud framework with common resources like APIs, websockets, databases, queues, topics, buckets, and more.
17+
Nitric is a declarative cloud framework with common resources like APIs, websockets, databases, queues, topics, buckets, and more.
1818

19-
However, Nitric is unique - it doesn't just deploy the resources, it helps you interact with them. It also makes them pluggable, so you can swap services or even whole clouds without changing your code.
19+
However, Nitric doesn't just deploy the resources, it helps you interact with them. It also makes them pluggable, so you can swap services or even whole clouds without changing your code.
2020

2121
It's what's missing between applications and infrastructure automation.
2222

2323
Oh, and it supports basically any language, like JavaScript, TypeScript, Python, Go, you name it.
2424

2525
<div className="">
26-
<Libraries minimal />
26+
<Libraries minimal />
2727
</div>
2828

29+
If you're familiar Nitric already, you might want to jump to the [Installation](/getting-started/installation), [Guides](/guides) or [Resources](/apis) sections. Otherwise, keep reading to learn more about Nitric.
30+
2931
---
3032

3133
## Services
@@ -35,17 +37,17 @@ Services are the heart of Nitric apps, they're the entrypoints to your code. The
3537
```yaml {{ label:"nitric.yaml" }}
3638
name: example
3739
services:
38-
- match: services/*.ts
39-
start: npm run dev:services $SERVICE_PATH
40+
- match: services/*.ts
41+
start: npm run dev:services $SERVICE_PATH
4042
```
4143
42-
You might have one service that handles everything, or a service for each route. It's up to you.
44+
You might have one service that handles everything, or a service for each route. It's up to you. Every matched services becomes a container, so you can scale them independently.
4345
4446
---
4547
4648
## Resources
4749
48-
Resources are the building blocks of your apps. They're the databases, queues, buckets, etc. that your services interact with. If you want a resource, you just ask for it.
50+
Resources are the building blocks of your apps. They're the databases, queues, buckets, etc. that your services interact with. To request a resource, import the resource type and create one with a name.
4951
5052
<CodeGroup>
5153
@@ -94,21 +96,23 @@ void main() {
9496

9597
</CodeGroup>
9698

97-
Nitric collects everything your services request. When you deploy, the deployment plugin you choose creates the resources and services, then links it all together.
99+
Nitric collects everything your services request. When you deploy, the deployment plugin you choose creates the resources and services, then links them all together.
98100

99101
<Note>
100-
That probably sounds like magic, but it's more like a compiler for Infrastructure-as-Code - you can read about it in the [Concepts](/docs/concepts) section.
102+
That might sound like magic, but it's more like a compiler for
103+
Infrastructure-as-Code - you can read about it in the [Concepts](/concepts)
104+
section.
101105
</Note>
102106

103107
---
104108

105-
## Providers
109+
## Deployment Plugins (Providers)
106110

107-
Nitric is designed to be independent of any platform, so you can run your apps anywhere. You can deploy to AWS, Azure, GCP, or even your own Kubernetes cluster. You can even deploy to multiple clouds at once.
111+
Nitric is designed to be independent of any platform, so you can run your apps anywhere. You can deploy to AWS, Azure, GCP, your own Kubernetes cluster or a single server. You could even deploy to multiple clouds at once.
108112

109-
Seriously, is there really a difference between a bucket on AWS and a bucket on Azure? We don't think so. So why should the code be different?
113+
Are the differences between a bucket on AWS and a bucket on Azure important to most apps? We don't think so. So why should the code be different?
110114

111-
Nitric abstracts away the differences, so you can focus on your app. The part that makes that possible is a plugin, we call a **Provider**.
115+
Nitric abstracts away API layer differences, so you can focus on your app. The part that makes that possible is a plugin, we call a **Provider**.
112116

113117
<CodeGroup>
114118

@@ -144,19 +148,19 @@ provider: custom/[email protected]
144148
145149
</CodeGroup>
146150
147-
We have a few providers built-in with IaC from Pulumi or Terraform, but you can build your own with any tools you prefer and to anywhere you want.
151+
We have several providers built-in with IaC from [Pulumi](https://www.pulumi.com/) or [Terraform](https://www.terraform.io/), but you can build your own with any tools you prefer and **deploy anywhere**.
148152
149153
---
150154
151155
## Projects
152156
153-
Projects built with Nitric don't have many restrictions. You can use most languages, most libraries, most tools, most clouds, most services, mostly anything you like. But, you need to have a `nitric.yaml` file in the root of your project.
157+
Projects built with Nitric don't have many restrictions. You can use most languages, libraries, tools, clouds, services, mostly anything you like. But, you need to have a `nitric.yaml` file in the root of your project.
154158

155159
```yaml {{ label:"nitric.yaml" }}
156160
name: example
157161
services:
158-
- match: services/*.ts
159-
start: npm run dev:services $SERVICE_PATH
162+
- match: services/*.ts
163+
start: npm run dev:services $SERVICE_PATH
160164
```
161165

162166
Nitric uses this to find your services, then it turns each service into a container, runs them in deployment mode to match the resources you requested and gives the result to the Provider - which either generates IaC (like Terraform) or automatically deploys your app.
@@ -229,6 +233,11 @@ curl -L "https://nitric.io/install?version=latest" | bash
229233

230234
</InstallNitric>
231235

236+
<Note>
237+
Nitric has a few dependencies, like Docker, which you can read about in the
238+
[Installation](/getting-started/installation) section.
239+
</Note>
240+
232241
### New
233242

234243
You can create a new project from a template with the `new` command.
@@ -246,21 +255,28 @@ nitric start
246255
```
247256

248257
<Note>
249-
Start also emulates the resources you requested, so you can test your app locally. And provides a Dashboard UI to interact with the resources.
258+
Start also emulates the resources you requested, so you can test your app
259+
locally. And provides a Dashboard UI to interact with the resources.
250260
</Note>
251261

252262
### Deploy
253263

254264
You can deploy your project with the `up` command, once you have a stack file (deployment target).
255265

256266
```bash
267+
# Create a new stack (deployment target)
257268
nitric stack new
258-
269+
# Deploy to the stack, using the provider in the stack file
259270
nitric up
260271
```
261272

262273
<Note>
263-
Some providers don't deploy directly, instead they generate IaC files. In those cases you use the IaC tool to deploy (e.g. `terraform apply`).
274+
Some providers deploy directly, others generate IaC files for existing tools
275+
(like HCL for Terraform). In the cases where IaC is generated you use the
276+
chosen IaC tool to deploy (e.g. `terraform apply`).
277+
278+
Currently, all Pulumi providers deploy directly, while Terraform providers generate IaC.
279+
264280
</Note>
265281

266282
### Tear Down
@@ -271,15 +287,20 @@ You can tear down your project with the `down` command.
271287
nitric down
272288
```
273289

290+
<Note>
291+
If you used a provider that generates IaC, use the IaC tool to tear down (e.g.
292+
`terraform destroy`).
293+
</Note>
294+
274295
---
275296

276297
## Local development
277298

278-
Sometimes you just want to run your app locally and we let you do just that. And we don't mean "binds to a cloud environment and syncs your code, but doesn't work without Wifi" local, we mean "runs on your machine, on a desert island" local.
299+
Sometimes you'll want to run your app locally. We don't mean "binds to a cloud environment and syncs your code, but doesn't work without Wifi" local, we mean "runs on your machine, on a desert island" local.
279300

280301
`nitric start` hosts entrypoints like APIs, websockets, and schedules, as well as resources like databases, topics, queues, key/value stores and buckets.
281302

282-
It also provides a Dashboard to interact with your resources, so you can trigger schedules without waiting, or topics without a publisher, or upload test files to a bucket. It even produces a real-time architecture diagram of your services and resources.
303+
It also provides a Dashboard to interact with your resources, so you can trigger schedules without waiting, or topics without a publisher, or upload test files to a bucket. It even produces a live architecture diagram of your services and resources as your code updates.
283304

284305
<img
285306
src="/docs/images/docs/dashboard-architecture.png"
@@ -293,36 +314,41 @@ It also provides a Dashboard to interact with your resources, so you can trigger
293314

294315
The services of cloud providers are vast, we can't cover everything and we shouldn't. Many services are unique enough that abstraction would be a disservice. Nitric aims to make common "table stakes" services easy to use, but we never want to limit you.
295316

317+
Here are some ways you can extend or escape Nitric.
318+
296319
### Runtime
297320

298321
If you need to access a service in a way Nitric doesn't support, you can always use the provider's SDK directly. Code like this will always work:
299322

300323
<CodeGroup>
301324

302325
```javascript
326+
// Import the AWS SDK
303327
import { S3Client } from '@aws-sdk/client-s3'
304328

329+
// Use it like you normally would
305330
const s3 = new S3Client({ region: 'us-east-1' })
306-
307331
const { Contents } = await s3.listObjectsV2({ Bucket: 'my-bucket' })
308332
```
309333

310334
```python
335+
# Import the boto3 (AWS) SDK
311336
from boto3 import client
312337

338+
# Use it like you normally would
313339
s3 = client('s3', region_name='us-east-1')
314-
315340
response = s3.list_objects_v2(Bucket='my-bucket')
316341
```
317342

318343
```go
319344
import (
320345
"context"
321-
346+
// Import the AWS SDK
322347
"github.com/aws/aws-sdk-go-v2/config"
323348
"github.com/aws/aws-sdk-go-v2/service/s3"
324349
)
325350

351+
// Use it like you normally would
326352
cfg, _ := config.LoadDefaultConfig(context.TODO())
327353
client := s3.NewFromConfig(cfg)
328354

@@ -332,12 +358,12 @@ output, _ := client.ListObjectsV2(context.TODO(), &s3.ListObjectsV2Input{
332358
```
333359

334360
```dart
361+
// Import the AWS SDK
335362
import 'package:aws_s3/aws_s3.dart';
336363
364+
// Use it like you normally would
337365
final s3 = S3(region: 'us-east-1');
338-
339366
final response = await s3.listObjectsV2(Bucket: 'my-bucket');
340-
341367
print(response.contents);
342368
```
343369

@@ -348,21 +374,22 @@ print(response.contents);
348374
If you need to change how Nitric deploys a resources or how it interacts with a service at runtime, you can [extend or modify a provider](/reference/providers/custom/extend-standard-provider).
349375

350376
<Note>
351-
For example, here's a [project that swaps SNS for EventBridge](https://github.com/jyecusch/iac-ifc-comparison) on AWS.
377+
For example, here's a [project that swaps SNS for
378+
EventBridge](https://github.com/jyecusch/iac-ifc-comparison) on AWS.
352379
</Note>
353380

354381
### Full Customization
355382

356-
If you need to deploy to a cloud or new set of services that Nitric doesn't support, you can [build your own provider](/reference/providers/custom/building-custom-provider). This is a bit more advanced, but it's the ultimate escape hatch.
383+
If you need to deploy to a new platform or new set of services that Nitric doesn't support, you can [build your own provider](/reference/providers/custom/building-custom-provider). This is a bit more advanced, but it's the ultimate escape hatch.
357384

358385
The included providers are written in Go and built using Terraform or Pulumi, but you can use any language or tool you like.
359386

360387
### Additional Resources
361388

362-
If you need to use a service that Nitric doesn't support, you just do that like you always would. Nitric doesn't get in the way of you using the cloud, it just makes it easier.
389+
If you need to use a service/resource that Nitric doesn't support, you do that like you always would. Nitric doesn't get in the way of you using the cloud, it just makes it easier.
363390

364391
---
365392

366393
## What now?
367394

368-
If you're still not sure what to make of Nitric, maybe start with the [Concepts](/docs/concepts) section, otherwise the best way to learn is to dive into the [Guides](/docs/guides) and start building your first project.
395+
If you're still not sure what to make of Nitric, maybe start with the [Concepts](/concepts) section, otherwise the best way to learn is to dive into the [Guides](/guides) and start building your first project.

0 commit comments

Comments
 (0)