Review the following materials
Homework Directus
- For next week, watch Getting started with Directus
Homework: Filtering and modifying data In Supabase
These docs are helpful for the assignment
Supabase Tips
- match
- count
- How to use textSearch to perform full text search
- How to retrieve a One to Many relationship with SupabaseJS
Helpful Videos
Monolithic CMS vs Headless CMS Stack Research (45 min - 1 hour)
- Conduct a Quick Stack Tool Assessment
- In groups of 3-4 take 20 minutes to research CMS solutions
- Find 1 monolithic and 2-3 Headless options
- Assess them for:
- cost
- integration options (ie: for Nuxt)
- type of database used
- number of users
- bandwidth
- other features that spark your interest
- Then take another 10 minutes to make a comparison of your 2 favourites
- contrast them and identify:
- your general preference
- ideal use cases for each cms (one might be better for some kinds of site and less so for others)
- features that needed more research to understand
- most valuable features from your point of view
- contrast them and identify:
- Pros and Cons lists should be written down and sharable. Drop read only link to your notes in slack for your colleagues to learn from your research as well.
Class Debrief
- Each group will present on one of the CMS’s reviewed
- however, you’ll speak to the CMS as individuals
SQL Warmup: 15-20 Minutes
- Basic Queries
- Filtering Data
- Aggregating Data
- Grouping Data
SQL Test 10am - 11
- complete the test in Brightspace
- there are 20 multiple choice questions
Fetching Data From Supabase
From Postman
- Instructions
- To fetch from your data tables, you will need the api url and public anon key (find these in the settings)
- Try practicing in small groups with a few queries as per the link
Posting Data To Supabase
With RLS policies off, you are able to add, update, and delete data
- When you enable RLS, you’ll need to also enable the access policies to do each CRUD operation
Change the HTTP method from GET to POST
Review the API docs in your supabase instance
- this will show you how to make different types of requests. For Postman, work off of the bash syntax
- It’ll give you something like this that you need to parse:
curl -X POST 'https://your-api-url-token.supabase.co/rest/v1/city' -H "apikey: SUPABASE_KEY" -H "Authorization: Bearer SUPABASE_KEY" -H "Content-Type: application/json" -H "Prefer: return=minimal" -d '{ "some_column": "someValue", "other_column": "otherValue" }'
In postman, you’ll need to set these headers up in the gui
- apikey
- Authorization
- Content-Type
- data
Today's Achievement
Lab Activity
- Post a new city to your database using the abovenoted instructions
Assignment: CMS Dashboard Setup
- Link to Assignment
- Due: Friday March 29
- In this assignment, you’ll:
- configure and deploy a directus + supabase backend to render
- build 2 different data models
- add data to your data models
- create a query to fetch data that can be tested in postman