Home
Relevant source files
The following files were used as context for generating this wiki page:
The nucleus repository is an open-source (AGPL v3) monorepo that powers a suite of personal productivity and well-being applications developed by 21n.org. The project's "Home" is not a single static page but a dynamic landing page system that serves distinct content for each product it houses. The primary tools built from this repository are designed for personal use and lack team-oriented features like collaboration and sharing.
The core products include Nucleus, a super app combining other tools; Memotron, a knowledge management tool; and Pointron, a focus and time management tool. The architecture is built using SvelteKit for the frontend, Node.js for the backend, and is orchestrated using Turbo.
Sources: README.md, WARP.md:5-12
Architecture Overview
The project utilizes a monorepo architecture managed by Turbo to handle build orchestration and task running across different packages and applications. The frontend is built with SvelteKit and TailwindCSS.
Sources: WARP.md:14-16, 28-29, README.md:41-42
Monorepo Structure
The repository is organized into several key directories, separating shared libraries, client-facing applications, and server-side logic. A test script, test-setup.js, verifies the existence of core packages and product application directories, ensuring the workspace is correctly configured.
The following diagram illustrates the high-level directory structure of the monorepo.
Sources: WARP.md:17-26, test-setup.js:19-51
Key Technologies
| Technology | Role |
|---|---|
| Turbo | Build orchestration and task running in the monorepo. |
| SvelteKit | Frontend framework for building client applications. |
| TailwindCSS | CSS framework for styling the user interface. |
| Node.js | Backend runtime environment. |
| SurrealDB | Database used for the backend. |
| Dexie/LocalForage | Local storage solutions for offline-first capabilities. |
Sources: WARP.md:14-15, 28-31, README.md:41-42
Product Ecosystem
The repository contains the source code for several distinct but related productivity tools. Nucleus acts as a "super app" that integrates the functionalities of the other tools.
| Name | Website | Description |
|---|---|---|
| Nucleus | nucleus.to | Your digital harmony, a super app that combines all the tools below. |
| Memotron | memotron.app | Your memory atlas, a tool for managing your knowledge. |
| Pointron | pointron.app | Your focus haven, a tool for tracking goals and managing your time. |
Sources: README.md:18-26, WARP.md:8-12
The relationship between the products can be visualized as follows, with Nucleus as the central application.
Sources: README.md:18-22, WARP.md:11
Dynamic Landing Page System
The "Home" or landing page for each product is dynamically generated by a single SvelteKit server route. The content to be displayed is determined at runtime based on the SITE environment variable.
Sources: client/landing/routes/+page.server.ts:553-555
Content Loading Logic
The load() function in client/landing/routes/+page.server.ts uses a switch statement on the SITE variable to return the appropriate data object for the landing page. This object includes hero content, features, testimonials, and SEO metadata specific to "21n", "Memotron", or "Pointron".
This diagram shows the flow of how a landing page is rendered.
Data Structures
The data loaded for each page conforms to a set of shared types, ensuring consistency.
| Interface | Description |
|---|---|
IHeroInputs | Defines content for the main hero section, including tagline and description. |
IFeature | Describes a product feature with an image, title, and description. |
IHighlight | Defines a key highlight point for the product. |
ITestimonial | Contains user testimonial content, including name, body, and source. |
ISEOMetadata | Holds all SEO-related data, such as title, description, keywords, and structured data (JSON-LD). |
Sources: client/landing/routes/+page.server.ts:4-10
Core Product Feature Example: Memotron
Memotron is the knowledge management application. Its features are extensively defined and categorized, providing a clear example of the project's product depth.
Sources: client/landing/routes/compare/memotronWheel.ts
Feature Categories
Memotron's features are grouped into logical categories defined in an enum.
| Category | Description |
|---|---|
App | Core application features like privacy, reliability, and source availability. |
Content | Features related to content creation and management, such as Markdown and PDF support. |
Capture | Functionality for capturing information, like text, camera, and audio. |
Clipping | Tools for clipping content from the web, videos, and social media. |
Curation | Features for organizing knowledge, such as tags, types, and backlinking. |
Views | Different ways to visualize information, like Calendar, Graph, and Board views. |
Synthesis | Features for retrieval and synthesis, including Search and Summarization. |
Sources: client/landing/routes/compare/memotronWheel.ts:15-25
Competitive Differentiation
The project defines its features and design philosophy by comparing them against competitors like Notion. For example, notion.json specifies that Memotron intentionally omits a "relation property" in favor of link tags for establishing relationships between nodes. It also highlights Memotron's focus on offline-first capabilities and individual use, contrasting with Notion's team-centric and cloud-dependent model.
Sources: client/cx/contemporaries/notion.json:20-22, 53-56, 60-62
Self-Hosting
The project supports self-hosting for the frontend applications, but with limitations. Users can deploy an offline-only version of the client app. Full-stack self-hosting, including the backend and database, is not yet available but is planned for a future release on Cloudflare infrastructure.
Sources: README.md:29-31, client/landing/shared/faqs.data.ts:58-60
To self-host the frontend, the following environment variables must be set:
VITE_PRODUCT={{memotron | pointron | nucleus }}
VITE_STATIC_URL=https://cdn.21n.co
Sources: README.md:35-38