The BAP Beta Tau frontend is a single-page application assembled from a deliberate, narrow dependency tree. React 19 provides the component model; Vite 6 handles bundling and the development server; Tailwind CSS 3 manages styling through utility classes and a small set of brand-specific design tokens; and Supabase JS 2 owns all authentication concerns. The backend is a completely separate service — the frontend is a pure consumer of its REST API, communicating over standard HTTP with Axios and the browser’s nativeDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/asubap/website/llms.txt
Use this file to discover all available pages before exploring further.
fetch. Understanding how these layers fit together — and how the src/ directory reflects that layering — is the prerequisite for contributing to the codebase effectively.
Full Dependency Reference
Runtime Dependencies
Dev Dependencies
Key Library Roles
React Router DOM v7
Provides
BrowserRouter, Routes, Route, Navigate, Outlet, and useLocation. All routing — including the ProtectedRoute wrapper — is declared in App.tsx.Supabase JS v2
Used exclusively for auth:
createClient, getSession, onAuthStateChange, and the Google OAuth flow. No direct database queries are made from the frontend.Axios v1
Used for REST API calls to the backend wherever a richer request/response API (interceptors, defaults) is preferred over native
fetch. Auth header injection happens at the call site.Fuse.js v7
Client-side fuzzy search for the networking directory pages (
/network, /alumni, /eboard-network). Search indexes are built from the API response arrays.Leaflet + react-leaflet
Interactive map component used in the event creation/editing modal (
LocationPicker.tsx) to select and display event venues via geocoding.TinyMCE React v6
Rich-text editor embedded in admin modals for authoring announcements with formatted content. Requires a TinyMCE Cloud API key at runtime.
date-fns v4
Lightweight date formatting library used throughout event display components. Avoids pulling in the heavier
moment.js or dayjs.@vercel/blob v1
Used for uploading member profile pictures and sponsor/resource files to Vercel Blob storage without a dedicated file server.
Tailwind Design System
The Tailwind config intailwind.config.js extends the default theme with BAP-specific brand colors and fonts. All components use these tokens via utility classes rather than inline styles.
index.html with weights 300, 400, 500, 600, and 700. The root <div> in App.tsx applies className="font-outfit", making Outfit the default font across all pages.
Application Entry Point
The app boots insrc/main.tsx, which mounts the App component into the #root div. App.tsx is the single source of truth for the provider hierarchy and all route declarations.
The provider wrapping order in App.tsx is significant:
AuthProvider wraps everything because both the router and components need access to auth state. ToastContext.Provider wraps the Router so page components can trigger toasts from route transitions.
The src/ Directory in Detail
pages/
Each subdirectory maps directly to one or more routes. Page components are thin — they compose domain-specific components from components/ and wire up data fetching. They do not contain reusable logic.
| Directory | Route(s) | Notes |
|---|---|---|
homepage/ | /, /auth/Home | HomePage is public; AuthHome is the post-login landing page |
about/ | /about | Static content page |
admin/ | /admin | E-board only; contains the full admin dashboard |
contact-us/ | /contact-us | Public contact form |
eboard-faculty/ | /eboard-faculty | Public page listing officers and faculty advisors |
events/ | /events, /events/:eventId | Public list; detail view is protected |
login/ | /login | Google OAuth entry point |
member/ | /member | General-member dashboard |
membership/ | /membership | Public membership process flow |
network/ | /network, /alumni, /eboard-network | Member directory pages |
notfound/ | * | 404 catch-all |
resources/ | /resources | Protected shared resource library |
sponsor/ | /sponsor | Sponsor portal dashboard |
sponsors/ | /sponsors | Public sponsors showcase page |
sponsors-network/ | /sponsors-network | Protected sponsors directory for members |
components/
Components are organized by domain, not by type. A “card” component for events lives in components/event/, not in a global components/cards/ directory.
components/admin/
components/admin/
The largest component subdirectory. Contains all modals and management panels rendered inside the
/admin page:Sidebar.tsx— Admin navigation sidebarAdminMembersSection.tsx,AdminEventsSection.tsx,AdminAnnouncementsSection.tsx,AdminSponsorsSection.tsx,AdminUsersSection.tsx— Tabbed management panelsCreateEventModal.tsx,EditEventModal.tsx— Event CRUD modals (embedLocationPickerand TinyMCE)CreateAnnouncementModal.tsx,EditAnnouncementModal.tsx,ViewAnnouncementModal.tsxAddUserModal.tsx,AddSponsorModal.tsxAdminMemberEditModal.tsx,EboardModal.tsx,EboardManagement.tsxAlumniMembersList.tsx,ArchivedMembersList.tsxArchiveConfirmDialog.tsx,RestoreConfirmDialog.tsx,DeleteConfirmation.tsxResourceManagement.tsx,ResourceModal.tsx,CategoryModal.tsxEmailList.tsx,SponsorList.tsx
components/event/
components/event/
Components for displaying and interacting with events:
EventCard.tsx— Summary card used in the public events listingEventRSVP.tsx,EventRSVPsModal.tsx— RSVP button and admin modal showing RSVP listEventCheckIn.tsx— QR/token-based check-in componentEventAttendeesModal.tsx— Admin view of attendeesEventListShort.tsx— Compact event list for the authenticated home dashboardCalendarSubscribeButton.tsx— ICS calendar subscription link
components/network/
components/network/
Components powering the three networking directory pages:
NetworkingLayout.tsx— Shared layout wrapper for Members, Alumni, and Eboard pagesNetworkList.tsx— Renders the grid of member profile cardsNetworkSearch.tsx— Fuse.js-powered fuzzy search barNetworkProfileModal.tsx— Full-screen profile modal on card clickSponsorProfileModal.tsx— Profile modal for sponsor contacts
components/common/
components/common/
Truly reusable, domain-agnostic UI primitives:
LoadingSpinner.tsx— Configurable spinner withtextandsizepropsSearchInput.tsx— Styled search text inputSortDropdown.tsx— Dropdown for sort order selectionConfirmDialog.tsx,ConfirmationModal.tsx— Generic confirmation modalsLocationPicker.tsx— Leaflet map component for geocoding event locationsProfilePictureUpload.tsx— Handles Vercel Blob uploads for profile imagesSponsorMultiSelect.tsx— Multi-select for associating sponsors with events
components/layout/
components/layout/
App-wide layout shells:
Navbar.tsx— Responsive top navigation bar. ReadsisAuthenticatedfromuseAuth()and callsgetNavLinks(isLoggedIn)to render the correct link set.Footer.tsx— Site-wide footer with chapter contact info and social links.
context/
Two React contexts:
auth/authProvider.tsx— ExportsAuthProvider,useAuth(), and theRoleTypetype. Manages session, role, loading state, and auth errors. See the Authentication page for full details.auth/supabaseClient.ts— Instantiates and exports the single Supabase client usingVITE_SUPABASE_URLandVITE_SUPABASE_ANON_KEY. Session is persisted tolocalStorage.toast/ToastContext.tsx— ExportsToastContextwith ashowToast(message, type, duration)function. TheToast.tsxUI component incomponents/ui/consumes this context.
utils/
canAccessFeature enforces rank-based restrictions within the general-member experience. Alumni members (rank === "alumni") are blocked from event-rsvp, event-checkin, announcements, and slack-access. All other ranks are allowed by default.
services/
Currently contains memberArchiveService.ts, which encapsulates the API calls for archiving and restoring member records. As the app grows, new service files should follow this pattern: one file per backend resource domain, exporting typed async functions.
types/
src/types/index.ts is the single shared type definition file. All TypeScript interfaces and type aliases for API response shapes (members, events, announcements, sponsors, resources) live here, keeping page and component files free of inline type declarations.
Vercel Deployment Configuration
index.html for all paths, which is required for a React Router SPA. Without it, navigating directly to /network would return a 404 from Vercel’s CDN instead of letting the client-side router handle the path.