ContentFile() — supabase Function Reference
Architecture documentation for the ContentFile() function in content.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/Connect/content/swift/supabaseswift/content.tsx lines 11–82
const ContentFile = ({ projectKeys }: ContentFileProps) => {
return (
<ConnectTabs>
<ConnectTabTriggers>
<ConnectTabTrigger value="Supabase.swift" />
<ConnectTabTrigger value="Todo.swift" />
<ConnectTabTrigger value="ContentView.swift" />
</ConnectTabTriggers>
<ConnectTabContent value="Supabase.swift">
<SimpleCodeBlock className="swift" parentClassName="min-h-72">
{`
import Foundation
import Supabase
let supabase = SupabaseClient(
supabaseURL: URL(string: "${projectKeys.apiUrl ?? 'your-project-url'}")!,
supabaseKey: "${projectKeys.publishableKey ?? '<prefer publishable key for native apps instead of anon key>'}"
)
`}
</SimpleCodeBlock>
</ConnectTabContent>
<ConnectTabContent value="Todo.swift">
<SimpleCodeBlock className="swift" parentClassName="min-h-72">
{`
import Foundation
struct Todo: Identifiable, Decodable {
var id: Int
var title: String
}
`}
</SimpleCodeBlock>
</ConnectTabContent>
<ConnectTabContent value="ContentView.swift">
<SimpleCodeBlock className="swift" parentClassName="min-h-72">
{`
import Supabase
import SwiftUI
struct ContentView: View {
@State var todos: [Todo] = []
var body: some View {
NavigationStack {
List(todos) { todo in
Text(todo.title)
}
.navigationTitle("Todos")
.task {
do {
todos = try await supabase.from("todos").select().execute().value
} catch {
debugPrint(error)
}
}
}
}
}
#Preview {
ContentView()
}
`}
</SimpleCodeBlock>
</ConnectTabContent>
</ConnectTabs>
)
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free