Home

Awesome

<p align="center" dir="auto"> <a href="https://encore.dev"><img src="https://user-images.githubusercontent.com/78424526/214602214-52e0483a-b5fc-4d4c-b03e-0b7b23e012df.svg" width="160px" alt="encore icon"></img></a><br/><br/> <b>Encore Templates</b><br/> Templates to help you build backend applications with <a href="https://github.com/encoredev/encore">Encore</a>. </p>

Template types

This repo contains two types of templates:

Prerequisite: Install Encore

If this is the first time you're using Encore, you first need to install the CLI that runs the local development environment. Use the appropriate command for your system:

Starters

Create a local app from a template by running:

encore app create [app-name] --example=[folder-name]

E.g. encore app create my-app --example=ts/hello-world

TypeScript starters

NameDescriptionPrimitives
ts/hello-worldREST API StarterAPIs
ts/ai-chatLLM chat application which let's you create and chat with personalized bots. Integrates with OpenAI, Anthropic and SlackMicroservices, APIs, SQL Database, Pub/Sub, External Requests, Configs
ts/streamingExamples of the different WebSocket Streaming APIsStreaming API, Static Endpoint, Frontend
ts/react-starterEncore + React Web App StarterAPIs, Frontend
ts/nextjs-starterEncore + Next.js Web App StarterMicroservices, APIs, Frontend
https://github.com/encoredev/nextjs-starter/Encore + Next.js Web App Starter (separate dependencies)Microservices, APIs, Frontend
ts/graphqlApollo GraphQL Server StarterAPIs, GraphQL
ts/streaming-chatSimple Chat app using the Streaming API to create a WebSocket streamStreaming API, Static Endpoint, Frontend
ts/simple-event-drivenSimple Event-Driven ApplicationMicroservices, SQL Database, Pub/Sub, Secrets
ts/uptimeEvent-Driven Architecture Starter (Uptime Monitor)Microservices, SQL Databases, Pub/Sub, Cron Jobs
ts/gpt-functionsChatGPT Functions with Encore ExampleAPIs
ts/url-shortenerBasic url shortenerAPIs, SQL Database
ts/nestjsEncore + NestJS ExampleAPIs, SQL Database, Auth
ts/slack-botSlack Bot StarterAPIs, Raw Endpoint
ts/auth0-react-sdkAuth0 React SDK Authentication + Encore ExampleAPIs, Auth, Frontend
ts/clerkClerk React SDK Authentication + Encore ExampleAPIs, Auth, Frontend
ts/supabaseSupabase Authentication + Encore ExampleAPIs, Auth, Frontend
ts/elevenlabsElevenLabs AI Speech SDK + Encore ExampleAPIs, Raw Endpoints, Frontend
ts/sequelizeEncore + Sequelize TypeScript ExampleAPIs, SQL Database
ts/drizzleEncore + Drizzle TypeScript ExampleAPIs, SQL Database
ts/knexEncore + Knex TypeScript ExampleAPIs, SQL Database
ts/prismaEncore + Prisma TypeScript ExampleAPIs, SQL Database
ts/expressjs-migrationExpress.js migration guide examplesAPIs, Raw Endpoints, Auth, Databases
ts/file-uploadUpload files from frontend exampleRaw Endpoints
ts/static-filesServing static files exampleStatic Endpoints
ts/template-engineUsing a templating engineRaw Endpoints, Static Endpoints

Go starters

NameDescriptionPrimitives
hello-worldREST API StarterAPIs
sql-databasePostgreSQL database StarterAPIs, SQL Database
ai-chatLLM chat room application which let's you create and chat with personalized bots. Integrates with OpenAI, Gemini, Slack and DiscordMicroservices, APIs, SQL Database, Pub/Sub, Cron Jobs, Frontend, External Requests, Configs
assembly-aiAssemblyAI Starter - Conversational Intelligence app that lets you upload and transcribe voice data.APIs, SQL Database, Frontend, External Requests, Configs
slack-botSlack Bot StarterAPIs, Webhooks
trello-cloneMicroservices Starter (Trello Clone)Microservices, APIs, SQL Database
uptimeEvent-Driven Architecture Starter (Uptime Monitor)Microservices, SQL Databases, Pub/Sub, Cron Jobs
graphqlGraphQL Server StarterAPIs, SQL Database, GraphQL
url-shortenerBasic url shortenerAPIs, SQL Database
sqlc-databaseSimple sqlc implementationAPIs, SQL Database
next-starterNext.js + Encore Web App StarterAPIs, Auth, Frontend
next-auth0-starterNext.js + Auth0 + Encore Web App StarterMicroservices, APIs, Auth, Frontend
react-starterReact + Encore Web App StarterAPIs, Auth, Frontend
booking-systemAppointment Booking System Starter using data scrubbing and sqlcMicroservices, APIs, Auth, SQL Database, Frontend
meeting-notesMeeting Notes App deployed to GitHub PagesAPIs, SQL Database, External Requests
auth0Auth0 Authentication + React + Encore ExampleAPIs, Auth, Frontend
auth0-react-sdkAuth0 React SDK Authentication + Encore ExampleAPIs, Auth, Frontend
clerkClerk React SDK Authentication + Encore ExampleAPIs, Auth, Frontend
firebase-authFirebase Authentication + Encore ExampleAPIs, Auth, Frontend

† = Cannot be installed using encore app create --example, create an empty app and clone the repo instead.

Bits

Go Bits

The bits sub-folder contains reusable code samples that can be copied directly into your own application.

NameDescriptionPrimitivesRequirements
elevenlabsGetting text to speech from ElevenLabs generative voice AIAPIs, SecretsElevenLabs API key
pexelsSearching and retrieving photos and videos from PexelsAPIs, SecretsPexels API key
sendgridAsynchronous sending emails via SendGridAPIs, Secrets, Pub/SubSendGrid API key

Contribute your templates

Contribute a template by submitting a Pull Request to the Open Source Examples Repo: https://github.com/encoredev/examples

Submitting Starters

Follow these steps to submit a Starter:

  1. Fork the repo.
  2. Create a new folder in the root directory of the repo, this is where you will place your template. Use a short folder name as your template will be installable via the CLI, like so: encore app create APP-NAME --example=<TEMPLATE_FOLDER_NAME>
  3. Include a README.md with instructions for how to use the template. We recommend following this format.

Once your Pull Request has been approved, it may be featured on the Templates page on the Encore website.

Submitting Bits

Follow these steps to submit your Bits:

  1. Fork the repo.
  2. Create a new folder inside the bits folder in the repo and place your template inside it. Use a short folder name as your template will soon be installable via the CLI.
  3. Include a README.md with instructions for how to use the template.

Once your Pull Request has been approved, it may be featured on the Templates page on the Encore website.

Dynamic Encore AppID

In most cases, you should avoid hardcoding an AppID in your template's source code. Instead, use the notation {{ENCORE_APP_ID}}.

When a developer creates an app using the template, {{ENCORE_APP_ID}} will be dymically replaced with their new and unique AppID, meaning they will not need to make any manual code adjustments.