91 lines
4.7 KiB
Markdown
91 lines
4.7 KiB
Markdown
# identity
|
||
|
||
Identity is an open-source application that helps you save your most meaningful memories.
|
||
|
||
**Note:** This is not a production-ready project by any means. There are still [many things to be done](https://git.sofiaritz.com/sofia/identity/issues).
|
||
|
||
## Rationale
|
||
|
||
Identity is a project that initially started as an app whose purpose was to store music you like (or used to like) for future use in treatment
|
||
for conditions such as dementia. Over time, the idea evolved and is now a general-purpose memory-saving app.
|
||
|
||
## Projects
|
||
|
||
* `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.
|
||
* `asset-api`. The Asset API, takes care of storing user-generated assets.
|
||
|
||
## Installation and building
|
||
|
||
The Identity project is composed by a web-app and two servers. In the future, Docker containers may be built to ease the installation of this project.
|
||
|
||
The recommended Node.JS version is v21.5.0, others should also work.
|
||
|
||
### Development and local testing
|
||
|
||
#### `identity-web`
|
||
|
||
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.
|
||
|
||
#### `identity-api`
|
||
|
||
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)).
|
||
|
||
#### `asset-api`
|
||
|
||
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`.
|
||
* You may need to create an empty folder at `$/asset-api/.assets`.
|
||
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)).
|
||
|
||
### Building and running
|
||
|
||
**Note:** Identity is not stable nor secure. Production instances are **highly discouraged.**
|
||
|
||
#### Building `identity-web`
|
||
|
||
1. Copy and update 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 preview` to check that everything works properly.
|
||
4. Modify the `svelte.config.js` file to deploy to your desired environment.
|
||
5. Run `yarn build` to generate the SPA build.
|
||
* The build will be placed at the `build/` folder.
|
||
|
||
## Contributing
|
||
|
||
Identity is free, open-source software [licensed under AGPL-3.0 and MPL-2.0](#license).
|
||
|
||
There are two methods to report bugs, submit patches, etc.
|
||
1. **Requesting an account.** Send an e-mail to [sofi@sofiaritz.com](mailto:sofi@sofiaritz.com) or send a Matrix PM to
|
||
[@sofiaritz:matrix.org](https://matrix.to/#/@sofiaritz:matrix.org) and she will make an account on your behalf that you can use to create issues and submit patches through pull requests.
|
||
2. **E-mail or Matrix.** You can send an e-mail to [sofi@sofiaritz.com](mailto:sofi@sofiaritz.com) or send a Matrix PM to
|
||
[@sofiaritz:matrix.org](https://matrix.to/#/@sofiaritz:matrix.org) with suggestions, bug reports, patches, etc. You can submit patches via e-mail
|
||
thanks to [git-send-email](https://git-scm.com/docs/git-send-email).
|
||
|
||
Choose the method you prefer, for frequent contributors it is recommended to request an account.
|
||
|
||
## License
|
||
|
||
* `asset-api` and `identity-api` are licensed under the [AGPL 3.0 license](https://www.gnu.org/licenses/agpl-3.0.en.html).
|
||
* `identity-web` is licensed under the [MPL 2.0 license](https://www.mozilla.org/en-US/MPL/).
|
||
* **Note:** Building `identity-web` and hosting it falls under [Section 3.2](https://www.mozilla.org/en-US/MPL/2.0/#distribution-of-executable-form).
|
||
|
||
## Citations
|
||
|
||
1. Van de Winckel, A., Feys, H., De Weerdt, W., & Dom, R. (2004). Cognitive and behavioural effects of music-based exercises in patients with dementia. Clinical Rehabilitation, 18(3), 253-260. https://doi.org/10.1191/0269215504cr750oa
|
||
2. The dementia guide: Living well after your diagnosis. (2021, April 16). Alzheimer’s Society. https://www.alzheimers.org.uk/get-support/publications-factsheets/the-dementia-guide
|