Back to projects

LearnHub

A tutorial platform I built for sharing knowledge with other students.

LearnHub was my final project for a web development course at UTHM. Most university assignments are just static sites, but I wanted to build something with a real database where users could actually create and share content.

Sharing code snippets

I noticed that we were always sharing tutorial links and code snippets in WhatsApp groups, but they’d always get lost in the chat history. I built this central hub using the MEN stack (MongoDB, Express, Node.js) to have a more permanent place for our guides.

I focused on making a simple markdown editor so students could easily share code. It was my first time really diving into things like Authentication (using Passport.js) and File Uploads for attachments.

// A simple look at how I set up the file storage const storage = multer.diskStorage({ destination: (req, file, cb) => { cb(null, 'uploads/'); }, filename: (req, file, cb) => { const uniqueSuffix = Date.now() + '-' + Math.round(Math.random() * 1E9); cb(null, file.fieldname + '-' + uniqueSuffix + path.extname(file.originalname)); } });

Lessons from EJS

Since this was a course project, I used EJS for server-side rendering. It was a great lesson in how the web works under the hood before jumping into modern frameworks like React. It’s a bit more manual, but it makes you appreciate how data is actually injected into HTML on the server.

If I were to rebuild this today, I'd probably move it to Next.js for better performance, but as a first "real" project, it taught me the fundamentals of full-stack development. I also want to try adding a search feature so tutorials are easier to find.