> Markdown version of [/videos/208-40-minutes-to-build-a-serverless-covid-19-rest-and-graphql-apis?t=3](https://www.wearedevelopers.com/videos/208-40-minutes-to-build-a-serverless-covid-19-rest-and-graphql-apis?t=3). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # 40 Minutes to Build a Serverless COVID-19 REST and GraphQL APIs Tired of wrestling with messy CSVs and rigid database migrations? Learn how to build resilient, serverless REST and GraphQL APIs in just 40 minutes using MongoDB Atlas. - **Speakers:** Maxime Beugnet - **Event:** World Congress 2021 - **Published:** June 29, 2021 - **Duration:** 47:16 - **URL:** https://www.wearedevelopers.com/videos/208-40-minutes-to-build-a-serverless-covid-19-rest-and-graphql-apis ## Summary Wrangling messy, real-world data into a predictable format is the foundational step for any resilient backend. This session demonstrates how to consume inconsistent Johns Hopkins COVID-19 CSV datasets and transform them using a Python script into a structured, highly queryable format. By enforcing a consistent schema that replaces scattered columns with precise timestamps and standardized GeoJSON points, developers can significantly simplify their data visualizations and downstream endpoints. Ultimately, taking the time to architect clean, consistent metadata up-front dictates the success and usability of the resulting application. With a well-structured dataset prepared, the focus shifts to deploying a completely serverless infrastructure using MongoDB Atlas and MongoDB Realm. Atlas provides the cloud-hosted cluster, seamlessly managing core database operations, while Realm directly exposes the data through auto-generated GraphQL APIs. Built-in features like role-based data permissions, flexible authentication mechanisms, and schema auto-generation are configured in minutes. This effectively removes the friction of maintaining complex backend routing, accelerating the time to market without sacrificing security or scalability. Complementing the GraphQL implementation, customized REST APIs are easily constructed using Realm’s HTTP services and customized webhooks. Because MongoDB utilizes a flexible document schema, making ongoing iterative changes—such as accounting for newly tracked geographic regions—eliminates the downtime traditionally associated with rigid relational database migrations. Furthermore, relying on a shared serverless microservices architecture offers an implicit environmental advantage, reducing idle server waste to maximize computational efficiency while dynamically scaling to meet unpredictable consumer demand. **Keywords:** mongodb atlas deployment, mongodb realm serverless, graphql api configuration, rest api webhooks, python data transformation, geojson mapping pipelines, database schema flexibility, mongodb aggregation pipeline, serverless architecture sustainability, role-based data permissions, nosql flexible schema, legacy csv parsing, cloud-hosted infrastructure, query payload validation ## Chapters 1. **Building serverless REST and GraphQL APIs for COVID-19 data** (00:03) — Building responsive serverless dashboards requires aggregating raw external metrics into scalable database architectures. 1. **Analyzing inconsistencies in the COVID-19 daily reports dataset** (01:27) — Inspecting raw CSV exports reveals inconsistent data structures that complicate deterministic database ingestion. 1. **Structuring geographic time series data into consistent database schemas** (09:48) — Transforming time series datasets with geographic granularity simplifies complex date-based queries in the database. 1. **Transforming datasets using Python scripts and aggregation pipeline queries** (15:19) — Applying Python transformation scripts to raw imports computes required daily metrics for the application database. 1. **Deploying a database cluster and setting up MongoDB Realm** (20:27) — Provisioning database clusters using managed cloud environments simplifies deployment architectures and subsequent application connections. 1. **Generating dataset access rules and schemas for GraphQL APIs** (25:56) — Defining explicit role-based access rules and automated data schemas exposes internal collections safely to flexible GraphQL endpoints. 1. **Securing endpoint environments using anonymous and email authentication tokens** (28:57) — Generating user access tokens via backend authentication providers creates safe querying environments for public application interfaces. 1. **Building a public REST API webhook with HTTP services** (33:42) — Configuring backend webhook functions enables flexible document retrieval directly from standard HTTP request payloads. 1. **Environmental benefits and carbon efficiency of serverless cloud platforms** (39:41) — Operating shared serverless database clusters minimizes system idle time and reduces the overall computing carbon footprint. 1. **Managing schema migrations and structural changes in document databases** (42:10) — Relying on flexible record structures in document databases enables continuous deployment without requiring disruptive table migrations. ## Related Moments - [Building a scalable healthcare platform with serverless architecture](https://www.wearedevelopers.com/videos/424-zeiss-microsoft-building-the-next-generation-medical-ecosystem-in-the-cloud) (from "ZEISS & Microsoft - Building the Next Generation Medical Ecosystem in the Cloud") - [Architecting common use cases via serverless design](https://www.wearedevelopers.com/videos/34-serverless-past-present-and-future) (from "Serverless: Past, Present and Future") - [Real-world challenges in adopting serverless architectures](https://www.wearedevelopers.com/videos/56-end-the-monolith-lessons-learned-adopting-serverless) (from "End the Monolith! Lessons learned adopting Serverless") - [Modern application stacks and real-time data requirements](https://www.wearedevelopers.com/videos/806-leveraging-real-time-data-in-fsis) (from "Leveraging Real time data in FSIs") - [Resolving resource scaling challenges with dynamic serverless deployments](https://www.wearedevelopers.com/videos/1008-serverless-java-in-action-cloud-agnostic-design-patterns-and-tips) (from "Serverless Java in Action: Cloud Agnostic Design Patterns and Tips") - [Best practices for implementing durable hyperscale serverless systems](https://www.wearedevelopers.com/videos/793-from-0-to-1-000-000-how-to-build-a-serverless-raffle-service-for-hyperscale) (from "From 0 to 1.000.000: How to build a serverless raffle service for hyperscale") ## Related Articles - [Covid-19: A crowdsourced Map For Checking Supermarket Wait Times Worldwide](https://www.wearedevelopers.com/magazine/116-covid-19-a-crowdsourced-map-for-checking-supermarket-wait-times-worldwide) - [Making Data Warehouses Fast: A Developer’s Story](https://www.wearedevelopers.com/magazine/107-making-data-warehouses-fast-a-developer-s-story) - [Dev Digest 139 - Soft and hard queries](https://www.wearedevelopers.com/magazine/487-dev-digest-139-soft-and-hard-queries) - [Dev Digest 120 - Apple and peers](https://www.wearedevelopers.com/magazine/455-dev-digest-120-apple-and-peers) ## Related Jobs - [Staff Software Engineer](https://www.wearedevelopers.com/jobs/ext/1425755-staff-software-engineer) at **GitHub** - [Senior Software Engineer, Client Apps Platform](https://www.wearedevelopers.com/jobs/ext/1773893-senior-software-engineer-client-apps-platform) at **GitHub** - [Cloud Foundations Team](https://www.wearedevelopers.com/jobs/ext/1483289-cloud-foundations-team) at **GitHub** - [Senior Software Engineer, Data](https://www.wearedevelopers.com/jobs/48273-senior-software-engineer-data) at **Sportradar Media Services GmbH** - [Data Scientist](https://www.wearedevelopers.com/jobs/ext/1351648-data-scientist) at **Almedia** - [Principal Software Engineer, Database Infrastructure](https://www.wearedevelopers.com/jobs/ext/1465908-principal-software-engineer-database-infrastructure) at **GitHub**