Prep the pan: Line an 8x8-inch baking pan with parchment, leaving overhang for easy lifting.
Preheat the oven to 350°F (175°C).
Make the crust: In a bowl, combine 1 1/2 cups almond flour, 2 tablespoons coconut flour, 1/4 cup granulated keto sweetener, and a pinch of sea salt. Stir in 6 tablespoons melted butter until the mixture looks like damp sand.
Press and bake: Press the crust mixture evenly into the lined pan. Dock lightly with a fork.
Bake for 10–12 minutes until lightly golden at the edges. Set aside to cool slightly.
Warm the dairy/coconut base: In a saucepan, add 1 cup full-fat coconut milk and 1/2 cup heavy cream. Heat over medium-low until steaming but not boiling.
Sweeten and flavor: Whisk in 1/3–1/2 cup granulated keto sweetener (to taste), 1 1/2 teaspoons vanilla extract, and a small pinch of salt.
Keep the mixture warm.
Optional gelatin boost: If you want a firmer bar, sprinkle 1 teaspoon unflavored gelatin over 2 tablespoons cold water in a small cup. Let bloom 5 minutes, then whisk the bloomed gelatin into the warm coconut mixture until dissolved.
Temper the eggs: In a separate bowl, whisk 3 large eggs until smooth. Slowly ladle in some of the warm coconut mixture while whisking constantly.
Once warmed, pour the egg mixture back into the saucepan, whisking as you go.
Cook the custard: Stir over low heat for 3–5 minutes until the custard slightly thickens and coats the back of a spoon. Do not let it boil. If it gets lumpy, strain it through a fine mesh sieve.
Assemble: Pour the custard over the par-baked crust.
Tap the pan gently to release air bubbles.
Add the coconut top: Sprinkle 1/2 cup unsweetened shredded coconut evenly over the custard.
Bake to set: Return the pan to the oven and bake for 18–24 minutes, until the edges are set and the center has a slight jiggle. The top should look lightly toasted.
Cool and chill: Let the bars cool on the counter for 1 hour. Transfer to the fridge for at least 3 hours, preferably overnight, until fully set.
Slice and serve: Lift out using the parchment.
Use a sharp knife to cut into 12–16 bars. Dust with a little powdered keto sweetener if you like.