Skip to content

abdullah-dev5/AdmissionTimes-frontend

Repository files navigation

AdmissionTimes - Frontend

Frontend application for the University Admissions Management Platform.

Status: βœ… Production Ready
Version: 1.0.0
Last Updated: February 25, 2026


πŸ“– Documentation

πŸ‘‰ Complete Documentation

See project-docs/README.md for complete project documentation.

Quick Links

Documentation Structure


πŸš€ Features

βœ… User Authentication - Sign in/up with JWT tokens
βœ… Student Dashboard - Personal admission tracking, recommendations, deadlines
βœ… University Dashboard - Program management, verification queue
βœ… Admin Dashboard - System metrics, user management
βœ… Program Browsing - Search, filter, detailed views
βœ… Watchlist - Save favorite programs
βœ… Smart Recommendations - Collaborative filtering suggestions
βœ… Email Notifications - System + email alerts
βœ… Responsive Design - Mobile, tablet, desktop support


πŸ› οΈ Tech Stack

  • Runtime: Node.js 18+
  • Framework: React 18
  • Language: TypeScript
  • Build: Vite
  • Styling: Tailwind CSS
  • State Management: Zustand
  • Routing: React Router v6
  • HTTP Client: Axios
  • Forms: React Hook Form (optional)

πŸš€ Quick Start

1. Prerequisites

node --version  # v18+ required
pnpm -v        # v10+ or use npm

2. Install Dependencies

cd admission-times-frontend
pnpm install

3. Setup Environment

cp .env.example .env.local
# Edit .env.local with your configuration

Required Variables:

VITE_API_BASE_URL=http://localhost:3000
VITE_SUPABASE_URL=https://...supabase.co
VITE_SUPABASE_ANON_KEY=...

4. Start Development Server

pnpm dev
# Visit http://localhost:5173

5. Build for Production

pnpm build
pnpm preview

πŸ“ Project Structure

src/
β”œβ”€β”€ components/            # Reusable UI components
β”‚   β”œβ”€β”€ admin/            # Admin-specific components
β”‚   β”œβ”€β”€ student/          # Student-specific components
β”‚   β”œβ”€β”€ university/       # University-specific components
β”‚   β”œβ”€β”€ common/           # Shared components
β”‚   └── ai/               # AI-related components
β”œβ”€β”€ pages/                 # Page components
β”‚   β”œβ”€β”€ student/          # Student pages (dashboard, etc.)
β”‚   β”œβ”€β”€ university/       # University pages
β”‚   β”œβ”€β”€ admin/            # Admin pages
β”‚   └── ...
β”œβ”€β”€ hooks/                 # Custom React hooks
β”œβ”€β”€ contexts/              # React Context providers
β”‚   β”œβ”€β”€ AuthContext.tsx   # Authentication context
β”‚   β”œβ”€β”€ ToastContext.tsx  # Toast notifications
β”‚   └── AiContext.tsx     # AI interactions
β”œβ”€β”€ services/              # API services
β”‚   β”œβ”€β”€ apiClient.ts      # Axios instance
β”‚   β”œβ”€β”€ authService.ts    # Auth API calls
β”‚   β”œβ”€β”€ dashboardService.ts
β”‚   β”œβ”€β”€ recommendationsService.ts
β”‚   └── ...
β”œβ”€β”€ store/                 # Zustand stores
β”‚   β”œβ”€β”€ authStore.ts      # Authentication state
β”‚   β”œβ”€β”€ studentStore.ts   # Student data state
β”‚   └── universityStore.ts
β”œβ”€β”€ types/                 # TypeScript interfaces
β”‚   └── api.ts           # API response types
β”œβ”€β”€ utils/                 # Utility functions
β”‚   β”œβ”€β”€ transformers.ts   # Data transformation
β”‚   β”œβ”€β”€ dateUtils.ts      # Date helpers
β”‚   └── ...
β”œβ”€β”€ layouts/              # Layout components
β”‚   β”œβ”€β”€ StudentLayout.tsx
β”‚   β”œβ”€β”€ UniversityLayout.tsx
β”‚   └── AdminLayout.tsx
β”œβ”€β”€ constants/             # App constants
β”œβ”€β”€ data/                  # Static data
└── main.tsx              # Application entry point

πŸ”Œ Key Services

Authentication

  • Service: services/authService.ts
  • Store: store/authStore.ts
  • Context: contexts/AuthContext.tsx

Dashboard Data

  • Service: services/dashboardService.ts
  • Hook: hooks/useStudentDashboardData.ts

Recommendations

  • Service: services/recommendationsService.ts
  • Backend: Collaborative filtering API

Notifications

  • Context: contexts/ToastContext.tsx
  • Service: services/notificationsService.ts

🎨 Components

Common Components

  • LoadingSpinner - Loading states
  • ErrorBoundary - Error handling
  • Modal - Modal dialogs
  • Button - Reusable buttons
  • Card - Content cards

Page Components

  • StudentDashboard - Student home
  • UniversityDashboard - University home
  • AdminDashboard - Admin home
  • ProgramDetail - Program details
  • SignIn / SignUp - Auth pages

πŸ” Authentication Flow

1. User visits app
   ↓
2. Check localStorage for token
   ↓
3. If token exists, validate and restore session
   ↓
4. If no token, show Sign In page
   ↓
5. Sign In β†’ Supabase Auth β†’ JWT token
   ↓
6. Auto-sync user to backend database
   ↓
7. Redirect to role-based dashboard

🌐 API Integration

Axios Client

All API calls use a configured Axios instance with:

  • Automatic JWT token injection
  • Base URL configuration
  • Error handling
  • Request/response logging

Location: services/apiClient.ts

Service Pattern

Each API domain has its own service:

// Example: recommendationsService.ts
export const recommendationsService = {
  getRecommendations: async (limit, minScore) => { ... },
  refreshRecommendations: async () => { ... },
  getRecommendationCount: async () => { ... },
}

πŸ§ͺ Testing

Build Check

pnpm build  # Check for build errors

Type Check

pnpm type-check  # Or: pnpm tsc --noEmit

Lint Check

pnpm lint

πŸ“¦ Build & Deployment

Production Build

pnpm build
# Output: dist/

Preview Build

pnpm preview
# Serves dist/ locally at http://localhost:5173

Deploy to Vercel

# Connect GitHub repo to Vercel
# Set environment variables in Vercel dashboard
# Automatic deployment on push

πŸ“ Environment Variables

# API Configuration
VITE_API_BASE_URL=http://localhost:3000

# Supabase Configuration
VITE_SUPABASE_URL=https://...supabase.co
VITE_SUPABASE_ANON_KEY=...

# Optional
VITE_DEBUG=false              # Enable debug logging
VITE_MOCK_AUTH=false          # Mock auth for testing

πŸ”— Related Resources


πŸš€ Available Commands

Command Description
pnpm dev Start development server
pnpm build Build for production
pnpm preview Preview production build
pnpm lint Run ESLint
pnpm type-check Type check with TypeScript
pnpm format Format code

πŸ“– Learning Resources


πŸ“ž Support

For issues or questions:

  1. Check TROUBLESHOOTING.md
  2. Review project-docs/
  3. Check backend API docs: http://localhost:3000/api-docs

Current Version: 1.0.0
Last Updated: February 25, 2026
Status: Active Development

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages