πŸ“‘Database, Image CDN & Auth Specifications

Schemas, Image variants & Clerk configuration.

Database

The database in use is MongoDB Atlas, along with the Atlas App Service (required by clean-logs worker).

It contains the following collections:

Collection Name
Purpose

recipes

Storing recipes published by users.

pendingsubmissions

Storing the status of recipe submissions being processed asynchronously.

Collection Schemas

Recipes

Key
Value Type
Required

_id

MongoDB ID

name

String

author

String

cooking_time

Number

diet

String

img_url

String

ingredients

{
    name: String,
    steps: Array,
    category: "veggies"|"dairy"|"meat"|"other" 
}

steps

Array

allergies

Array

intro

String

desc

String

health_score

Number

health_reason

String

userId

String

pendingsubmissions

Key
Value Type
Required

_id

MongoDB ID

recipeId

String

img_url

String

is_pending

Boolean

success

Boolean

stage

String

log

String

createdAt

Date

updatedAt

Date

Image CDN

The Image CDN being used is Cloudflare Images.

The following image variants have been created:

Variant
Purpose

ncThumbnail

Thumbnail for recipes.

ncHeader

Cover image for recipes.

Specifications for these variants are specified here:

Configure Cloudflare Images

Authentication

User data, session management & authentication is managed by Clerk.

The following configuration is required on the Clerk instance for the application to be able to handle authentication requests properly:

Property
Configuration

Email, Phone, Username > Personal Information

Users must provide a first and last name to sign up.

All other properties can be set to anything, and they won't break the application.

Last updated

Was this helpful?