Project · Clone of Instagram
Snapgram
A 7-part build: a spec, 4 milestone guides, 1 AI checkpoint, and a defend-your-code rubric. You build it in Xcode on a Mac; each guide walks the exact Swift 6 patterns.
The spec
Milestones
4 steps · 365 min total- 1Supabase auth and session handling65 minConfigure the supabase-swift client with your project URL and anon key · Implement email sign-up, sign-in, and sign-out through an injected auth service
- 2Postgres tables, RLS, and fetching the feed70 minDesign the profiles, posts, and likes tables in Postgres · Write Row-Level Security policies that read the feed but write only your own rows
- 3PhotosPicker, Supabase Storage, and image URLs65 minSelect a photo with PhotosPicker and load it as Data · Upload image Data to a Supabase Storage bucket with a per-user path
- 4cursor pagination, pull-to-refresh, and optimistic likes65 minPage the feed with a keyset cursor instead of a numeric offset · Add pull-to-refresh with .refreshable
AI checkpoints
Review the diff, then grade your fixAI checkpoint — review before you acceptthe cache that races under load
import Foundation
// A shared cache the feed prefetches into.
final class FeedCache: @unchecked Sendable {
private var store: [UUID: Post] = [:]
func insert(_ post: Post) {
store[post.id] = post
}
func post(for id: UUID) -> Post? {
store[id]
… 16 more lines — download or open to review in full