This is a Next.js + TypeScript + Tailwind CSS app for the Department of Food Science & Nutrition. It includes routing, a modern site layout, a Home page with welfare section and flipbox, and a Welfare page for confidential student concerns.
- Install dependencies:
npm install- Set up environment variables:
Create a .env.local file in the root directory with your Firebase configuration:
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key_here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id
NEXT_PUBLIC_ADMIN_EMAIL=admin@example.com- Run the dev server:
npm run dev- Build for production:
npm run build
npm startsrc/app/layout.tsx: Root layout with AuthProvidersrc/app/page.tsx: Home page with hero, welfare section, and flipboxsrc/app/welfare/page.tsx: Welfare page (admin-only viewable posts)src/app/login/page.tsx: Login/Sign up pagesrc/app/profile/page.tsx: User profile pagesrc/components/Layout.tsx: Shared header/nav, social links, and footersrc/components/Flipbox.tsx: Interactive flipbox with motivational quotessrc/contexts/AuthContext.tsx: Authentication contextsrc/firebase.ts: Firebase configuration and helpers
- Modern Design: Beautiful Tailwind CSS styling with gradient effects
- Welfare Section: Dedicated section on homepage about the Welfare Committee
- Interactive Flipbox: Flip card with random messages and infinite motivational quotes
- Confidential Welfare System: Students can submit concerns; only admin can view posts
- User Authentication: Login/signup with Firebase Authentication
- User Profiles: User profiles with editable information
- Responsive Design: Mobile-friendly navigation and layout
/: Home page with welfare section and flipbox/welfare: Welfare page for submitting concerns (admin-only view)/login: Login/Sign up page/profile: User profile page
All environment variables must be prefixed with NEXT_PUBLIC_ to be accessible in the browser. See FIREBASE_SETUP.md for detailed Firebase setup instructions.
The site owner (admin) is determined by the NEXT_PUBLIC_ADMIN_EMAIL environment variable. Only users with this email can view welfare submissions.
- Add your department logo image to the
public/folder aslogo.png - The image should be square (recommended: 40x40px or larger)
- Supported formats: PNG, JPG, SVG, WebP
- If the image doesn't load, the site will fall back to a gradient background with "NFS" text
See VIEWING_WELFARE_POSTS.md for information on viewing anonymous welfare submissions.