How sahilmor/eventshorizon works
Project type and purpose
• This is a full-stack web application built with Next.js (app router).
• It provides browsing and user management functionality for “artists,” “categories,” “events,” “trending events,” “upcoming events,” user “profile,” “login,” “register,” and a “wishlist.”
• It uses Supabase as the backend (authentication + PostgreSQL database + storage), Recoil for client state, and a custom React Context for user data.
File structure
• Top-level config and metadata:
• next.config.ts, tsconfig.json, eslint.config.mjs, postcss.config.mjs
• package.json / lockfile
• The “app” directory: each folder (artists, categories, events, trendingevents, upcomingevents, login, register, profile, etc.) corresponds to a Next.js route. Dynamic routes use [id] or [slug].
• Global layout and middleware: src/app/layout.tsx, src/app/middleware.ts
• UI elements under src/components/ui (buttons, cards, dialogs, inputs, etc.)
• Higher-level React components and providers:
• src/components/layout/MainWrapper.tsx
• src/components/providers/RecoilProvider.tsx
• State and context:
• src/atoms/*.ts (Recoil atoms)
• src/context/UserContext.tsx
• Services and utilities:
• src/lib/supabase.ts (Supabase client instantiation)
• src/lib/utils.ts
• src/services/wishlistService.ts
• Database migrations & policies: supabase/migrations/*.sql, supabase-storage-policies.sql
README for additional insights
• Bootstrapped with create-next-app
• Uses next/font for optimized font loading
• Deploys on Vercel by default
Elements
• Labels: “Browser,” “Next.js Server,” “Supabase Auth,” “PostgreSQL,” “Recoil Store,” “UserContext,” “UI Components,” etc.
→ client requests page
→ server invokes Supabase API
→ Supabase returns data
→ Recoil/Context updates UI
• Blue rectangles for frontend layers
• Green for state management
• Orange for backend services
Detail
• Every major directory as a logical subsystem
• How middleware.ts enforces authentication or routing rules
• How supabase.ts abstracts direct DB calls
• Migrations folder as part of “Database schema evolution”