This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

add anallytics

+44 -56
+2 -1
.gitignore
··· 1 - claude_context_info 1 + claude_context_info 2 + node_modules
Screenshot 2025-03-08 at 10.12.06 PM.png

This is a binary file and will not be displayed.

Screenshot 2025-03-08 at 12.24.40 PM.png

This is a binary file and will not be displayed.

+39
app/package-lock.json
··· 10 10 "dependencies": { 11 11 "@atproto/api": "^0.12.0", 12 12 "@supabase/supabase-js": "^2.49.1", 13 + "@vercel/analytics": "^1.5.0", 13 14 "cbor-web": "^8.1.0", 14 15 "dotenv": "^16.4.7", 15 16 "next": "^14.1.0", ··· 382 383 "license": "MIT", 383 384 "dependencies": { 384 385 "@types/node": "*" 386 + } 387 + }, 388 + "node_modules/@vercel/analytics": { 389 + "version": "1.5.0", 390 + "resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.5.0.tgz", 391 + "integrity": "sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g==", 392 + "license": "MPL-2.0", 393 + "peerDependencies": { 394 + "@remix-run/react": "^2", 395 + "@sveltejs/kit": "^1 || ^2", 396 + "next": ">= 13", 397 + "react": "^18 || ^19 || ^19.0.0-rc", 398 + "svelte": ">= 4", 399 + "vue": "^3", 400 + "vue-router": "^4" 401 + }, 402 + "peerDependenciesMeta": { 403 + "@remix-run/react": { 404 + "optional": true 405 + }, 406 + "@sveltejs/kit": { 407 + "optional": true 408 + }, 409 + "next": { 410 + "optional": true 411 + }, 412 + "react": { 413 + "optional": true 414 + }, 415 + "svelte": { 416 + "optional": true 417 + }, 418 + "vue": { 419 + "optional": true 420 + }, 421 + "vue-router": { 422 + "optional": true 423 + } 385 424 } 386 425 }, 387 426 "node_modules/await-lock": {
+1
app/package.json
··· 11 11 "dependencies": { 12 12 "@atproto/api": "^0.12.0", 13 13 "@supabase/supabase-js": "^2.49.1", 14 + "@vercel/analytics": "^1.5.0", 14 15 "cbor-web": "^8.1.0", 15 16 "dotenv": "^16.4.7", 16 17 "next": "^14.1.0",
+2
app/src/app/layout.tsx
··· 5 5 import ThemeToggle from '@/components/ThemeToggle'; 6 6 import ClientOnly from '@/components/ClientOnly'; 7 7 import ProfileSearch from '@/components/ProfileSearch'; 8 + import { Analytics } from "@vercel/analytics/react" 8 9 9 10 // Configure this layout as having dynamic runtime to fix SSR issues with theme 10 11 export const dynamic = 'force-dynamic'; ··· 64 65 <main>{children}</main> 65 66 </ThemeProvider> 66 67 </AuthProvider> 68 + <Analytics /> 67 69 </body> 68 70 </html> 69 71 );
-26
execute_raw_query.sql
··· 1 - -- Create a function to execute raw SQL queries safely 2 - -- This allows direct SQL execution for better performance and reliability 3 - 4 - CREATE OR REPLACE FUNCTION execute_raw_query(raw_query TEXT) 5 - RETURNS JSONB 6 - LANGUAGE plpgsql 7 - SECURITY DEFINER -- This runs with the privileges of the function creator 8 - AS $$ 9 - DECLARE 10 - result JSONB; 11 - BEGIN 12 - -- Only allow SELECT queries for security 13 - IF position('SELECT' in upper(raw_query)) != 1 THEN 14 - RAISE EXCEPTION 'Only SELECT queries are allowed'; 15 - END IF; 16 - 17 - -- Execute the query and convert result to JSON 18 - EXECUTE 'SELECT json_agg(t) FROM (' || raw_query || ') t' INTO result; 19 - 20 - -- Return empty array instead of null if no results 21 - RETURN COALESCE(result, '[]'::jsonb); 22 - END; 23 - $$; 24 - 25 - -- Test the function 26 - SELECT execute_raw_query('SELECT id, did, handle, text FROM flushing_records ORDER BY id DESC LIMIT 3');
-15
get_latest_entries.sql
··· 1 - -- Create a function to get the latest flushing entries 2 - -- This function will be called from our API 3 - CREATE OR REPLACE FUNCTION get_latest_entries(max_entries INTEGER) 4 - RETURNS SETOF flushing_records 5 - LANGUAGE SQL 6 - AS $$ 7 - -- Direct SQL query to get the latest entries by ID 8 - -- This bypasses any caching and pagination issues 9 - SELECT * FROM flushing_records 10 - ORDER BY id DESC 11 - LIMIT max_entries; 12 - $$; 13 - 14 - -- Test the function with a limit of 5 entries 15 - SELECT * FROM get_latest_entries(5);
-14
total_flush_count.sql
··· 1 - -- Create a simple function to get the total count of records 2 - -- This uses a different counting mechanism to avoid any potential caching issues 3 - 4 - CREATE OR REPLACE FUNCTION get_total_flush_count() 5 - RETURNS INTEGER 6 - LANGUAGE SQL 7 - AS $$ 8 - -- Simple, direct query to count all records 9 - SELECT COUNT(id)::INTEGER 10 - FROM flushing_records; 11 - $$; 12 - 13 - -- Test the function 14 - SELECT get_total_flush_count();