Skip to content
 
 

Repository files navigation

CSSApply - Computer Science Society Recruitment Portal for R101

CSSApply Logo

The official recruitment portal for the Computer Science Society at the University of Santo Tomas

Next.js TypeScript Tailwind CSS Prisma


About CSSApply

CSSApply is a comprehensive recruitment management system designed specifically for the Computer Science Society (CSS) at the University of Santo Tomas. This modern web application streamlines the entire recruitment process, from application submission to interview scheduling and candidate management.

Key Features

  • Multi-Position Applications: Support for Members, Committee Staff, and Executive Assistant positions
  • Smart Interview Scheduling: Automated conflict detection and prevention
  • Admin Dashboard: Comprehensive management tools for recruitment staff
  • Email Notifications: Automated communication system using Brevo with test email feature
  • Personality Assessment: Integrated personality test for candidate evaluation
  • Secure Authentication: NextAuth.js integration with role-based access control
  • Responsive Design: Mobile-first approach with modern UI/UX
  • Performance Optimized: SWR caching for fast data fetching and instant page loads

Quick Start

Prerequisites

  • Node.js 18.0 or later
  • npm, yarn, pnpm, or bun
  • PostgreSQL database
  • Supabase account (for file storage)

Installation

  1. Clone the repository

    git clone https://github.com/your-org/css-apply.git
    cd css-apply
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Environment Setup

    cp .env.example .env.local

    Configure the following environment variables:

    # Database
    DATABASE_URL="postgresql://username:password@localhost:5432/css_apply"
    
    # NextAuth
    NEXTAUTH_URL="http://localhost:3000"
    NEXTAUTH_SECRET="your-secret-key"
    
    # Supabase
    NEXT_PUBLIC_SUPABASE_URL="your-supabase-url"
    NEXT_PUBLIC_SUPABASE_ANON_KEY="your-supabase-anon-key"
    SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"
    NEXT_PUBLIC_PAYMENT_QR_URL="https://your-public-payment-qr-url"
    
    # Auth
    ALLOWED_SIGNIN_EMAIL_DOMAIN="ust.edu.ph"
    
    # Email (Brevo)
    BREVO_API_KEY="your-brevo-api-key"
  4. Database Setup

    npx prisma generate
    npx prisma db push
  5. Start Development Server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  6. Open your browser Navigate to http://localhost:3000 to see the application.


Project Structure

css-apply/
├── src/
│   ├── app/                    # Next.js App Router
│   │   ├── admin/              # Admin dashboard pages
│   │   ├── api/                # API routes
│   │   ├── auth/               # Authentication pages
│   │   ├── user/               # User application pages
│   │   └── personality-test/   # Personality assessment
│   ├── components/             # Reusable React components
│   ├── data/                   # Static data and configurations
│   ├── lib/                    # Utility functions and configurations
│   ├── styles/                 # Global styles and animations
│   └── types/                  # TypeScript type definitions
├── prisma/                     # Database schema and migrations
├── public/                     # Static assets
└── Configuration files

Available Scripts

Command Description
npm run dev Start development server with Turbopack
npm run build Build the application for production
npm run start Start the production server
npm run lint Run ESLint for code quality
npm run lint:fix Run ESLint with auto-fix
npx prisma generate Regenerate Prisma client
npx prisma db push Push schema changes to database
npx prisma studio Open Prisma Studio GUI

Application Types

Member Application

  • Basic membership application
  • Simple form with personal information
  • Automatic approval process

Committee Staff Application

  • Apply for specific committee positions
  • Portfolio submission required
  • Interview scheduling with committee heads

Executive Assistant Application

  • Apply to assist Executive Board members
  • CV submission required
  • Interview scheduling with EB members

Admin Features

Super Admin Dashboard

The Super Admin dashboard provides comprehensive system management:

  • User Database (user_db): View, search, and manage all users. Assign EB (Executive Board) profiles, change roles (user/admin/super_admin), and view member statistics.
  • Configuration (config): Manage recruitment cycles with start/end dates and active status.
  • Test Email (email_test): Send test emails for all email templates to verify delivery and design.

EB Profile Management

Super Admins can assign and manage Executive Board profiles including:

  • Position (President, Secretary, Treasurer, etc.)
  • Committees assigned
  • Meeting links for interviews
  • Active/inactive status

Security Features

  • Authentication: NextAuth.js with multiple providers
  • Role-Based Access: Admin, Super Admin, and User roles
  • CSRF Protection: Built-in Next.js security
  • Environment Variables: Secure configuration management
  • Input Validation: Zod schema validation
  • Race Condition Prevention: Atomic database operations

Email System

CSSApply uses Brevo (formerly Sendinblue) for email communications:

  • Welcome Emails: New user registration
  • Application Confirmations: Successful submissions
  • Interview Notifications: Schedule confirmations
  • Admin Alerts: System notifications
  • Test Emails: Super Admins can send test emails to verify templates

Email Templates

  • Responsive HTML templates
  • Brand-consistent styling with blue theme colors
  • Clean design with logo instead of text
  • Multi-language support ready

Database Schema

Core Models

  • User: User accounts and profiles
  • EAApplication: Executive Assistant applications
  • CommitteeApplication: Committee Staff applications
  • EBProfile: Executive Board member profiles
  • AvailableEBInterviewTime: Interview slot management

Key Features

  • Prisma ORM: Type-safe database operations
  • Migrations: Version-controlled schema changes
  • Relationships: Proper foreign key constraints
  • Indexing: Optimized query performance

Performance Optimization

CSSApply uses several techniques to ensure fast performance:

SWR Caching

  • Client-side data caching with SWR (Stale-While-Revalidate)
  • EB profiles and schedule data are cached for 5 minutes
  • Eliminates loading spinners on return visits
  • Automatic revalidation disabled to reduce server load

Loading States

  • All admin and user pages show loading spinners during data fetches
  • Prevents "flash" of empty content when loading
  • Consistent UX across all pages

Database Optimization

  • Prisma queries optimized with proper select statements
  • Pagination implemented for large datasets
  • Indexes on frequently queried columns

Deployment

Vercel (Recommended)

  1. Connect your GitHub repository to Vercel
  2. Configure environment variables
  3. Deploy automatically on push to main branch

Manual Deployment

  1. Build the application: npm run build
  2. Start the production server: npm run start
  3. Configure reverse proxy (nginx/Apache)
  4. Set up SSL certificates

Environment Variables for Production

NEXTAUTH_URL="https://your-domain.com"
DATABASE_URL="your-production-database-url"
NEXTAUTH_SECRET="your-production-secret"

Contributing

We welcome contributions to CSSApply! Here's how you can help:

Development Workflow

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Code Standards

  • TypeScript: Strict type checking enabled
  • ESLint: Follow the configured rules
  • Prettier: Consistent code formatting
  • Conventional Commits: Standardized commit messages

Support

Getting Help


Passionately designed & developed by CSS 👩‍💻👩‍💻

CSS Logo

About

CSSApply Forked branch for future features.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages