encore.dev
Open in
urlscan Pro
2606:4700::6812:1db1
Public Scan
URL:
https://encore.dev/
Submission: On December 14 via api from FR — Scanned from FR
Submission: On December 14 via api from FR — Scanned from FR
Form analysis
1 forms found in the DOM<form>
<div class="flex items-center">
<div class="inline-block mobile:w-full"><label id="email-label" for="email" class=" block font-mono text-form-label mobile:text-mobile-form-label h-7 "></label><input type="email" id="email" class="
w-full
bg-white dark:bg-black
border-black dark:border-white
border-2 border-b-4 placeholder-shown:border-b-2
text-black dark:text-white lead-xsmall normal-case
focus:ring-0 focus:border-black dark:focus:border-white
placeholder:text-black dark:placeholder:text-white
placeholder:font-mono placeholder:font-normal placeholder:uppercase
disabled:cursor-not-allowed
disabled:border-opacity-50 disabled:placeholder:text-opacity-50 disabled:text-opacity-50
dark:disabled:border-opacity-50 dark:disabled:placeholder:text-opacity-50 dark:disabled:text-opacity-50
h-10 placeholder:text-sm placeholder:mobile:text-sm lead-xxsmall py-0 px-2
" required="" placeholder="Your Email Address" value="" aria-invalid="false" aria-describedby="email-error">
<div id="email-error" class=" block text-form-error mobile:text-mobile-form-error text-validation-fail h-7 mt-2 mobile:mt-0 "></div>
</div><span class="mobile:hidden">
<div class="inline-block "><label id="getupdates-label" for="getupdates" class=" block font-mono text-form-label mobile:text-mobile-form-label h-7 "></label>
<div class="h-14 mobile:h-12 inline-block group relative !h-10">
<div class="
absolute inset-0
bg-gradient-to-r brandient-5
text-sm
"></div><button id="getupdates" type="submit" class="
h-full w-full px-6
inline-flex justify-center items-center lead-xxsmall font-mono uppercase
bg-black dark:bg-white text-white dark:text-black relative
transition-transform duration-100 ease-in-out
group-active:-translate-x-0.5 group-active:-translate-y-0.5
group-hover:-translate-x-0.5 group-hover:-translate-y-0.5
disabled:cursor-not-allowed
disabled:group-active:translate-x-0 disabled:group-active:translate-y-0
disabled:group-hover:translate-x-0 disabled:group-hover:translate-y-0
disabled:opacity-50
text-sm
">Get Updates</button>
</div>
<div id="getupdates-error" class=" block text-form-error mobile:text-mobile-form-error text-validation-fail h-7 mt-2 mobile:mt-0 "></div>
</div>
</span>
</div>
<div class="hidden mobile:block">
<div class="h-14 mobile:h-12 inline-block group relative ">
<div class="
absolute inset-0
bg-gradient-to-r brandient-5
"></div><button id="getupdates" type="submit" class="
h-full w-full px-6 mobile:px-6
inline-flex justify-center items-center lead-xxsmall font-mono uppercase
bg-black dark:bg-white text-white dark:text-black relative
transition-transform duration-100 ease-in-out
group-active:-translate-x-0.5 group-active:-translate-y-0.5
group-hover:-translate-x-0.5 group-hover:-translate-y-0.5
disabled:cursor-not-allowed
disabled:group-active:translate-x-0 disabled:group-active:translate-y-0
disabled:group-hover:translate-x-0 disabled:group-hover:translate-y-0
disabled:opacity-50
">Get Updates</button>
</div>
</div>
</form>
Text Content
🚀 Launch Week is live right now! ENCORE.TS / ENCORE.GO OPEN SOURCE TYPESCRIPT BACKEND FRAMEWORK FOR ROBUST TYPE-SAFE APPLICATIONS * ★8k * 70+ contributors * 0 npm dependencies 1. Install Encore macOS Windows Linux Brew $ curl -L https://encore.dev/install.sh | bash 2. Create tutorial app $ encore app create --example=ts/introduction 3. Run locally $ encore run Loved by pioneering engineering teams in fast-moving startups and scaleups See what teams are building with Encore → * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * LEAVE THE MAZE OF COMPLEXITY BEHIND Leave the maze of complexity behind 9X FASTER THAN EXPRESS.JS 3X FASTER THAN ELYSIA & HONO REQUESTS/SEC Without validation With schema validation 121,005 107,018 Encore v1.38.7 82,617 35,124 Elysia (+ TypeBox) v1.1.16 / v0.33.12 71,202 33,150 Hono (+ TypeBox) v4.6.3 / v0.33.12 62,207 48,397 Fastify (+ Ajv) v4.27.0 / v8.16.0 15,707 11,878 Express (+ Zod) v4.19.2 / v3.23.8 View benchmarks → Replace Express.js with Encore.ts for 9x faster APIs. Try it → RUST-POWERED PERFORMANCE AND TYPE-SAFETY IN NODE.JS Performance: Multi-threaded request handling and validation in Rust Compatibility: Runs as a native Node.js process for full ecosystem compatibility Type-Safety: Automatic request validation in Rust for runtime type-safety Wrap your APIs with Encore.ts for improved performance and type-safety. Try it → USE FUNCTIONS AS APIS Encore.ts generates the communication boilerplate and ensures full type-safety. Defining APIsCalling APIsDefining microservices Defining APIsCalling APIsDefining microservices // Use the api function to create endpoints. import { api } from "encore.dev/api"; // Wrap regular functions with { api } to expose them as API endpointsexport const ping = api( { method: "GET", path: "/hello/:name", expose: true }, // API options async (params: { name: string }): Promise<{ message: string }> => { return {message: `Hello, ${params.name}`}; }); Learn how to define APIs in Encore with this introduction app: $ encore app create --example=ts/introduction INTEGRATE INFRASTRUCTURE AS TYPE-SAFE OBJECTS IN APPLICATION CODE Encore makes your infrastructure type-aware and removes the need for connection strings and other boilerplate in your application. DatabasePub/SubObject StorageCron JobSecretsCache DatabasePub/SubObject StorageCron JobSecretsCache // Create a PostgreSQL database in one line of code import { SQLDatabase } from "encore.dev/storage/sqldb"; const db = new SQLDatabase("userdb", {migrations: "./migrations"});// ... use db.query to query the database. Deploy anywhere that supports Docker images using Encore's Open Source tools. See how → Fully automate infra and DevOps in your cloud on AWS and GCP with Encore Cloud. Learn more → WORKS WITH YOUR EXISTING STACK * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * AUTOMATED LOCAL INFRASTRUCTURE AND BUILT-IN DEVELOPMENT DASHBOARD Try the local development experience: $ encore app create --example=ts/hello-world AUTOMATED LOCAL INFRA WITH HOT RELOAD encore run starts your app and all infrastructure. Forget YAML, Docker Compose, and the usual headaches. SERVICE CATALOG & API EXPLORER Automatically updated Service Catalog with full API documentation, and an API Explorer for testing your APIs. TRACING & LOGGING The local dashboard includes tracing for API requests, database calls, and Pub/Sub messages. ARCHITECTURE DIAGRAMS Automatic architecture diagrams give you a real-time overview of your application. FULL EXAMPLE PROJECT 1 import { api } from "encore.dev/api"; 2 import { Subscription, Topic } from "encore.dev/pubsub"; 3 import { SQLDatabase } from "encore.dev/storage/sqldb"; 4 import { Site, SiteAddedTopic } from "../site/site"; 5 import { ping } from "./ping"; 6 import { site } from "~encore/clients"; 7 import { CronJob } from "encore.dev/cron"; // Check checks a single site. 8 9 // Check checks a single site. 10 export const check = api( 11 { expose: true, method: "POST", path: "/check/:siteID" }, 12 async (p: { siteID: number }): Promise<{ up: boolean }> => { 13 const s = await site.get({ id: p.siteID }); 14 return doCheck(s); 15 }, 16 ); 17 18 // CheckAll checks all sites. 19 export const checkAll = api( 20 { expose: true, method: "POST", path: "/check-all" }, 21 async (): Promise<void> => { 22 const sites = await site.list(); 23 await Promise.all(sites.sites.map(doCheck)); 24 }, 25 ); 26 27 // Defines a Cron Job to check all tracked sites every hour. 28 // Learn more: https://encore.dev/docs/ts/primitives/cron-jobs 29 // Send a welcome email to everyone who signed up in the last two hours. 30 const cronJob = new CronJob("check-all", { 31 title: "Check all sites", 32 every: "1h", 33 endpoint: checkAll, 34 }); 35 36 async function doCheck(site: Site): Promise<{ up: boolean }> { 37 const { up } = await ping({ url: site.url }); 38 39 // Publish a Pub/Sub message if the site transitions 40 // from up->down or from down->up. 41 const wasUp = await getPreviousMeasurement(site.id); 42 if (up !== wasUp) { 43 await TransitionTopic.publish({ site, up }); 44 } 45 46 await MonitorDB.exec` 47 INSERT INTO checks (site_id, up, checked_at) 48 VALUES (${site.id}, ${up}, NOW()) 49 `; 50 return { up }; 51 } 52 53 // getPreviousMeasurement reports whether the given site was 54 // up or down in the previous measurement. 55 async function getPreviousMeasurement(siteID: number): Promise<boolean> { 56 const row = await MonitorDB.queryRow` 57 SELECT up 58 FROM checks 59 WHERE site_id = ${siteID} 60 ORDER BY checked_at DESC 61 LIMIT 1 62 `; 63 return row?.up ?? true; 64 } 65 66 // Define a database named 'monitor', using the database migrations 67 // in the "./migrations" folder. Encore automatically provisions, 68 // migrates, and connects to the database. 69 export const MonitorDB = new SQLDatabase("monitor", { 70 migrations: "./migrations", 71 }); 72 73 const _ = new Subscription(SiteAddedTopic, "check-site", { 74 handler: doCheck, 75 }); 76 77 // TransitionEvent describes a transition of a monitored site 78 // from up->down or from down->up. 79 export interface TransitionEvent { 80 site: Site; // Site is the monitored site in question. 81 up: boolean; // Up specifies whether the site is now up or down (the new value). 82 } 83 84 // TransitionTopic is a pubsub topic with transition events for when a monitored site 85 // transitions from up->down or from down->up. 86 export const TransitionTopic = new Topic<TransitionEvent>("uptime-transition", { 87 deliveryGuarantee: "at-least-once", 88 }); 89 Project frontend monitor migrations 1_create_tables.up.sql check.test.ts check.ts encore.service.ts ping.test.ts ping.ts status.ts site migrations 1_create_tables.up.sql encore.service.ts site.ts slack encore.service.ts slack.ts Encore encore.app package.json tsconfig.json vite.config.ts Open on Clone this example $ encore app create --example=ts/uptime JOIN A GROWING COMMUNITY OF PIONEERING DEVELOPERS Encore's Open Source Community is the driving force behind the project. It's full of friendly developers supporting the project with feedback, bug fixes, and wisdom. Discord Come hang out with other friendly Encore developers. 1k+ Members Join → GitHub Star and contribute to the project on GitHub. 8k Stars / 70+ Contributors Star → Twitter Follow along on Twitter / X. Follow → YouTube Sit back and enjoy the videos on YouTube. Watch → Less complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibilityLess complexity creates more possibility START BUILDING YOUR FIRST ENCORE.TS APP URL Shortener A URL shortener with a REST API and PostgreSQL database. Build it Slack Bot Create a Cowsay Slack Bot that integrates with the Slack API. Build it Event-Driven System Create an event-driven uptime monitoring system with this template. Build it OpenAI Chat Bot Create bots powered by OpenAI and integrate with Discord and Slack. Build it See all the Open Source Example Apps FEATURES Tracing Type-safe API schemas Streaming APIs CORS handling Structured logging Authentication API Client generation Pub/Sub integrations Object Storage integrations Secrets management Database integrations Automatic local infrastructure Architecture Diagrams Local Development Dashboard Service Catalog TypeScript native Automated testing Debugging Error handling Multithreading Request validation GET STARTED NOW 1. Install Encore macOS Windows Linux Brew $ curl -L https://encore.dev/install.sh | bash 2. Create tutorial app $ encore app create --example=ts/introduction 3. Run locally $ encore run // Stay in touch? Get Updates Get Updates Get Started Encore.tsEncore.ts Encore.goEncore.go DocsDocs InstallInstall Quick StartQuick Start Example AppsExample Apps Demo videoDemo video ChangelogChangelog Community DiscordDiscord GitHubGitHub RoadmapRoadmap BlogBlog TwitterTwitter YouTubeYouTube ShowcaseShowcase Products Encore CloudEncore Cloud /etc ContactContact JobsJobs Terms of ServiceTerms of Service Privacy PolicyPrivacy Policy Encore © 2024 EncoreAll rights reserved © 2024 Encore All Rights Reserved Encore Get Started Community Blog Docs ★8k Encore Cloud Search Docs ⌘K // Open Source Framework