# @adpt/core

> AdaptJS core library

Latest version **0.3.1** (published 2020-08-05) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @adpt/core
pnpm add @adpt/core
yarn add @adpt/core
bun add @adpt/core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2020-08-05 |
| First published | 2019-06-28 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 31 |
| Unpacked size | 964.8 KB |
| Known vulnerabilities | 0 (+8 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 405 |
| Author | Unbounded Systems |
| Maintainers | mr_roboto, mterrel |
| Keywords | adapt, adaptjs, adpt, unbounded, infrastructure-as-code, devops, deploy, aws, k8s, kubernetes, cloud, deployment, typescript, nodejs, react, reactjs, containers, docker |

## Links

- npm: https://www.npmjs.com/package/@adpt/core
- Repository: https://github.com/unboundedsystems/adapt
- Homepage: https://github.com/unboundedsystems/adapt#readme
- Issues: https://gitlab.com/unboundedsystems/adapt/issues
- npm.io page: https://npm.io/package/@adpt/core

## Dependencies (31)

- [debug](https://npm.io/package/debug.md) 4.1.1
- [tslib](https://npm.io/package/tslib.md) 1.10.0
- [lodash](https://npm.io/package/lodash.md) 4.17.19
- [mkdirp](https://npm.io/package/mkdirp.md) 0.5.1
- [moment](https://npm.io/package/moment.md) 2.24.0
- [graphql](https://npm.io/package/graphql.md) 14.6.0
- [p-defer](https://npm.io/package/p-defer.md) 3.0.0
- [p-queue](https://npm.io/package/p-queue.md) 4.0.0
- [urn-lib](https://npm.io/package/urn-lib.md) 1.2.0
- [css-what](https://npm.io/package/css-what.md) 2.1.3
- [graphlib](https://npm.io/package/graphlib.md) 2.1.8
- [p-settle](https://npm.io/package/p-settle.md) 2.1.0
- [callsites](https://npm.io/package/callsites.md) 3.1.0
- [p-timeout](https://npm.io/package/p-timeout.md) 3.2.0
- [type-name](https://npm.io/package/type-name.md) 2.0.2
- [async-lock](https://npm.io/package/async-lock.md) 1.2.4
- [xmlbuilder](https://npm.io/package/xmlbuilder.md) 15.1.1
- [@adpt/utils](https://npm.io/package/@adpt/utils.md) 0.3.1
- [graphql-tag](https://npm.io/package/graphql-tag.md) 2.10.1
- [read-pkg-up](https://npm.io/package/read-pkg-up.md) 4.0.0
- [node-json-db](https://npm.io/package/node-json-db.md) 0.11.0
- [randomstring](https://npm.io/package/randomstring.md) 1.1.5
- [graphql-tools](https://npm.io/package/graphql-tools.md) 4.0.6
- [indent-string](https://npm.io/package/indent-string.md) 3.2.0
- [proper-lockfile](https://npm.io/package/proper-lockfile.md) 3.2.0
- [ts-custom-error](https://npm.io/package/ts-custom-error.md) 3.1.1
- [@adpt/dom-parser](https://npm.io/package/@adpt/dom-parser.md) 0.3.1
- [graphql-type-json](https://npm.io/package/graphql-type-json.md) 0.3.1
- [@usys/fork-require](https://npm.io/package/@usys/fork-require.md) 1.0.9-unb1
- [flush-write-stream](https://npm.io/package/flush-write-stream.md) 2.0.0
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) 1.0.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2020-08-05
- 0.4.0-next.28 (next) — 2024-05-30
- 0.4.0-next.27 — 2024-05-03
- 0.4.0-next.26 — 2021-09-13
- 0.4.0-next.25 — 2021-06-25
- 0.4.0-next.24 — 2021-06-24
- 0.4.0-next.23 — 2021-06-23
- 0.4.0-next.22 — 2021-06-22
- 0.4.0-next.21 — 2021-06-21
- 0.4.0-next.20 — 2021-06-13
- 0.4.0-next.19 — 2021-05-28
- 0.4.0-next.18 — 2021-05-05
- 0.4.0-next.17 — 2021-04-29
- 0.4.0-next.16 — 2021-04-27
- 0.4.0-next.15 — 2021-04-21
- … 37 more at https://npm.io/package/@adpt/core/versions

## README

[![Adapt logo](https://adaptjs.org/img/logo_lockup.svg)](https://adaptjs.org)

[![npm](https://img.shields.io/npm/v/@adpt/cli?color=blue)](https://www.npmjs.com/package/@adpt/cli)
![npm](https://img.shields.io/npm/dt/@adpt/core)
[![Gitter](https://badges.gitter.im/UnboundedSystems/Adapt.svg)](https://gitter.im/UnboundedSystems/Adapt)
[![License](https://img.shields.io/github/license/unboundedsystems/adapt)](https://opensource.org/licenses/Apache-2.0)

# Adapt - ReactJS for your infrastructure.

AdaptJS is a system to easily, reliably, and repeatably deploy your full-stack applications.  Adapt specifications look like [React](https://reactjs.org) apps, but instead of rendering browser DOM elements like `<input>`, or `<div>`, Adapt specifications use elements like AWS `<EC2Instance>`, Kubernetes `<Pod>`, or `<MongoDB>` database.
An Adapt description for a complete front end and back end app stack looks like this:

```jsx
import Adapt from "@adpt/core";
import { NodeService, ReactApp } from "@adpt/cloud/nodejs";
import { Postgres } from "@adpt/cloud/postgres";

function MyApp() {
  const pg = Adapt.handle();

  return (
    <Adapt.Group>
      <ReactApp srcDir="../frontend" />
      <NodeService srcDir="../backend" connectTo={pg} />
      <Postgres handle={pg} />
    </Adapt.Group>
  );
}
```

Each of the components above renders to simpler components until they get to primitive infrastructure.
You can also specify a style sheet to customize how components render to infrastructure (e.g., Docker vs. Kubernetes vs. AWS).
Styles can also swap out components entirely, for example, using a test database for your test environment and a hosted database service for production.

If you're already familiar with React, you'll feel right at home with Adapt.
But if not, don't worry, knowledge of React isn't required to start using Adapt.
You can get started with a starter, write your code and deploy, and come back to the Adapt specification when you need to change how it gets deployed.

## Getting Started

For a new project, it's easy to get started with Adapt by using a starter template.
The [Getting Started Guide](https://adaptjs.org/docs/getting_started) will walk through installing Adapt and deploying your first starter app.

## Creating and deploying an app

This example creates a new full-stack app from a starter template.
It has a [React](https://reactjs.org) UI, an [Nginx](https://nginx.org) web server, a [Node.js](https://nodejs.org) API server, and a [Postgres](https://postgresql.org) database, then deploys it to [Kubernetes](https://kubernetes.io/):

```bash
# Install adapt
npm install -g @adpt/cli

# Create a new app from a starter template
adapt new hello-react-node-postgres ./myapp
cd myapp/deploy

# Deploy full stack locally using Docker
adapt run laptop

# Or just as easily deploy everything to Kubernetes
adapt run k8s-test
```

## Adapt in action

This demo shows using Adapt to create and deploy a simple app called MovieDB that has a [React](https://reactjs.org) UI, an [Nginx](https://nginx.org) web server, an Nginx URL router, a [Node.js](https://nodejs.org) API server, and a [Postgres](https://postgresql.org) database, then deploys it to [Kubernetes](https://kubernetes.io/):

![Adapt in action](https://adaptjs.org/docs/assets/getting_started/adapt-demo-scaled.gif)

## More info

* [Adaptjs.org](https://adaptjs.org)

    Learn more about Adapt.

* [Getting Started Guide](https://adaptjs.org/docs/getting_started)

    This guide will walk you through setting up Adapt and then deploying an example MovieDB app.

* [Deploying on Google Kubernetes Engine](https://adaptjs.org/blog/2020/01/10/simple-hosting-react-app-on-google-cloud)

* [Adapt Documentation](https://adaptjs.org/docs)

    Adapt tutorials, API References, and more.

## Getting Help

[![Gitter](https://badges.gitter.im/UnboundedSystems/Adapt.svg)](https://gitter.im/UnboundedSystems/Adapt)

We'd love to hear about your experience with Adapt!
Join us on our [Gitter channel](https://gitter.im/UnboundedSystems/Adapt) to ask questions or to give us your feedback and suggestions.

If you've found a bug, you can also [file an issue](https://gitlab.com/unboundedsystems/adapt/issues).

---
_Source: https://npm.io/package/@adpt/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
