Skip to content

Repository files navigation

HackUTD-cometNow

The project repo for the HackUTD competition

Getting Started

This is a Next.js Progressive Web App (PWA) project bootstrapped with create-next-app.

Prerequisites

  • Node.js 18.17 or later
  • npm or yarn package manager

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
# or
yarn install
# or
pnpm install

Development

Run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

Note: PWA features are disabled in development mode for easier debugging. Service workers will only be active in production builds.

Building for Production

Build the application:

npm run build
# or
yarn build
# or
pnpm build

Start the production server:

npm start
# or
yarn start
# or
pnpm start

Linting

Run the linter:

npm run lint
# or
yarn lint
# or
pnpm lint

Project Structure

  • app/ - Application routes and components (App Router)
  • public/ - Static assets, PWA icons, and manifest
  • app/globals.css - Global styles with Tailwind CSS
  • public/manifest.json - PWA manifest file
  • public/icon-*.png - PWA app icons

Technologies Used

  • Next.js 16 - React framework for production
  • React 19 - JavaScript library for building user interfaces
  • TypeScript - Typed superset of JavaScript
  • Tailwind CSS 4 - Utility-first CSS framework
  • ESLint - Code linting tool
  • PWA - Progressive Web App with offline support and installability

Progressive Web App Features

This application is configured as a Progressive Web App with the following features:

  • 📱 Installable - Can be installed on mobile and desktop devices
  • ⚡ Offline Support - Works offline with service worker caching
  • 🚀 Fast Loading - Optimized caching strategies for better performance
  • 📲 App-like Experience - Runs in standalone mode when installed
  • 🔔 Push Notifications Ready - Infrastructure in place for push notifications

Installing the PWA

When you visit the production site, you can install it as an app:

  • On Desktop: Look for the install icon in the browser address bar
  • On Mobile: Tap "Add to Home Screen" from the browser menu

PWA Configuration

  • Service Worker: Auto-generated and managed by @ducanh2912/next-pwa
  • Manifest: Located at /public/manifest.json
  • Icons: 192x192 and 512x512 PNG icons for different devices
  • Theme Color: Black (#000000)
  • Display Mode: Standalone

Authentication

Current Implementation (Firebase Auth)

The app uses Firebase Authentication + Firestore. The React auth context in lib/authContext.tsx provides:

user: Firebase User | null
loading: boolean
login(email, password)
signup(email, password)
logout()

Workflow:

  1. Not logged in -> redirected to /login.
  2. After signup (email/password) -> redirected to /onboarding.
  3. On successful onboarding save -> redirected to / (main map/events page).

Routing guard logic lives in app/providers/RouteGuard.tsx.

Onboarding writes a document to users/{uid} with major, year, interests, etc. This replaces prior Auth0-based API routes.

Environment Variables

Add the following to .env.local (example names; use your own Firebase project values):

NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...

Future Enhancements

  • Add password reset & email verification flows.
  • Add a profileComplete boolean flag to user doc for faster checks.
  • Implement secure server-side operations using Firebase Admin if needed.

Learn More

To learn more about Next.js, take a look at the following resources:

Deployment

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details.

About

The project repo for the HackUTD competitition

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages