more docs!

This commit is contained in:
Sofía Aritz 2024-06-30 19:41:15 +02:00
parent db71b7ee3a
commit 79266314bc
Signed by: sofia
GPG key ID: 90B5116E3542B28F
5 changed files with 45 additions and 34 deletions

View file

@ -9,7 +9,7 @@ for conditions such as dementia. Over time, the idea evolved and is now a genera
## Projects ## Projects
* `identity-web`. The web app that interacts with the Identiy API. * `identity-web`. The web app that interacts with the Identiy API and the Asset API.
* `identity-api`. The Identity API, takes care of storing user data. * `identity-api`. The Identity API, takes care of storing user data.
* `asset-api`. The Asset API, takes care of storing user-generated assets. * `asset-api`. The Asset API, takes care of storing user-generated assets.
@ -50,6 +50,8 @@ The recommended Node.JS version is v21.5.0, others should also work.
### Building and running ### Building and running
**Note:** Identity is not stable nor secure. Production instances are **highly discouraged.**
#### Building `identity-web` #### Building `identity-web`
1. Copy and update the `env.example` file: `cp .env.example .env` 1. Copy and update the `env.example` file: `cp .env.example .env`

View file

@ -1 +1,12 @@
# asset-api # asset-api
The Asset API, takes care of storing user-generated assets.
## Development and local testing
1. Copy the `.env.example` file: `cp .env.example .env`
2. Run `yarn` to install the dependencies.
* You may need to [enable Corepack](https://nodejs.org/api/corepack.html).
3. Run `yarn start` to start the server.
* You may need to create an empty folder at `$/asset-api/.keys`.
4. You're ready to go! You will need to restart the server manually when you make changed (unless you use something like [Nodemon](https://www.npmjs.com/package/nodemon)).

View file

@ -1 +1,13 @@
# identity-api # identity-api
The Identity API, takes care of storing user data.
## Development and local testing
1. Copy the `.env.example` file: `cp .env.example .env`
2. Run `yarn` to install the dependencies.
* You may need to [enable Corepack](https://nodejs.org/api/corepack.html).
3. Run `yarn start` to start the server.
* **Note:** The `asset-api` server **must** be running before this command is run. [More info](./docs/asset-implementation.md).
* You may need to create an empty folder at `$/identity-api/.database`.
4. You're ready to go! You will need to restart the server manually when you make changed (unless you use something like [Nodemon](https://www.npmjs.com/package/nodemon)).

View file

@ -1,38 +1,24 @@
# create-svelte # identity-web
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). The web app that interacts with the Identiy API and the Asset API.
## Creating a project ## Development and local testing
If you're seeing this, you've probably already done this step. Congrats! 1. Copy the `.env.example` file: `cp .env.example .env`
2. Run `yarn` to install the dependencies.
* You may need to [enable Corepack](https://nodejs.org/api/corepack.html).
3. Run `yarn dev` and open the specified URL.
4. You're ready to go! Any changes should be reflected in real time.
```bash ## Structure
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app * `./routes` - The pages and associated components. Part of the SvelteKit filesystem routing.
npm create svelte@latest my-app Most of the code is here.
``` * `./lib` - Various global elements.
* `./lib/api.ts` - The stateless functions that interact with the Identity API and the Asset API.
## Developing * `./lib/stores.ts` - The global stores, used to store things like tokens and account info.
* `./lib/entry.ts` - The definitions for an entry.
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - **Note:** This file may be moved to a common package in the near future to simplify the
server development process.
```bash * `./lib/assets` - Images used in the landing page.
npm run dev * `./lib/components` - Components used across various pages.
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
You can preview the production build with `npm run preview`.
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 18 KiB