Al Baraka Room Management System
Full-Stack Developer (Internship)17 weeksLiveTeam of 2

Al Baraka Room Management System

Enterprise room booking platform with real-time status, conflict detection, and analytics dashboard

NJNext.js 14NNestJSPrismaPrismaPostgreSQLPostgreSQLTypeScriptTypeScriptTailwind CSSTailwind CSSSUshadcn/ui
View LiveSource Code

Project Intelligence

Duration

17 weeks

Technologies

7

Status

Production

Key Challenge

Atomic conflict detection on booking creation without race conditions under concurrent requests

Skills Demonstrated

Full StackEnterprise UXConflict DetectionPrisma

TL;DR

Built an internship project delivering room CRUD, booking conflict detection, dashboard analytics, and a modern Next.js frontend connected to a NestJS + Prisma + PostgreSQL API.

Problem

Manual room booking led to double-bookings and no visibility into room availability

Solution

Automated conflict detection with real-time dashboard and room state machine

Result

Centralized booking system with analytics for Al Baraka meeting rooms

<250ms

Dashboard load

100%

Conflict detection accuracy

Key Outcomes

4

Room states

3

Booking statuses

6+

Dashboard metrics

Curated Visuals

Screenshot 1
1 / 12

Screenshot 1

Results & Impact

Delivered a working room management system for Al Baraka internship.

Eliminated manual booking conflicts and provided real-time room visibility.

42

Commits

17

Weeks duration

Architecture

Architecture diagram

Decoupled frontend-backend architecture. Next.js 14 frontend on port 3001 communicates with NestJS API on port 3000 via typed fetch client.

Prisma manages PostgreSQL with Room and Booking models. Service layer validates time ranges and checks overlaps before persisting.

React Context provides global filter and UI state; custom hooks wrap API calls with loading/error handling.

Infrastructure & Deployment

Frontend deployable on Vercel; backend on Render or Docker container with PostgreSQL.

Features

Core

Room Management

CRUD for rooms with capacity, floor, and status.

Core

Booking System

Create bookings with automatic conflict detection.

Core

Dashboard Analytics

Real-time stats on room utilization and today's bookings.

Secondary

Room Filters

Filter by floor, status, and capacity.

Secondary

Calendar View

Visual timeline of room reservations.

Planned

User Profiles

Employee profile and booking history.

Challenges & Solutions

1

Booking overlap detection

The Problem

Two users booking the same room for overlapping times caused conflicts.

How I Solved It

Service-layer query checking active bookings with overlapping time ranges before insert.

const conflict = await prisma.booking.findFirst({
  where: { roomId, status: 'ACTIVE',
    startTime: { lt: endTime }, endTime: { gt: startTime } },
});
if (conflict) throw new ConflictException('Room already booked');
2

Past booking prevention

The Problem

Users could create bookings in the past.

How I Solved It

Validation pipe rejects startTime before current timestamp.

if (dto.startTime < new Date()) throw new BadRequestException('Cannot book in the past');
3

Frontend error handling

The Problem

API errors crashed components without user feedback.

How I Solved It

ErrorBoundary wrapper and ErrorAlert component with retry logic in useApi hook.

Lessons Learned

  1. 1

    Conflict checks belong in the service layer

    Database constraints help, but explicit overlap logic in the booking service gives clear error messages to users.

  2. 2

    Room state is separate from bookings

    MAINTENANCE state should block bookings regardless of calendar availability.

  3. 3

    Internship scope needs clear MVP

    Focused on dashboard + booking first; profile routes were cut to ship on time.

What I'd Do Differently

Add WebSocket push for live room status instead of polling, and implement role-based access for admins vs employees.