Skip to content

angelabera/UniCompass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

46 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ UniCompass - College Discovery Platform

Your ultimate guide to finding the perfect college

UniCompass is a modern, full-stack college discovery platform that empowers students to explore institutions, compare options, save favorites, and connect with peers through a collaborative Q&A experience. Built with cutting-edge web technologies, UniCompass combines an intuitive interface with powerful features to help students make informed education decisions.


✨ Key Features

πŸ” Smart College Discovery

  • Advanced search with real-time filtering
  • Filter by location, fees, and college type (Government/Private)
  • Pagination for seamless browsing
  • Detailed college profiles with ratings and statistics

πŸ“Š Side-by-Side Comparison

  • Compare up to 4 colleges simultaneously
  • View courses, placement statistics, and fees side by side
  • Make data-driven decisions with visual comparisons

πŸ’Ύ Personal Shortlist

  • Save favorite colleges to your personal dashboard
  • Quick access to bookmarked institutions
  • Organize your college search journey

πŸ’¬ Student Q&A Hub

  • Ask questions about colleges and courses
  • Get answers from other students and community members
  • Real-time discussions and peer insights
  • Track questions by college

πŸ” Secure Authentication

  • User registration and login with email
  • JWT-based session management
  • Password hashing with bcrypt
  • Persistent authentication

πŸŒ“ Dark/Light Mode

  • Seamless theme switching
  • Persistent user preference
  • Eye-friendly interface for all lighting conditions

πŸ“± Fully Responsive Design

  • Mobile-first approach
  • Smooth animations and transitions
  • Glass morphism UI components
  • Polished gradient-based design system

πŸ› οΈ Tech Stack

Frontend

Technology Purpose
Next.js 16 React framework with App Router
React 19 UI component library
TypeScript Type-safe JavaScript
Tailwind CSS 4 Utility-first CSS framework
Framer Motion Smooth animations & transitions
Zustand Lightweight state management
Axios HTTP client for API calls
Lucide React Beautiful icon system
js-cookie Cookie management
jwt-decode JWT token decoding

Backend

Technology Purpose
Node.js JavaScript runtime
Express.js 5 Web framework
TypeScript Type-safe JavaScript
Prisma ORM 5 Database abstraction layer
PostgreSQL Production database
JWT Secure authentication
bcryptjs Password hashing
CORS Cross-origin resource sharing

Database

Environment Database
Local Development SQLite (via Prisma)
Production PostgreSQL (Neon)

πŸ“ Project Structure

UniCompass/
β”‚
β”œβ”€β”€ πŸ“‚ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.ts              # Express app entry point
β”‚   β”‚   β”œβ”€β”€ db.ts                 # Prisma client initialization
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”‚   └── auth.ts           # JWT authentication middleware
β”‚   β”‚   └── routes/
β”‚   β”‚       β”œβ”€β”€ auth.ts           # User registration & login
β”‚   β”‚       β”œβ”€β”€ colleges.ts       # College CRUD operations
β”‚   β”‚       β”œβ”€β”€ questions.ts      # Q&A functionality
β”‚   β”‚       └── saves.ts          # Save/bookmark colleges
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   β”œβ”€β”€ schema.prisma         # Database schema
β”‚   β”‚   β”œβ”€β”€ seed.ts               # Database seeding
β”‚   β”‚   └── migrations/           # Migration history
β”‚   β”œβ”€β”€ .env                      # Local environment variables
β”‚   β”œβ”€β”€ .env.production           # Production environment variables
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ πŸ“‚ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ layout.tsx        # Root layout
β”‚   β”‚   β”‚   β”œβ”€β”€ page.tsx          # Home page
β”‚   β”‚   β”‚   β”œβ”€β”€ colleges/         # College discovery pages
β”‚   β”‚   β”‚   β”œβ”€β”€ compare/          # College comparison
β”‚   β”‚   β”‚   β”œβ”€β”€ questions/        # Q&A hub
β”‚   β”‚   β”‚   β”œβ”€β”€ login/            # Authentication
β”‚   β”‚   β”‚   β”œβ”€β”€ register/         # User registration
β”‚   β”‚   β”‚   β”œβ”€β”€ saved/            # Saved colleges
β”‚   β”‚   β”‚   └── about/            # About page
β”‚   β”‚   β”œβ”€β”€ components/           # Reusable components
β”‚   β”‚   β”œβ”€β”€ lib/                  # Utilities & API client
β”‚   β”‚   β”œβ”€β”€ store/                # Zustand store
β”‚   β”‚   β”œβ”€β”€ types/                # TypeScript definitions
β”‚   β”‚   └── globals.css           # Global styles
β”‚   β”œβ”€β”€ .env.local                # Local environment variables
β”‚   β”œβ”€β”€ .env.production           # Production environment variables
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ next.config.ts
β”‚   └── tsconfig.json
β”‚
└── README.md


πŸš€ Getting Started

Prerequisites

  • Node.js v20 or higher
  • npm or yarn
  • PostgreSQL database (for production)

Local Development Setup

1️⃣ Clone the Repository

git clone https://github.com/angelabera/UniCompass.git
cd UniCompass

2️⃣ Backend Setup

cd backend

# Install dependencies
npm install

# Generate Prisma client
npx prisma generate

# Run database migrations
npx prisma migrate dev

# Seed the database with sample data
npx prisma db seed

# Start development server
npm run dev

Backend runs on: http://localhost:5000

3️⃣ Frontend Setup

Open a new terminal:

cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

Frontend runs on: http://localhost:3000

4️⃣ Access the Application

Open your browser and navigate to: http://localhost:3000


πŸ“¦ Build & Deployment

Build for Production

Backend:

cd backend
npm run build

Frontend:

cd frontend
npm run build
npm start

Deployment Guide

Option 1: Render + Vercel (Recommended)

Backend Deployment (Render):

  1. Push code to GitHub
  2. Connect GitHub repository to render.com
  3. Set build command: npm install && npm run build && npx prisma migrate deploy && npx prisma db seed
  4. Add environment variables:
    DATABASE_URL=postgresql://...
    JWT_SECRET=your-secret-key
    PORT=3001
    NODE_ENV=production
    
  5. Deploy!

Database Setup (Neon):

  1. Create free PostgreSQL database at neon.tech
  2. Copy connection string to DATABASE_URL in Render

Frontend Deployment (Vercel):

  1. Connect GitHub to vercel.com
  2. Select frontend directory
  3. Add environment variable:
    NEXT_PUBLIC_API_URL=https://your-render-backend-url
    
  4. Deploy!

Option 2: Docker Deployment

# Dockerfile for backend
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3001
CMD ["npm", "start"]

πŸ—„οΈ Database Schema

Key Models

  • User: Student accounts with authentication
  • College: Institution information and metadata
  • Course: Programs offered by colleges
  • Placement: Placement statistics and data
  • SavedCollege: User's bookmarked colleges
  • Question: Student questions about colleges
  • Answer: Responses to student questions

πŸ” Environment Variables

Backend (.env.production)

DATABASE_URL=postgresql://user:password@host/database
JWT_SECRET=your-secure-secret-key
PORT=3001
NODE_ENV=production

Frontend (.env.production)

NEXT_PUBLIC_API_URL=https://your-backend-url.com

πŸ“ API Endpoints

Authentication

  • POST /auth/register - User registration
  • POST /auth/login - User login

Colleges

  • GET /colleges - List all colleges with filters
  • GET /colleges/:id - Get college details
  • GET /colleges/compare - Compare multiple colleges

Q&A

  • GET /questions - Get all questions
  • POST /questions - Create new question
  • POST /questions/:id/answers - Add answer

Saves

  • GET /save - Get saved colleges
  • POST /save - Save a college
  • DELETE /save/:id - Remove saved college

πŸ“„ License

This project is licensed under the ISC License.


πŸ‘¨β€πŸ’» Author

Angela Bera


πŸ™ Acknowledgments

  • Built with ❀️ for students seeking their perfect college
  • Inspired by the need for better college discovery tools
  • Thanks to all contributors and users!

Happy College Hunting! πŸŽ“βœ¨

About

UniCompass is a full-stack college discovery and decision platform that helps students search, compare, and choose colleges through a modern, data-driven experience.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors