The Remix Stack with Clerk authentication, Supabase database, Chakra UI, testing, linting, and more.

Overview

Remix Bossa Nova Stack

Learn more about Remix Stacks.

What's in the stack

Development

Installation

Create a new Remix app using the Bossa Nova Stack template:

npx create-remix@latest --template clerkinc/remix-bossa-nova-stack <app-name>

Environment variables

For this step, you'll need a Clerk application. Check out the Clerk docs for more information about setting it up.

You'll also need a Supabase project.

Finally, if you've already entered your environment variables during the Installation step, this step can be skipped.

Navigate into your project directory:

cd <app-name>

Create a .env file:

touch .env

Find your Clerk Frontend API key and Backend API key and your Supabase URL and anon key and add them to that file like this:

CLERK_FRONTEND_API=<YOUR_FRONTEND_API_KEY>
CLERK_API_KEY=<YOUR_BACKEND_API_KEY>
SUPABASE_URL=<YOUR_SUPABASE_URL>
SUPABASE_ANON_KEY=<YOUR_SUPABASE_ANON_KEY>

Configuring the database

This template comes pre-configured to make calls to a Supabase database.

To make authenticated calls to a Supabase database, you'll need to use one of Clerk's handy JWT Templates. Check out our detailed instructions about setting up Clerk and Supabase.

โ—๏ธ This project is configured to use a JWT template named supabase, so use the same value when creating your JWT template on the Clerk Dashboard. Alternatively, you can change this value in /app/utils/db.server.ts.

Also, you'll need to create a table called songs with the following columns in your Supabase database:

Column name Column type
id uuid
created_at timestamptz
user_id text
body text

In the end, it should look like this:

App's screenshot

Next, we need to ensure that only authenticated users can add new songs and that these users can only retrieve songs they've added. For that, we'll enable RLS for the newly created songs table. Head over to the SQL editor on your Supabase project, paste and run the following query:

create or replace function requesting_user_id()
returns text
language sql stable
as $$
  select nullif(current_setting('request.jwt.claims', true)::json->>'sub', '')::text;
$$;

This will create a requesting_user_id() function that can be used within an RLS policy.

Now, navigate to "Authentication", then "Policies", enable RLS for the songs table, if not yet enabled, and create two new policies from scratch.

One for inserting new songs:

Insert policy

And one for selecting existing songs:

Select policy

Your database is now fully configured and protected.

Running the app

Start your development instance:

npm run dev

Visit http://localhost:3000. If everything is set up correctly, you should see something that looks like this:

App's screenshot

That's it! You're all set to start building your Remix application with complete user management provided by Clerk.

Styling

This template is pre-configured to use Chakra styling. For more information about it, check out the Chakra documentation.

Deployment

You only need to import your Git repository into Vercel, and it will be deployed.

If you'd like to avoid using a Git repository, you can also deploy the directory by running Vercel CLI:

npm i -g vercel
vercel

It is generally recommended to use a Git repository, because future commits will then automatically be deployed by Vercel, through its Git Integration.

Testing

Cypress

Cypress is used for the End-to-End tests in this project. You'll find those in the cypress directory. You'll find included Cypress's example files to help you on your way, but for more information on Cypress, check out their official documentation.

Jest/Testing Library

For lower level tests of utilities and individual components, this project uses Jest and Testing Library.

Type Checking

This project uses TypeScript. It's recommended to get TypeScript set up for your editor to get a really great in-editor experience with type checking and auto-complete. To run type checking across the whole project, run npm run typecheck.

Linting

This project uses ESLint for linting. That is configured in .eslintrc.js.

Formatting

This project uses Prettier for auto-formatting in this project. It's recommended to install an editor plugin (like the VSCode Prettier plugin) to get auto-formatting on save. There's also a npm run format script you can run to format all files in the project.

You might also like...

An Open Source Remix template that integrates Stripe Subscriptions, Social Authentication, Testing and a few more features. SQLite version. Deploys to Fly.io

An Open Source Remix template that integrates Stripe Subscriptions, Social Authentication, Testing and a few more features. SQLite version. Deploys to Fly.io

Live Demo ยท Twitter An Open Source Remix template that integrates Stripe Subscriptions, Social Authentication, Testing and a few more features. SQLite

Dec 31, 2022

chakra-radix-colors provides radix-ui color palettes, automatic dark mode, and acessible colors to chakra-ui applications

chakra-radix-colors chakra-radix-colors provides radix-ui color palettes, automatic dark mode, and acessible colors to chakra-ui applications. About C

Dec 30, 2022

Chakra UI Animations is a dependancy which offers you pre-built animations for your Chakra UI components.

Chakra UI Animations Chakra UI Animations is a dependancy which offers you pre-built animations for your Chakra UI components. Installation yarn add @

Nov 19, 2022

๐Ÿ‘œ Next-gen e-commerce built using Remix, Chakra UI, GraphQL and web3

๐Ÿ‘œ Future Store About Here at New Store, we have the best in women's, men's, bags, shoes, accessories and more. Unmissable discounts and installments.

Dec 26, 2022

Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this workshop, we'll look at some more advanced use cases when building Remix applications.

๐Ÿ’ฟ Advanced Remix Workshop Remix enables you to build fantastic user experiences for the web and feel happy with the code that got you there. In this

Dec 9, 2022

Example project implementing authentication, authorization, and routing with Next.js and Supabase

Example project implementing authentication, authorization, and routing with Next.js and Supabase

Magic Link Authentication and Route Controls with Supabase and Next.js To run this project, To get started with this project, first create a new proje

Dec 11, 2022

Full-Stack CRUD Application With Angular + Firebase Database + Authentication + REST APIs

Full-Stack CRUD Application With Angular + Firebase Database + Authentication + REST APIs

BookCompany Full-Stack CRUD Application With Angular + Firebase Database + Authentication + REST APIs Technologies & Features Angular front-end framew

Apr 10, 2022

This is a full-stack exercise tracker web application built using the MERN (MongoDB, ExpressJS, ReactJS, NodeJS) stack. You can easily track your exercises with this Full-Stack Web Application.

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Dec 25, 2021

We are creating a Library that would ensure developers do not reinvent the wheel anymore as far as Authentication is concerned. Developers can easily register and download authentication codes that suits their need at any point.

We are creating a Library that would ensure developers do not reinvent the wheel anymore as far as Authentication is concerned. Developers can easily register and download authentication codes that suits their need at any point.

#AuthWiki Resource Product Documentation Figma Database Schema First Presentation Live Link API Documentation Individual Contributions User Activity U

Dec 2, 2022
Owner
Clerk
More than authentication - Complete user management
Clerk
Custom Remix stack using Clerk for authentication and full user management.

New Wave Stack Learn more about Remix Stacks. For more on our thoughts on the New Wave Stack check out our blog post. To view this template in deploym

Charles Wefso 11 Oct 11, 2022
The Remix Stack for Web2 apps and Web3 DApps with authentication with Magic, testing, linting, formatting, etc.

Remix French House Stack Learn more about Remix Stacks. npx create-remix --template janhesters/french-house-stack What's in the Stack? The French Hou

Jan Hesters 26 Dec 26, 2022
The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to AWS with DynamoDB, authentication, testing, linting, formatting, etc.

Remix 311 Jan 1, 2023
The Remix Stack for deploying to Fly with SQLite, authentication, testing, linting, formatting, etc.

Remix Indie Stack Learn more about Remix Stacks. npx create-remix --template remix-run/indie-stack What's in the stack Fly app deployment with Docker

Remix 688 Dec 30, 2022
The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

The Remix Stack for deploying to Fly with PostgreSQL, authentication, testing, linting, formatting, etc.

Remix 677 Jan 2, 2023
A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Prisma ORM. Deploys to Fly.io

Live Demo ยท Twitter A testing focused Remix Stack, that integrates E2E & Unit testing with Playwright, Vitest, MSW and Testing Library. Driven by Pris

Remix Stacks 18 Oct 31, 2022
Remix Stack for deploying to Vercel with remix-auth, Planetscale, Radix UI, TailwindCSS, formatting, linting etc. Written in Typescript.

Remix Synthwave Stack Learn more about Remix Stacks. npx create-remix --template ilangorajagopal/synthwave-stack What's in the stack Vercel deploymen

Ilango 56 Dec 25, 2022
The Remix Stack for deploying to Vercel with testing, linting, formatting, structure and mock for 3rd party API integration.

Remix DnB Stack See it live: https://dnb-stack.vercel.app/ Learn more about Remix Stacks. npx create-remix --template robipop22/dnb-stack What's in th

Robert Pop 61 Dec 13, 2022
The Remix Blog Stack for deploying to Fly with MDX, SQLite, testing, linting, formatting, etc.

Remix Speed Metal Stack Learn more about Remix Stacks. npx create-remix --template Girish21/speed-metal-stack Remix Blog ?? This blog starter template

Girish 141 Jan 2, 2023
An Open Source Remix template that integrates Stripe Subscriptions, Social Authentication, Testing and a few more features. PostgreSQL version. Deploys to Fly.io

Live Demo ยท Twitter An open source Remix Stack that integrates Stripe Subscriptions, Social Authentication, Testing and a few more features. PostgreSQ

xo 25 Dec 7, 2022