Alexandria is a Nostr Knowledge Base (NKB) and a reader for long-form articles.
For a thorough introduction, please refer to our [project documention](https://wikistr.com/gc-alexandria*dd664d5e4016433a8cd69f005ae1480804351789b59de5af06276de65633d319).
Alexandria is a reader and writer for curated publications.
For a thorough introduction, please refer to our [project documention](https://next-alexandria.gitcitadel.eu/publication?d=gitcitadel-project-documentation-by-stella-v-1), viewable on Alexandria.
## Features
## Issues and Patches
### Elegant Design
As Alexandria is targeted toward those who are trying to focus on longer, more-complex content, the design has been stripped down of any distracting elements or unnecessary details, so that the user can concentrate on the valuable information stored in the documents that they are viewing. Both light-mode and dark-mode are available.



### Modular articles
The specialty of this client is the ability to display long-form articles, particularly of the modular variety: event kinds [30040 and 30041](https://wikistr.com/nkbip-01). It will eventually also able to display wiki pages (event kind [30818](https://wikistr.com/nip-54)) and normal long-form articles (event kind [30023](https://wikistr.com/nip-23)).
Modular articles are often referred to as the *Nostr eBook format*, with 30040 events containing the metadata and the ordered list of the 30041 notes, which contain the formatted content. The 30040 index is used to create a sidebar containing the table of contents, and the 30041 sections can be individually selected and interacted with.
Alexandria features an Asciidoc upload facility, for you to transform your well-formatted text to Nostr events and publish them to your preferred relays. The GitCitadel relay is set as the default, to ensure that you have at least one relay that is sure to work.
For an interim solution, please use the [command line program.](https://gitworkshop.dev/r/naddr1qqxx2sn0da442arfd35hg7gpz4mhxue69uhhqatjwpkx2un9d3shjtnrdaksyg8ayz8w3j8jsduq492j39hysg7vnhrtl4zzqcugj4m3q62qlkf8cypsgqqqw7vs555whg/)
If you would like to suggest a feature or report a bug, or submit a patch for review, please use the [Nostr git interface](https://gitcitadel.com/r/naddr1qvzqqqrhnypzplfq3m5v3u5r0q9f255fdeyz8nyac6lagssx8zy4wugxjs8ajf7pqyt8wumn8ghj7ur4wfcxcetjv4kxz7fwvdhk6tcqpfqkcetcv9hxgunfvyamcf5z) on our homepage.
## Developing
Make sure that you have [Node.js](https://nodejs.org/en/download/package-manager) installed.
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`) -- make sure to use an independent shell for this step, and not a terminal embedded in an IDE --, start a development server:
Once you've cloned this repo, installed dependencies with:
```bash
npm install
```
then start a development server:
```bash
npm run dev
```
# or start the server and open the app in a new browser tab
or start the server and open the app in a new browser tab:
```bash
npm run dev -- --open
```
## Building
To create a production version of your app:
To create a production version of your app, including the static site:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
You can preview the production build with:
```bash
npm run preview
```
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
## Docker
To run docker type:
This docker container performs the build.
To build the container:
```bash
docker build . -t gc-alexandria
docker run --rm --name=gc-alexandria -p 4174:80 gc-alexandria
```
To run the container, in detached mode (-d):
```bash
docker run -d --rm --name=gc-alexandria -p 4174:80 gc-alexandria -d
```
The container is then viewable on your [local machine](http://localhost:4174).
If you want to see the container process (assuming it's the last process to start), enter:
```bash
docker ps -l
```
which should return something like:
```bash
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1d83d736322f gc-alexandria "/docker-entrypoint.…" 2 minutes ago Up 2 minutes 0.0.0.0:4174->80/tcp, [::]:4174->80/tcp gc-alexandria
```
Notes:
Dockerized Alexandria starts at port 4174 instead of 4173 in the example. Change the port if you like it.
<br>Internet page used as guide: https://www.sveltesociety.dev/recipes/publishing-and-deploying/dockerize-a-svelte-app
## Testing
To run the Vitest suite we've built, install the program locally and run the tests.
*These tests are under development, but will run. They will later be added to the container.*
To run the Vitest suite we've built, install the program locally and run the tests.