The official digital heartbeat of the Faculty of Engineering, University of Benin (UNIBEN).
Engine Blog is a modern, dynamic web platform designed to keep engineering students updated with campus news, academic resources, and opportunities. Built with a focus on speed, aesthetics, and user experience.
- Framework: Next.js 15 (App Router)
- Styling: Tailwind CSS
- Authentication: Clerk
- Database: Supabase
- CMS: Sanity
- Analytics: Firebase
We use a curated dark‑mode friendly palette with subtle glass‑morphism effects and micro‑animations. All tokens are defined in app/globals.css and can be extended via Tailwind's theme.extend.
- Primary:
hsl(210, 70%, 55%) - Accent:
hsl(340, 80%, 60%) - Background:
hsl(210, 10%, 10%) - Surface:
hsl(210, 10%, 15%) - Text:
hsl(0, 0%, 95%)
- Clone the repository
- Install dependencies:
npm install
- Set up Environment Variables:
Create a
.env.localfile with the following keys:NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=... CLERK_SECRET_KEY=... NEXT_PUBLIC_SUPABASE_URL=... NEXT_PUBLIC_SUPABASE_ANON_KEY=... NEXT_PUBLIC_SANITY_PROJECT_ID=... NEXT_PUBLIC_SANITY_DATASET=...
- Run the development server:
npm run dev
This blog follows a "Student‑First" content strategy designed to be useful, popular, and trusted.
- Campus News: Lecture updates, cancellations, exam timetables.
- Academic Info: Course registration guides, clearance procedures, GPA calculation.
- Events: Seminars, workshops, faculty week activities.
- Accommodation: Hostel updates, rent info, off‑campus tips.
- Opportunities: Scholarships, internships, SIWES placements.
- Notices: Lost & found, urgent announcements.
- Faculty Specifics: Department updates (Mechatronics, Civil, etc.).
- Spotlights: Interviews with outstanding students and entrepreneurs.
- Tech & Skills: Coding guides and software recommendations.
engine-blog/
├─ app/ # Next.js App Router
│ ├─ (auth)/ # Authentication routes (Clerk)
│ ├─ actions/ # Server Actions
│ ├─ api/ # API Routes
│ ├─ posts/ # Blog post display logic
│ ├─ globals.css # Global styles
│ ├─ layout.tsx # Root layout
│ └─ page.tsx # Homepage
├─ components/ # Reusable UI components
│ ├─ Navbar.tsx
│ ├─ Sidebar.tsx
│ ├─ PostCard.tsx
│ ├─ Comments.tsx
│ └─ ...
├─ lib/ # Utilities & Database clients
│ ├─ supabase.ts
│ ├─ sanity/ # Sanity CMS client & queries
│ └─ utils.ts
├─ sanity/ # Sanity CMS configuration
├─ public/ # Static assets (images, icons)
└─ ...
To ensure that reactions and comments are cleaned up in Supabase when a post is deleted in Sanity, set up a webhook:
- Go to your Sanity Management Dashboard.
- Navigate to API > Webhooks.
- Click Create Webhook.
- Name: Deletion Cleanup
- URL:
https://your-domain.com/api/webhooks/sanity - Dataset: Your active dataset (e.g.,
production). - Trigger on:
Deleted. - Filter:
_type == "post". - Projection:
{ "slug": slug.current, "type": _type }. - HTTP Method:
POST.
- Verify Info: Always verify news before pushing content.
- Disclaimer: Ensure the "Student‑run platform" disclaimer is visible.
- Code Style: Follow the Prettier/ESLint configuration in the repo.
- Pull Requests: Fork the repo, create a feature branch, run
npm run lint && npm test, then open a PR. - Issue Reporting: Use the issue template and include steps to reproduce.
Please read our CODE_OF_CONDUCT.md for community standards.
Happy coding!