Welcome to Adapt
Adapt is the easiest way to reliably and repeatably deploy your apps anywhere -- to your laptop, a Kubernetes cluster, your favorite cloud, or anywhere else. Adapt specifications look like ReactJS apps, but instead of rendering browser DOM elements like input, or div, Adapt specifications render to DOM elements like AWS EC2 instances, Lambdas, Kubernetes Pods, or any other building block for your application architecture. If you are already familiar with React, many of the concepts will look familiar. If not, don't worry, knowledge of React isn't required to start using Adapt.
Getting Started
For a new project, you can get started without knowing much about Adapt by using a starter. The Getting Started Guide will walk through installing Adapt and deploying a starter project.
# Create a new project from a starter
adapt new <starter> <project directory>
# Create a new deployment of the starter project
adapt run --deployID <myID>
# Write some code
...
# Update the running deployment
adapt update <myID>
Deploy a sample application with a React front-end, a Node.js API server, and a Postgres database, along with a static file server and a URL router:
A snippet of the corresponding Adapt specification that the starter sets up for this example:
import { UrlRouter } from "@adpt/cloud/http";
import { NodeService, ReactApp } from "@adpt/cloud/nodejs";
import { Postgres } from "@adpt/cloud/postgres";
import Adapt, { Group, handle } from "@adpt/core";
import { k8sStyle } from "./styles";
function App() {
const pg = handle();
const app = handle();
const api = handle();
return <Group>
<UrlRouter
port={8080}
routes={[
{ path: "/api/", endpoint: api },
{ path: "/", endpoint: app }
]} />
<ReactApp handle={app} srcDir="../frontend" />
<NodeService handle={api} srcDir="../backend" connectTo={pg} />
<Postgres handle={pg} />
</Group>;
}
Adapt.stack("default", <App />, k8sStyle);
More Information
Our documentation is a work in progress, so it may not have all the answers you're looking for yet. If you haven't found what you need, please ask a question on our Gitter channel or file an issue.
Adapt Basics
Advanced Adapt Topics
Contributing to Adapt
If you're interested in contributing to Adapt, that's awesome! Chat with us on our Gitter channel and we can help you get started.