Skip to content
@fauna-labs

Fauna Labs

Experiments, proofs of concept, and other code that is not quite production-ready.

Welcome to Fauna Labs - a collection of tooling and examples to help you build with Fauna more effectively. From Infrastructure as Code (IaC) tools to single sign-on (SSO) application templates, Fauna Labs has everything you need to deliver applications more quickly with Fauna!

Useful tooling

Fauna Labs provides tooling to help you manage your databases. Infrastructure as Code (IaC) is an important focus, allowing you to create and replicate collections, roles, indexes, and functions across different environments. Fauna Labs also has a number of templates and application skeletons that help you focus on features and deliver your applications quickly!

Fauna Schema Migrate tool

The Fauna Schema Migrate (FSM) tool also allows you to setup and manage your Fauna resources as code. It provides support for schema migrations for larger teams, and shows how to use Let() statements to update your databases in a single transaction. You also can use FSM to deploy blueprints, adding common functionality to your Fauna database quickly and consistently.

Fauna Workers template

This template helps you build a fast, globally distributed REST API using Cloudflare Workers and Fauna. It uses Fauna Schema Migrate to deploy resources to your Fauna database and implements recommended practices for building with Fauna, including restricting access to the database through user-defined functions (UDFs) and least-privilege roles.

Fauna Serverless Framework plugin

The Fauna plugin for the Serverless Framework allows you to manage your databases and resources directly in your serverless.yml file. You can integrate it in your test and CI/CD pipeliness to keep your databases in sync across multiple environments. There's also an example repository that demonstrates how to create, update, and delete collections, indexes, roles, and user-defined functions (UDFs).

Helpful examples

Reading the docs is great, but sometimes you need more complete examples to help you understand a concept or get you unstuck. Fauna Labs has a number of examples, from our flagship Fwitter app to an example demonstrating how to use document streaming for real time updates. You'll also find the sample code from Fauna blog posts.

Fwitter

Fwitter is a Twitter clone that demonstrates Fauna's features and functionality. It uses a frontend-only approach that accesses Fauna directly for data storage, authentication, and authorization. It demonstrates basic concepts, such as storing and retrieving data, as well as more advanced concepts like securing your data with user-defined functions (UDFs) and attribute-based access control (ABAC). For more information on Fwitter, see the repository or this CSS-Tricks article.

Fauna authentication skeleton with Auth0

This application skeleton gives you a basic React app with a login flow using Auth0. The app creates an AccessProvider and configures your Fauna database to accept JWT tokens from Auth0 for authentication. With Auth0 and Fauna, you can implement social login, allowing users to login using providers like Twitter or Google and reducing signup friction.

Streaming example

This project is an example project that demonstrates Fauna's document streaming features. It's a React app that retrieves a page of references from a collection and opens streams on the documents that are currently present on the screen. When those documents are updated, it displays the new versions in real time.

Blueprints

Fauna blueprints are packages of resources defined in pure FQL that can be loaded using the Fauna Schema Migrate. You can load blueprints into your database to perform common tasks like email verification, password reset, rate limiting, and more.

Community contributions

We created Fauna Labs for our developer community, but we also want to hear your voice and highlight your contributions. That's why we've enabled GitHub discussions and connected GitHub issues to our internal tracking tool. We also welcome your contributions, from pull requests on existing code to new blueprints and even transferring repositories that you think others will find useful!

What comes next?

See a tool that you'd like to see officially supported? Create an issue and let us know! If there's a specific tool, template, or example that you would like to see, let us know with a feature request on the Fauna community forums.

We are currently developing self-paced workshops to help you and your team build more effectively with Fauna. Check back regularly for this and other updates.

Not sure where to start? Explore the Fauna Labs repositories, or clone the Fwitter app and start building with Fauna today!

Pinned

  1. awesome-fauna awesome-fauna Public

    Curated list of FaunaDB resources

    161 15

  2. fauna-schema-migrate fauna-schema-migrate Public

    The Fauna Schema Migrate tool helps you set up Fauna resources as code and perform schema migrations.

    TypeScript 88 11

  3. fauna-workers fauna-workers Public template

    A template for building fast, globally distributed applications using Cloudflare Workers and Fauna, the data API for modern applications.

    JavaScript 53 6

  4. fwitter fwitter Public

    Fwitter is an example application that demonstrates the features and functionality of Fauna.

    JavaScript 295 92

  5. fauna-blueprints fauna-blueprints Public

    Fauna blueprints are opinionated solutions to common tasks defined in the Fauna Query Language (FQL).

    JavaScript 33 2

  6. serverless-fauna-example serverless-fauna-example Public

    Usage example of the @fauna-labs/serverless-fauna plugin for the Serverless Framework

    JavaScript 12 4

Repositories

Showing 10 of 100 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…