Skip to content

Frontend (Admin Portal)

The frontend is a Nuxt 3 server-side rendered admin portal. It is exclusively for administrators to manage alumni users, events, and platform settings. End-users (alumni) do not use this portal directly.

Tech Stack

CategoryTechnologyVersion
FrameworkNuxt 3latest
UI LibraryVue 3latest
LanguageTypeScriptlatest
Package Managerpnpm10.4+
HTTP ClientAxios1.8+
State ManagementPinia3.0+
CSS FrameworkTailwind CSSlatest
Component Libraryshadcn-nuxt / Reka UI1.0+ / 2.0+
IconsLucide Vue Next + Heroiconslatest
Code QualityESLint + Prettier + Huskylatest
BundlerVite (bundled with Nuxt 3)

Architecture Overview

Project Structure

text
iu-alumni-frontend/
├── pages/
│   ├── index.vue           # Login page (/)
│   ├── users/
│   │   ├── index.vue       # User management dashboard
│   │   └── [id].vue        # User detail / editor
│   └── events/
│       ├── index.vue       # Event management dashboard
│       └── [id].vue        # Event detail + participants
├── store/
│   ├── users.ts            # User list, ban/verify state
│   └── events.ts           # Event list, approval state
├── api/
│   ├── index.ts            # Axios instance (token interceptor)
│   ├── auth.ts             # Login, import alumni, add admin
│   ├── users.ts            # User CRUD, ban, verify
│   └── events.ts           # Event CRUD, approve, participants
├── components/
│   ├── common/             # 14 shared UI components
│   ├── user/               # User-specific components
│   ├── event/              # Event-specific components
│   └── ui/toast/           # shadcn Toast system
├── layouts/
│   ├── default.vue         # Main layout (with nav header)
│   └── login.vue           # Minimal layout for login page
├── plugins/
│   ├── auth.client.ts      # Auth state, middleware, redirects
│   └── api.ts              # Configure Axios base URL
├── types/
│   └── index.ts            # TypeScript types (User, Event, etc.)
└── nuxt.config.ts          # Nuxt configuration

Routing

Nuxt 3's file-based routing automatically generates routes from the pages/ directory:

Authentication Flow

State Management (Pinia)

API Integration

The api/index.ts module creates a shared Axios instance with two interceptors:

Design Patterns

PatternWhere Used
Module Store (Pinia)Separate stores per domain (users.ts, events.ts)
Derived State (Set)bannedUsersIds / verifiedUsersIds as Set<string> for O(1) lookups
API Abstraction Layerapi/*.ts modules isolate HTTP calls from components
Request InterceptorCentralized auth token injection via Axios interceptor
Response InterceptorGlobal error handling with toast notifications
Reactive Auth StateuseState('authToken') — Vue 3 composable for cross-component state
Cross-tab Logoutstorage event listener in auth.client.ts
Computed FilteringClient-side search and filter computation (ban status, verification)

UI Component System

The frontend uses shadcn-nuxt (port of shadcn/ui to Vue), providing headless components styled with Tailwind CSS.

Custom Tailwind color palette:

TokenHexUsage
brandgreen#40BA21Primary actions, highlights
lightpink#FF8591Danger/warning indicators
darkpink#BA2161Destructive actions
darkgrayText
lightgrayBorders, backgrounds

Build & Tooling

ScriptCommandPurpose
devnuxt devStart dev server with HMR
buildnuxt buildProduction SSR build
generatenuxt generateStatic site generation
linteslint --ext .ts,.vue --fix .Lint all TypeScript and Vue files
formatprettier --write *.{vue,ts}Format code
postinstallnuxt prepareGenerate .nuxt/ typings

IU Alumni Platform Documentation