NotesBhej

Next.js Spring Boot PostgreSQL MinIO Grafana Loki

What it is

A centralized platform for course materials at IIITM Gwalior.

Students use it to access notes, slides, assignments, PYQs, books, and resources across semesters and subjects. The platform currently tracks content across 40+ courses and serves 1000+ monthly active users.

Unlike most student projects, NotesBhej evolved into a long-running production system with real infrastructure concerns, migrations, operational overhead, and reliability requirements.


Building the platform

I built and maintained the platform end-to-end as a solo developer.

This included:

  • Frontend architecture using Next.js 15
  • Backend APIs and infrastructure
  • Database and storage management
  • Search and content organization
  • Deployment and operations
  • Performance optimization
  • Production monitoring and logging

The project was initially launched on Supabase, but over time I outgrew parts of the managed stack and wanted tighter control over infrastructure, authentication flows, cookies, request handling, and backend architecture.

That eventually led to a major migration effort.


Migrating away from Supabase

One of the largest engineering efforts in the project was migrating core infrastructure away from Supabase into a more self-managed architecture.

I rebuilt backend services using Spring Boot, migrated APIs and storage systems, and progressively moved production traffic without breaking the live platform.

The migration involved:

  • Reworking authentication and session handling
  • Moving toward tighter backend control over cookies and auth flows
  • Migrating databases and APIs incrementally
  • Preserving compatibility with existing frontend flows during transition
  • Avoiding forced user re-registration or account loss
  • Maintaining uptime while actively replacing production components

A major challenge was doing all of this while the platform was already in active use.

Despite large backend changes, existing users continued using the platform normally throughout the transition.


Performance work

A significant amount of engineering time went into frontend performance and page load optimization.

I progressively moved parts of the platform away from heavy CSR/ISR patterns toward more SSR-oriented rendering where it improved responsiveness and consistency.

The work included:

  • Reducing unnecessary client-side rendering
  • Optimizing page payloads and navigation behavior
  • Improving cache behavior and fetch patterns
  • Monitoring real-world performance metrics instead of relying purely on Lighthouse scores
  • Iteratively tuning slow pages and course views

Current real-user metrics show:

  • LCP: ~1.97s (p75)
  • INP: ~112ms
  • CLS: ~0.093
  • FCP: ~1.52s

with significantly better performance on desktop-class devices.


Infrastructure and observability

The platform also includes a lightweight observability stack for monitoring and debugging production systems.

I set up and operated tooling including:

  • Grafana
  • Loki
  • Promtail
  • Uptime monitoring and alerting

The goal was not just deployment, but understanding operational behavior over time: logs, failures, request patterns, and production issues.

The system has generally maintained around 97–98% uptime, although occasional longer maintenance windows happen since this is still a student-run platform operated by a single developer.


What I learned

NotesBhej stopped being “just a website” pretty quickly.

It became an ongoing systems project involving:

  • Real users
  • Production migrations
  • Authentication design
  • Infrastructure ownership
  • Storage systems
  • Monitoring
  • Reliability tradeoffs
  • Incremental backend rewrites
  • Performance engineering

The biggest lesson was learning how to evolve a live system without losing users while continuously changing the internals underneath it.