Sanctum

An intelligent, minimalist workspace that unifies your digital life and turns overwhelming streams of information into a clear, guided path forward.


Inspiration

Today’s digital workers are overwhelmed not because they lack tools, but because they have too many. Research shows that the average knowledge worker switches between apps hundreds of times per day, and nearly 70% report losing focus every time they do. On top of that, employees spend over 50% of their workday managing communication — emails, chats, notifications — instead of doing meaningful, high‑value work.

The result is a constant sense of fragmentation: tasks scattered across inboxes, messages buried in threads, and priorities lost in the noise.

We realized the real problem isn’t productivity, it’s context switching and tool overload. So we asked ourselves:

What if your digital life could finally feel unified, calm, and intelligent?

That question became the foundation for Sanctum.

How We Built It

Architecture

Sanctum is a full-stack Next.js application built with TypeScript, Prisma and a SQLite/Postgres-style relational data layer. The frontend is a custom React/Next interface with route-based pages for the dashboard, tasks, calendar and settings, all styled through a shared custom CSS system. The backend exposes API routes for task management, suggested-task review, scheduling, dashboard summaries, source ingestion and provider sync.

AI and Extraction Pipeline

At its core, Sanctum combines NLP (Natural Language Processing) and RL (Reinforcement Learning) to identify tasks and deadlines with pinpoint accuracy.

We built a preprocessing layer inspired by a custom spaCy pipeline trained on the CLINC150 dataset. This layer classifies intent and extracts relevant text chunks such as task descriptions, dates and priority signals before anything reaches the LLM. These chunks are then passed into Qwen2.5 7B Instruct, an open source model served locally through Ollama, which interprets context, resolves ambiguity and generates structured task objects with fields like deadline, category and estimated effort.

Live Integrations

We integrated live Gmail through the Google API with OAuth and live Slack through the Slack Web API using a bot-token MVP path. Imported Gmail emails and Slack messages are normalized into a shared SourceItem model, passed through the extraction pipeline, turned into suggested tasks and then accepted into real tasks that can be scheduled and tracked in the UI.

Reinforcement Learning for Personalization

What makes Sanctum truly adaptive is its RL layer. Each time a user interacts with a generated schedule, they provide implicit and explicit feedback through scores and task completions. This feedback updates a reward signal that tunes the model's prioritization logic over time.

Formally, the reward update follows

$$ R(s, a) = R(s, a) + \alpha \left[ r + \gamma \max_{a'} Q(s', a') - Q(s, a) \right] $$

where \( \alpha \) is the learning rate, \( \gamma \) is the discount factor, \( r \) is the immediate reward from user feedback, and \( Q(s, a) \) represents the expected value of taking action \( a \) (a particular scheduling decision) in state \( s \) (the current task context). This allows Sanctum to learn not just what tasks exist, but how the user prefers them to be prioritized.


Tech Stack

  • Frontend — Next.js, React, TypeScript, custom CSS
  • Backend — Next.js API routes, Prisma ORM, SQLite
  • AI/NLP — Ollama (Qwen2.5 7B Instruct), spaCy, CLINC150
  • Integrations — Gmail (Google API + OAuth), Slack (Web API + Bot Token)
  • Learning — Reinforcement learning scoring layer with user feedback loop

Challenges We Faced

Ambiguity in natural language. Deadlines are rarely stated cleanly. Phrases like "due sometime next week" or "try to get this done soon" required careful prompt engineering and fallback heuristics in the preprocessing layer to resolve into actionable dates.

Balancing exploration and exploitation in RL. Early on, the model would over-correct based on a small number of user scores. We had to tune \( \alpha \) and \( \gamma \) carefully and introduce a warm-up period where the system defaults to heuristic prioritization before the RL layer takes over.

Running a 7B model locally. Serving Qwen2.5 through Ollama on consumer hardware introduced latency challenges. We optimized by batching task chunks and caching repeated intent classifications to reduce redundant inference calls.

Normalizing across providers. Gmail and Slack return very different data shapes. Building a shared SourceItem model that could cleanly absorb both while preserving enough context for accurate task extraction required multiple iterations on the schema.


What We Learned

Building Sanctum taught us how to bridge the gap between NLP extraction and decision-making through reinforcement learning. We deepened our understanding of intent classification with real world messy inputs, learned the practical challenges of serving LLMs locally and gained experience designing feedback loops that genuinely improve over time rather than just overfitting to noise.

We also learned how much work goes into making integrations feel seamless. OAuth flows, token management, message normalization and graceful error handling across providers are deceptively complex problems that demand attention to detail.

Most importantly, we learned that the hardest part of automation is not the technology. It is earning the user's trust that the system understands what matters to them.

Built With

Share this project:

Updates