This is the official repository for student union kwara state university site
# KWASU Students' Union Platform - Developer Documentation
Welcome to the official developer documentation for the Kwara State University Students' Union (KWASU SU) platform. This application is a comprehensive portal for student news, events, executive profiles, and essential services.
## 🚀 Tech Stack
- **Frontend:** React 18 with TypeScript
- **Build Tool:** Vite
- **Styling:** Tailwind CSS + shadcn/ui (Radix UI primitives)
- **Routing:** React Router DOM v6
- **Backend/Database:** Supabase (PostgreSQL, Auth, Storage)
- **Icons:** Lucide React
- **State Management:** React Hooks + TanStack Query (for caching/fetching)
- **Media Handling:** Cloudinary (via Supabase Edge Functions)
## 📁 Project Structure
```text
apps/
├── admin/ # Admin-specific control panel (React/Vite)
│ ├── src/pages/ # Admin dashboard and management views
│ └── ...
└── web/ # Public Student Union website (React/Vite)
├── src/pages/ # Public-facing views (Home, News, Events, etc)
└── ...
packages/
└── shared/ # Shared logic and UI between admin and web
├── src/components/ # Reusable UI components
│ ├── admin/ # Admin-specific shared UI components
│ └── ui/ # shadcn/ui base components
├── src/lib/ # Core logic, API wrappers, Supabase client
├── src/types/ # TypeScript interfaces and types
└── src/utils/ # Helper functions (auth, formatting, etc.)
public/ # Global static assets (images, fonts)
supabase/
└── functions/ # Deno-based Edge Functions (Cloudinary bridge)
```
## 🛠️ Core Modules
### 1. Authentication
The app uses Supabase Auth. The `SessionContextProvider` wraps the application to provide real-time auth state.
- **Admin Access:** Restricted to users with the `admin` role (managed via the `profiles` table).
- **Login:** Located at `/admin/login`.
### 2. API Layer (`src/lib/api/`)
The API is modularized by feature. Each module handles communication with Supabase tables: …