Sincronario
Tool that automates the conversion of the Gregorian calendar to the 13-Moon Galactic Synchrony.
The concept of time in the modern world is dictated almost exclusively by the Gregorian calendar, a system of twelve asymmetric and irregular months. This structure, although it is the global standard, lacks a precise geometric or astronomical harmony. On the other hand, the 13-Moon Synchrony proposes an alternative paradigm: a perpetual calendar based on 13 cycles of exactly 28 days (364 days), plus a “Day Out of Time” to synchronize with the solar year.
The problem I have addressed in this project is not philosophical, but computational: How to dynamically translate and synchronize the chaos of the Gregorian model to the deterministic and cyclical structure of the 13-Moon model, maintaining optimal web performance and universal accessibility?
The real utility of this tool lies in automating this complex calculation. Upon entering or detecting a date, the system maps the Gregorian temporal coordinate against a static reference date (July 26, 2013, Kin 164) and immediately calculates the corresponding Kin, its Solar Seal, its Galactic Tone, the Moon, the specific day of that moon, and the Radial Plasma.
The workflow is straightforward:
- The user accesses the web application.
- The system captures the current local date.
- The business logic engine executes the transformation algorithm.
- The interface returns a temporal identity card (Kin) and its position in the 13-moon matrix. This allows people unfamiliar with the mathematics of the synchrony to obtain their temporal coordinate instantly and comprehensibly.
Deep Architectural Analysis (Technical Perspective)
As the architect of this solution, I have prioritized speed of delivery, minimal client-side footprint, and a clean separation between domain logic and the presentation layer.
General Architecture and Design Patterns
The project is structured as a lightweight monolithic application under the Server-Side Rendering (SSR) paradigm using Astro.
The technical decision to use SSR instead of a static site (SSG) is based on the nature of the application: the main content is inherently time-dependent (new Date()). By rendering on the server (in this case, on the Edge or in Serverless Functions through the Vercel adapter), I ensure that the client receives pure HTML with the pre-calculated date, eliminating load times due to JavaScript execution in the browser and drastically improving SEO and First Contentful Paint (FCP).
The underlying architectural pattern follows a Separation of Concerns approach:
- Domain/Logic Layer (
src/lib/): Contains pure algorithms independent of the framework. - Presentation Layer (
src/pages/andsrc/components/): Exclusively responsible for consuming the domain layer and structuring the markup.
Data Modeling and Business Logic
The heart of the system is the synchronization logic. I designed the main DreamspellDate entity to be immutable once calculated. There is no global reactive state management because the application, in its current main flow, calculates and exposes a static snapshot of time.
The rules engine handles particular mathematical edge cases of the synchrony:
- The start of the year is invariably anchored on Gregorian July 26.
- July 25 is abstracted from the standard lunar flow, being treated as the Day Out of Time.
- February 29 (Gregorian leap day) is isolated from the regular kin count, treated functionally as
0.0 Hunab Ku, preventing the shift of the perpetual calendar.
flowchart TD
A[Target Gregorian Date] --> B{Is it February 29?}
B -- Yes --> C[Return Hunab Ku Object]
B -- No --> D{Is it July 25?}
D -- Yes --> E[Assign Day Out of Time]
D -- No --> F[Calculate Days since Start of Year]
F --> G[Calculate Moon Index and Moon Day]
E --> H[Calculate Base Kin]
C --> END[End of Calculation]
G --> H
H --> I[Calculate Offset from Reference Date]
I --> J[Determine Solar Seal 1-20]
I --> K[Determine Galactic Tone 1-13]
I --> L[Determine Radial Plasma 1-7]
J --> M[Construct DreamspellDate Entity]
K --> M
L --> M
E --> M
M --> END
The resulting data entity is structured as follows:
classDiagram
class DreamspellDate {
+Date gregorianDate
+number kin
+string seal
+number sealIndex
+string tone
+number toneIndex
+string moon
+number moonIndex
+number dayOfMoon
+string plasma
+boolean isDayOutOfTime
+string color
}
Technology Stack
The tool ecosystem has been selected strictly for its efficiency, strong typing, and development experience.
| Technology | Architectural Role | Technical Justification |
|---|---|---|
| Astro | Meta-framework and Rendering | Provides fast SSR and sends Zero-JS by default. Ideal for highly static or request-dependent content to the server. |
| TypeScript | Static Typing | Guarantees the integrity of the domain entities (DreamspellDate) and prevents errors in complex mathematical date operations. |
| Tailwind CSS | Utility-First CSS | Allows agile design directly in components without bloating global CSS files. Works in synergy with the Vite bundler. |
| Vite PWA | Progressive Web App Config | Implements offline capabilities and native installation seamlessly in the Astro build process. |
| Vercel Adapter | Deployment and Infrastructure | Facilitates executing the Astro-generated SSR function directly on Vercel’s Serverless infrastructure. |
The combination of Astro in SSR mode, a strongly typed logical domain in TypeScript, and a decoupled interface forms an extremely performant solution. The system successfully abstracts the algorithmic complexity of calendar conversion, encapsulable in pure functions, and delivering a final product that responds in milliseconds with virtually no execution footprint on the client.