# Encore — Type-Safe Backend Framework with Declarative Infrastructure > An open-source backend framework for building distributed systems in Go or TypeScript with infrastructure defined in code. Encore generates cloud infrastructure automatically from your application code. ## Install Save in your project root: # Encore — Type-Safe Backend Framework with Declarative Infrastructure ## Quick Use ```bash # Install Encore CLI curl -L https://encore.dev/install.sh | bash # Create a new app encore app create my-app --example=hello-world cd my-app encore run ``` ## Introduction Encore is an open-source framework that lets developers build cloud backends by writing application code with type-safe APIs, and it automatically provisions the required infrastructure. It supports both Go and TypeScript, removing the gap between writing business logic and deploying to AWS or GCP. ## What Encore Does - Defines APIs, databases, caches, cron jobs, and pub/sub topics as code-level declarations - Generates infrastructure configuration from application source code automatically - Provides a local development dashboard with API explorer, tracing, and architecture diagrams - Supports deploying to your own AWS or GCP account with a single command - Offers built-in service-to-service authentication and request validation ## Architecture Overview Encore consists of a CLI, a language-specific runtime, and an optional cloud platform. The CLI parses your source code to build a model of your application's architecture — APIs, services, databases, and message topics. At compile time, it generates infrastructure-as-code and wiring between services. Locally, it runs everything in a single process with real databases for fast iteration. In production, each service can be deployed independently. ## Self-Hosting & Configuration - Install the CLI on macOS or Linux via the official install script - Use ``encore run`` for local development with automatic database provisioning - Deploy to your own cloud with ``encore deploy`` or use the Encore Cloud platform - Configure environment-specific settings using ``encore secret set`` - Infrastructure definitions live alongside application code — no separate Terraform or Pulumi files needed ## Key Features - Zero boilerplate API definitions using Go structs or TypeScript types - Automatic OpenAPI documentation generated from source code - Built-in distributed tracing with no instrumentation required - Preview environments created automatically for each pull request - Architecture diagrams generated live from the codebase ## Comparison with Similar Tools - **Terraform/Pulumi** — Infrastructure-as-code tools that require separate config; Encore derives infra from app code - **Serverless Framework** — Function-oriented with manual wiring; Encore provides full service-to-service architecture - **Railway/Render** — Hosting platforms without framework-level infrastructure modeling - **AWS CDK** — Cloud-specific IaC; Encore is cloud-agnostic and framework-integrated ## FAQ **Q: Can I deploy Encore apps without the Encore Cloud platform?** A: Yes. You can self-host by using ``encore build`` to generate a Docker image and deploy it to any container runtime. **Q: Does Encore support existing databases?** A: Yes. You can connect to existing PostgreSQL databases by configuring connection strings in your environment settings. **Q: Is Encore production-ready?** A: Yes. Encore is used in production by companies running on AWS and GCP. The framework and runtime are open source under the Mozilla Public License. **Q: Can I mix Go and TypeScript services?** A: Currently each Encore application uses a single language runtime, either Go or TypeScript. Cross-language service calls are not supported within one app. ## Sources - https://github.com/encoredev/encore - https://encore.dev/docs --- Source: https://tokrepo.com/en/workflows/5d7bdbfc-3b41-11f1-9bc6-00163e2b0d79 Author: AI Open Source