Production-ready school website built with Next.js App Router + Tailwind CSS.
- Modern, responsive UI for DM Public School
- Sticky navbar with scroll effect and smooth section navigation
- Hero slideshow with dynamic image fetching
- Gallery grid with image modal + slideshow behavior
- Events and exam schedule with month filter
- Notice board with type filters and highlighted alerts
- Staff cards with hover animations
- Contact form with frontend/backend validation + math CAPTCHA
- Email sending via SMTP (Nodemailer)
- Newsletter subscription endpoint
- Download section for PDF notices
- WhatsApp floating contact button
- Google Maps embed section
- Basic admin panel for:
- adding events
- adding notices
- adding/uploading images
- Admin write protection using
ADMIN_SECRET - Cloud image integration via Cloudinary (fallback to local JSON)
- Vercel deployment ready
- Next.js 15 (App Router)
- React 19
- Tailwind CSS
- Framer Motion
- Next.js API Routes (
app/api/*) - Optional SMTP + Cloudinary integrations
app/
components/
lib/
public/
styles/
api/
data/- Install dependencies:
npm install- Create environment file:
cp .env.example .env.local- Start development server:
npm run devUse .env.example as reference.
Key variables:
NEXT_PUBLIC_SITE_URLNEXT_PUBLIC_WHATSAPP_NUMBERNEXT_PUBLIC_INSTAGRAM_URLNEXT_PUBLIC_YOUTUBE_URLNEXT_PUBLIC_GOOGLE_MAPS_EMBEDNEXT_PUBLIC_SUPABASE_URLSUPABASE_URLSUPABASE_SERVICE_ROLE_KEYSUPABASE_DOCUMENTS_BUCKET(default:documents)IMAGE_PROVIDER(localorcloudinary)CLOUDINARY_*SMTP_*CONTACT_TO_EMAIL,CONTACT_FROM_EMAILADMIN_SECRETSTORE_MESSAGES_LOCALLY
- Open Supabase SQL Editor.
- Run:
-- See full script in project:
-- supabase/events_notices.sql
-- supabase/documents.sql
-- supabase/hero_content.sql- Add env vars in
.env.local:NEXT_PUBLIC_SUPABASE_URLSUPABASE_URLSUPABASE_SERVICE_ROLE_KEYSUPABASE_DOCUMENTS_BUCKET
Visit /admin and enter ADMIN_SECRET.
Admin can:
- Add event cards (including exam type)
- Add notices (daily/holiday/alert)
- Add gallery image by URL
- Upload image file (Cloudinary mode)
- Local fallback JSON:
data/events.jsondata/notices.jsondata/gallery.json
- Cloud mode (optional): Cloudinary resources
Edit lib/site-config.ts:
- Set
logo.mode = "image" - Set
logo.imagePathto your file insidepublic/(example:/logo.svgor/logo.png)
- Push project to GitHub
- Import repository in Vercel
- Add environment variables in Vercel project settings
- Deploy
- Local JSON writes are suitable for demo/local usage. For persistent production content, connect Firebase/MongoDB/CMS.
- Placeholder PDF files are included in
public/downloads/and should be replaced with final files.