If you told me at the start of this internship that I’d be stressing over date pickers, I would’ve laughed.
But here we are. On Day 16, I built the calendar event management system inside Lura — and it’s one of the most human features we’ve touched so far.
🗓️ Why Calendars Matter in Legal Work
Lawyers deal with time-sensitive responsibilities. One missed court date, one forgotten contract review — it’s chaos. So for Lura, we had to build a calendar system that didn’t just store events, but respected context.
We didn’t want a global calendar. We wanted event timelines scoped to cases.
⚙️ How It Works
Each event has:
- Title
- Description
- Start/End DateTime
- Related Case ID
- CreatedBy & updatedBy
- Visibility based on user role
On the backend, I used Prisma to define the model:
model Event {
id String @id @default(uuid())
title String
description String?
startTime DateTime
endTime DateTime
caseId String
createdBy String
updatedAt DateTime @updatedAt
}
The NestJS controller validates the input and checks role permissions — only Admins and Lawyers can create/edit, while Super Admins have global access.
@UseGuards(AuthGuard, RolesGuard)
@Roles('ADMIN', 'LAWYER')
@Post('/cases/:caseId/events')
💻 Frontend: The Form & List
I used Next.js with TailwindCSS to build a small, responsive form:
- Date pickers for start/end
- Character limits for titles
- Real-time form validation
Events appear in a clean list under each case view. I kept it simple, but clear — readable datetime, case context, and edit/delete buttons (based on role).
🧠 Things That Surprised Me
- Date logic gets tricky fast – I had to handle overlapping events and timezone issues even for internal use.
- Empty states matter – If a case has no events, that should be obvious and friendly, not just blank.
- People really trust their calendars – this reminded me how much power (and responsibility) we have when storing others' plans.
✅ Key Lessons
- Always connect calendar features to the real world — lawyers don’t want clutter, they want clarity.
- Backend validation is just as important as UI — especially for date logic.
- Don’t underestimate “boring” UX details. Smart defaults go a long way.
❓Question for You:
When you build event or calendar features, do you prefer a dedicated calendar UI — or filtered event lists?
Let me know how you approach these tiny-but-vital features.
See you on Day 17 👋
Top comments (0)