About the Project

Inspiration

We've both sat through lectures furiously typing everything the professor says, only to open those notes two weeks later and feel like a stranger reading someone else's thoughts. Passive note-taking creates the illusion of learning without the substance.

The Cornell Method has been around since the 1950s for a reason: forcing yourself to distill notes into cues and a summary is active recall in disguise. We wanted to build a tool that takes that proven structure and pairs it with the two things modern students actually need:

  • AI to generate the questions they're too tired to write themselves
  • A spaced repetition scheduler to make sure nothing falls through the cracks before an exam

That idea became CortexNotes.


What We Built

CortexNotes is a Cornell Notes platform with four interlocking systems:

  • Structured editor with cue, notes, and summary columns baked into the layout
  • AI cue generation that reads your notes and produces Socratic questions in one click
  • Spaced repetition review using the SM-2 algorithm to schedule flashcard sessions at the right interval
  • Social feed where public notes surface to other learners, with likes, bookmarks, and follow relationships

The analytics dashboard tracks your review streak, mastery trend, and a GitHub-style study heatmap so you can see your consistency at a glance.


How We Built It

We built CortexNotes using Spring Boot 4 with server-side rendering via Thymeleaf and HTMX. Choosing HTMX over a JavaScript framework was deliberate: we wanted fast, hypermedia-driven interactions without maintaining a separate frontend build pipeline.

Nearly every dynamic interaction — infinite scroll, like/bookmark toggles, flashcard reveals, and AI result streaming — is handled through small HTMX swaps with no full-page reload.

Spaced Repetition Engine

The review system implements SM-2, the algorithm behind Anki. After each review session, the system updates a note’s ease factor and schedules the next interval:

$$ I_n = I_{n-1} \times EF $$

$$ EF' = EF + (0.1 - (5 - q)(0.08 + (5 - q) \times 0.02)) $$

Where:

  • (q) is the quality of recall (0–5)
  • (EF) is the easiness factor
  • (EF) is clamped to a minimum of 1.3

AI features run through Spring AI connected to the Llama API.

For infrastructure:

  • Attachments and PDF exports use AWS S3
  • The application deploys on an AWS EC2 t3.micro
  • Production uses PostgreSQL (RDS)
  • Development uses H2

Challenges

Spring Boot 4 + Spring AI compatibility

Boot 4 is very recent, and the Spring AI starter was renamed and restructured between versions. Getting the correct artifacts configured with the Spring Milestones repository required more debugging than expected.

HTMX + Infinite Scroll

The trickiest engineering problem was the social feed. We implemented cursor-based infinite scroll with HTMX, but HTMX 2.x parses responses through a <template> element before swapping. If a fragment response accidentally contains <html> or <body> tags, those nodes are preserved and injected directly into the DOM — silently breaking the layout.

Debugging a collapsing grid with no thrown errors required careful inspection of rendered fragments.

Per-User SM-2 Scheduling

Notes can be public and authored by anyone, but review state is per-user. Ensuring the scheduler, flashcard deck, and analytics all agreed on what “due” meant — without triggering N+1 queries — required careful use of projections and denormalized counts.


What We Learned

CortexNotes was a deep-end introduction to the Spring ecosystem. Neither of us had built a production Spring Boot application before, so everything from Spring MVC request handling to Spring Security’s filter chain to Spring Data JPA’s query model was learned under deadline pressure.

Integrating Spring AI with the Llama API taught us how AI fits into backend architecture: prompt design, response parsing, error handling, and managing latency so it feels invisible to the user.

Security configuration — especially CSRF protection, session management, and route-level access control — was far more nuanced than we expected.

Deploying a Java application to AWS for the first time meant learning EC2 provisioning, RDS setup, S3 bucket policies, and building a CI/CD pipeline capable of reliably deploying a Spring Boot JAR.

Thymeleaf’s server-side model finally clicked once we leaned fully into MVC:

  • The controller owns the data
  • The template owns the view
  • HTMX handles dynamic updates without a separate frontend

CortexNotes pushed us to learn modern backend engineering, AI integration, security, and cloud deployment — all at production depth.

Built With

Share this project:

Updates