arcology/README.org

103 lines
8.6 KiB
Org Mode

:PROPERTIES:
:ID: arcology/django/readme
:END:
#+TITLE: The Arcology Project: Django Edition Landing Page
#+FILETAGS: :Project:README:
#+ARCOLOGY_ALLOW_CRAWL: t
#+ARCOLOGY_KEY: arcology/index
* The Arcology Project
[[id:1d917282-ecf4-4d4c-ba49-628cbb4bb8cc][The Arcology Project]] is the publishing platform and social layer of my [[id:60f710b2-6a1f-44be-bc13-dfe01e46d4e3][Concept Operating System]]'s [[id:knowledge_base][Knowledge Management]] system. It is a web publishing platform built to present my literate programming platform and my public knowledge.
The goal, in short, is to be able to publish and link to any node in a set of [[id:1fb8fb45-fac5-4449-a347-d55118bb377e][org-mode]] documents without needing to do file-system operations or run any commands other than to add some markup to the document in question. When someone asks me "hey how do I do XYZ on Linux" or "what are your thoughts on NASCAR?" I can just link them to a page answering that question and showing them how to do the thing themselves with code they can copy or use directly by adding the org file to their own [[id:cce/org-roam][org-roam]] Knowledge Base.
A page is updated or published by simply editing the org-mode document and saving it with some metadata attached, this can be done on a desktop in Emacs, or on Mobile with a "lesser" text editor in a pinch. It will sync to the server and the server will notice the changes and immediately update the databases which drive routing and rendering.
For a history of this project see [[id:1d917282-ecf4-4d4c-ba49-628cbb4bb8cc][The Arcology Project]], and to see it in action read on.
* The Arcology Project: Django Edition
This version of the Arcology begins to subsume behavior of my [[id:cce/programming_lisp_in_emacs][Emacs Lisp]]-based [[id:arroyo/arroyo][Arroyo Systems]] [[id:1fb8fb45-fac5-4449-a347-d55118bb377e][org-mode]] metadata extraction and query engine to provide a sort of meta-computing programmable layer to your computer and folds the publishing feature-set in the [[id:arcology/fastapi][Arcology FastAPI]] prototype in to a more unified codebase and architecture.
The new [[id:20231023T115950.248543][arroyo_rs Native Org Parser]] removes the Arcology's dependency on Emacs and [[id:introducing_emacsql_null_program][=emacsql=]] in favor of [[id:13995d53-320a-4955-996a-4a4a25319701][Rust]] and [[roam:pyo3]] to generate the database and uses Django's ORM to persist and manage the pages' metadata, generating higher-level metadata along the way, all faster than you can blink.
It allows a user to host a website using a slice of an existing org-roam Knowledge Base, and also use [[id:arcology/django/interfaces][The Arcology Management Commands]] to query the structure of their notes.
What I mean by the latter point there is that =file='s can be annotated with =key= / =value= pairs and these [3-tuples/threeples] can be queried and normalized and built upon to implement the features of [[id:cce/cce][The Complete Computing Environment]] where any page in an [[id:cce/org-roam][org-roam]] directory can add code to your NixOS environment or Emacs configuration to give your computer and your knowledge base new powers. You can apply [[id:cce/literate_programming][Literate Programming]] to your computers and their software stack.
The Arcology contains much of the [[id:arroyo/arroyo][Arroyo Systems Management]] software, but I may change that in the future by modularizing this codebase to allow for arroyo-only usage or arcology-only usage, or at the very least figure out how to more cleanly separate the Arroyo and Arcology code modules.
[[id:cce/cce][The Complete Computing Environment]] provides a decent UX and starter configuration and document design for this system. The Arcology's Django edition promises to add new meta-powers to this programming toolkit while making it more feasible for others to replicate the system and build their own Arcology.
* Usage
ofc i need to flesh all this out still. don't use this, for now.
- [[id:20231113T195508.942155][Rebuild of The Complete Computer]] will be a semi-scripted stream series where I talk about the Arcology and how to use it to build a Complete Computer
- [[id:arcology/django/config][Project Configuration]]
- [[shell:nix run git+https://code.rix.si/rrix/arcology-django# ingestfiles ~/org]] to create a DB in CWD
- [[shell:nix run git+https://code.rix.si/rrix/arcology-django# watchsync]] to create a DB and keep it updated by monitoring [[id:cce/syncthing][Syncthing]]
- example =nix run= to start the webserver
- example =nix run= to start an emacs running arroyo
- example =nix run= to bootstrap an arroyo system from a bunch of cloned org-mode files
- example embedding the system in to a Complete Computing Environment (self-hosting)
* Reading the Arcology Project (or: A table of contents)
This project is a living document. It's [[id:cce/literate_programming][Literate Programming]] powered by [[id:cce/literate_programming][Org Babel]]. You shouldn't need to read all the code to run it, but if you need to it oughta be well documented.
- [[id:arcology/django/config][Arcology Project configuration]] describes and implements the knobs the user can twiddle to configure the Arcology's operation
- [[id:arcology/django/interfaces][Interfacing with the Arcology]] provides a set of management commands and a Syncthing client which will automatically ingest new files in to the database. This document describes all the tools a prospective user of the CCE will need to use for surface-level features.
- [[id:20240213T124300.774781][Deploying the Arcology]] lays out the basics of operating a Wobserver, but also provides a methodology for bootstrapping the Arcology on systems not already running NixOS.
- [[id:20240313T153901.656967][A Localhost API for the Arcology]] lets one make quick queries of the Arcology's metadata to [[id:128ab0e8-a1c7-48bf-9efe-0c23ce906a48][turn Org Mode in to Hypermedia]].
- [[id:20240226T132507.817450][The Arcology's Site Maps and Discovery Mechanisms]] show you how you can discover content published in an Arcology.
- The [[id:arcology/django/scaffolding][Arcology Project Scaffolding]] contains the files necessary to run the project, defines the nix environment, and the python environment, and the base Django apparatus.
- The [[id:arcology/django/roam][Arcology Roam Models]] are the base metadata of the [[id:cce/org-roam][org-roam]] documents
- [[id:arcology/django/arcology-models][The Arcology's Data Models and Web Server]] are the web publishing platform and the data models it requires to be operated
- [[id:arroyo/django/generators][The Arroyo Generators]] are the "API" which can be used to build a [[id:60f710b2-6a1f-44be-bc13-dfe01e46d4e3][Concept Operating System]] using literate programming in org-mode.
* Rough Timeline and Task List
:PROPERTIES:
:ID: 20240205T101753.548048
:END:
** INPROGRESS tests, unit tests, functional tests with org-documents, eugh.
:LOGBOOK:
- State "INPROGRESS" from "NEXT" [2024-02-12 Mon 12:10]
:END:
** INPROGRESS Prometheus and basic page hit count/analytics
:LOGBOOK:
- State "INPROGRESS" from "NEXT" [2024-02-12 Mon 12:10]
:END:
** DONE robots.txt
:LOGBOOK:
- State "DONE" from "NEXT" [2024-02-12 Mon 12:10]
:END:
** DONE Deployment and NixOS module to testing-subdomains
:LOGBOOK:
- State "DONE" from "NEXT" [2024-02-17 Sat 21:27]
:END:
** NEXT [[id:20240226T132507.817450][Sitemap]]
:LOGBOOK:
CLOCK: [2024-02-26 Mon 15:22]--[2024-02-26 Mon 16:16] => 0:54
CLOCK: [2024-02-26 Mon 13:24]--[2024-02-26 Mon 14:59] => 1:35
:END:
** NEXT Move [[id:arroyo/django/generators][The Arroyo Generators]] and perhaps [[id:arcology/django/roam][The Arcology Roam Models]] in to [[id:arroyo/arroyo][Arroyo Systems Management]]
** NEXT [[id:20231113T195508.942155][Rebuild of The Complete Computer]]
** NEXT Consider having a second sqlite3 with server-written state like hit counts and fedi urls and whatnot that i am nervous to store in a DB right now.
there is a [[https://docs.djangoproject.com/en/5.0/topics/db/multi-db/][django doc]] on using multiple DBs, probably want to build a DB router and stuff all the write-paths in to one Django application.
* [[id:20220116T143655.499306][Hey Smell This]]
Like most of my software, this software is released as is and should be used only for entertainment purposes. I care a lot about [[id:35f18b82-0671-405f-9321-6bf442e5c8f6][Free Software]], but I'm not sure this is. It's ideological, opinionated, personal software. [[id:75dc5422-85b2-4e83-b48b-da6f8e515902][Personal Software Can Express Ethics]] and you might not like the ones this one expresses. You may be able to =nix run= this to bootstrap it yourself, but you should think long and hard about whether you'd like to.